int initstats(void) { char response; char savedg[80]; print1("Do you want to run a character [c], load a game [l], or "); print2("play yourself [p]?"); /* RM 04-19-2000 loading patch */ do response = (char) mcigetc(); while ((response!='c')&&(response != 'p')&&(response !='l')); if (response == 'c') omegan_character_stats(); else if (response == 'l') { /* RM 04-19-2000: loading patch - a blatant hack */ clearmsg(); print1("Enter saved game name: "); strcpy(savedg,msgscanstring()); game_restore(savedg); return true; } else { clearmsg(); /* RM 04-19-2000 loading patch - fix the display */ user_character_stats(); user_intro(); print1("Do you want to save this set-up to .omegarc in your home directory? [yn] "); if (ynq1()=='y') save_omegarc(); } xredraw(); return false; }
/* various kinds of wishes */ void wish(int blessing) { int i; char wishstr[80]; clearmsg(); print1("What do you wish for? "); if (blessing < 0) deathprint(); else strcpy(wishstr,msgscanstring()); if (blessing < 0 || strcmp(wishstr,"Death")==0) { print2("As you wish, so shall it be."); p_death("a deathwish"); } if (strcmp(wishstr,"Power")==0) { print2("You feel a sudden surge of energy"); Player.mana=calcmana()*10; } else if (strcmp(wishstr,"Skill")==0) { print2("You feel more competent."); if (gamestatusp(CHEATED)) gain_experience(10000); else gain_experience(min(10000,Player.xp)); } else if (strcmp(wishstr,"Wealth")==0) { print2("You are submerged in shower of gold pieces!"); Player.cash += 10000; } else if (strcmp(wishstr,"Balance")==0) { print2("You feel neutral."); Player.alignment = 0; } else if (strcmp(wishstr,"Chaos")==0) { print2("You feel chaotic."); Player.alignment -= 25; } else if (strcmp(wishstr,"Law")==0) { print2("You feel lawful."); Player.alignment += 25; } else if (strcmp(wishstr,"Location")==0) strategic_teleport(1); else if (strcmp(wishstr,"Knowledge")==0) { print2("You feel more knowledgeable."); i = random_range(NUMSPELLS); if (Spells[i].known) Spells[i].powerdrain = (max(1,Spells[i].powerdrain/2)); else Spells[i].known = TRUE; } else if (strcmp(wishstr,"Health")==0) { print2("You feel vigorous"); Player.hp = max( Player.hp, Player.maxhp); Player.status[DISEASED] = 0; Player.status[POISONED] = 0; Player.food = 43; /* Wish for Health when starving does some good. PGM */ } else if (strcmp(wishstr,"Destruction")==0) annihilate(gamestatusp(CHEATED)); else if (strcmp(wishstr,"Acquisition")==0) acquire(gamestatusp(CHEATED)); else if (strcmp(wishstr,"Summoning")==0) summon(gamestatusp(CHEATED),-1); else if (strcmp(wishstr,"Stats") == 0 && gamestatusp(CHEATED)) { Player.str = Player.maxstr = Player.con = Player.maxcon = Player.agi = Player.maxagi = Player.dex = Player.maxdex = Player.iq = Player.maxiq = Player.pow = Player.maxpow = 200; calc_melee(); } else print2("You feel stupid."); dataprint(); showflags(); }