diff options
Diffstat (limited to 'src/xtra2.c')
-rw-r--r-- | src/xtra2.c | 439 |
1 files changed, 0 insertions, 439 deletions
diff --git a/src/xtra2.c b/src/xtra2.c index ef753b3a..6f86b5f7 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -1975,7 +1975,6 @@ bool_ set_food(int v) void check_experience(void) { int gained = 0; - bool_ level_reward = FALSE; bool_ level_corruption = FALSE; @@ -2086,12 +2085,6 @@ void check_experience(void) /* Handle stuff */ handle_stuff(); - if (level_reward) - { - gain_level_reward(0); - level_reward = FALSE; - } - if (level_corruption) { msg_print("You feel different..."); @@ -5284,438 +5277,6 @@ bool_ get_rep_dir(int *dp) } -int get_chaos_patron(void) -{ - return (((p_ptr->age) + (p_ptr->sc)) % MAX_PATRON); -} - - -void gain_level_reward(int chosen_reward) -{ - object_type *q_ptr; - object_type forge; - char wrath_reason[32] = ""; - int nasty_chance = 6; - int dummy = 0, dummy2 = 0; - int type, effect; - - - if (p_ptr->lev == 13) nasty_chance = 2; - else if (!(p_ptr->lev % 13)) nasty_chance = 3; - else if (!(p_ptr->lev % 14)) nasty_chance = 12; - - if (randint(nasty_chance) == 1) - type = randint(20); /* Allow the 'nasty' effects */ - else - type = randint(15) + 5; /* Or disallow them */ - - if (type < 1) type = 1; - if (type > 20) type = 20; - type--; - - - sprintf(wrath_reason, "the Wrath of %s", - chaos_patrons[p_ptr->chaos_patron]); - - effect = chaos_rewards[p_ptr->chaos_patron][type]; - - if ((randint(6) == 1) && !chosen_reward) - { - msg_format("%^s rewards you with a corruption!", - chaos_patrons[p_ptr->chaos_patron]); - gain_random_corruption(); - return; - } - - switch (chosen_reward ? chosen_reward : effect) - { - case REW_POLY_SLF : - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou needst a new form, mortal!'"); - do_poly_self(); - break; - - case REW_GAIN_EXP: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Well done, mortal! Lead on!'"); - if (p_ptr->exp < PY_MAX_EXP) - { - s32b ee = (p_ptr->exp / 2) + 10; - if (ee > 100000L) ee = 100000L; - msg_print("You feel more experienced."); - gain_exp(ee); - } - break; - - case REW_LOSE_EXP: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou didst not deserve that, slave.'"); - lose_exp(p_ptr->exp / 6); - break; - - case REW_GOOD_OBJ: - msg_format("The voice of %s whispers:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Use my gift wisely.'"); - acquirement(p_ptr->py, p_ptr->px, 1, FALSE, FALSE); - break; - - case REW_GREA_OBJ: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Use my gift wisely.'"); - acquirement(p_ptr->py, p_ptr->px, 1, TRUE, FALSE); - break; - - case REW_CHAOS_WP: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thy deed hath earned thee a worthy blade.'"); - /* Get local object */ - q_ptr = &forge; - dummy = TV_SWORD; - switch (randint(p_ptr->lev)) - { - case 0: - case 1: - dummy2 = SV_DAGGER; - break; - case 2: - case 3: - dummy2 = SV_MAIN_GAUCHE; - break; - case 4: - case 5: - case 6: - dummy2 = SV_RAPIER; - break; - case 7: - case 8: - dummy2 = SV_SMALL_SWORD; - break; - case 9: - case 10: - dummy2 = SV_BASILLARD; - break; - case 11: - case 12: - case 13: - dummy2 = SV_SHORT_SWORD; - break; - case 14: - case 15: - dummy2 = SV_SABRE; - break; - case 16: - case 17: - dummy2 = SV_CUTLASS; - break; - case 18: - case 19: - dummy2 = SV_KHOPESH; - break; - case 20: - dummy2 = SV_TULWAR; - break; - case 21: - dummy2 = SV_BROAD_SWORD; - break; - case 22: - case 23: - dummy2 = SV_LONG_SWORD; - break; - case 24: - case 25: - dummy2 = SV_SCIMITAR; - break; - case 26: - case 27: - dummy2 = SV_KATANA; - break; - case 28: - case 29: - dummy2 = SV_BASTARD_SWORD; - break; - case 30: - dummy2 = SV_GREAT_SCIMITAR; - break; - case 31: - dummy2 = SV_CLAYMORE; - break; - case 32: - dummy2 = SV_ESPADON; - break; - case 33: - dummy2 = SV_TWO_HANDED_SWORD; - break; - case 34: - dummy2 = SV_FLAMBERGE; - break; - case 35: - case 36: - dummy2 = SV_EXECUTIONERS_SWORD; - break; - case 37: - dummy2 = SV_ZWEIHANDER; - break; - default: - dummy2 = SV_BLADE_OF_CHAOS; - } - - object_prep(q_ptr, lookup_kind(dummy, dummy2)); - q_ptr->to_h = 3 + (randint(dun_level)) % 10; - q_ptr->to_d = 3 + (randint(dun_level)) % 10; - random_resistance(q_ptr, FALSE, (randint(34) + 4)); - q_ptr->name2 = EGO_CHAOTIC; - - /* Apply the ego */ - apply_magic(q_ptr, dun_level, FALSE, FALSE, FALSE); - - /* Drop it in the dungeon */ - drop_near(q_ptr, -1, p_ptr->py, p_ptr->px); - break; - - case REW_GOOD_OBS: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thy deed hath earned thee a worthy reward.'"); - acquirement(p_ptr->py, p_ptr->px, randint(2) + 1, FALSE, FALSE); - break; - - case REW_GREA_OBS: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Behold, mortal, how generously I reward thy loyalty.'"); - acquirement(p_ptr->py, p_ptr->px, randint(2) + 1, TRUE, FALSE); - break; - - case REW_TY_CURSE: - msg_format("The voice of %s thunders:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou art growing arrogant, mortal.'"); - activate_ty_curse(); - break; - - case REW_SUMMON_M: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'My pets, destroy the arrogant mortal!'"); - for (dummy = 0; dummy < randint(5) + 1; dummy++) - { - (void)summon_specific(p_ptr->py, p_ptr->px, dun_level, 0); - } - break; - - case REW_H_SUMMON: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou needst worthier opponents!'"); - activate_hi_summon(); - break; - - case REW_DO_HAVOC: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Death and destruction! This pleaseth me!'"); - call_chaos(); - break; - - case REW_GAIN_ABL: - msg_format("The voice of %s rings out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Stay, mortal, and let me mold thee.'"); - if ((randint(3) == 1) && - !(chaos_stats[p_ptr->chaos_patron] < 0)) - do_inc_stat(chaos_stats[p_ptr->chaos_patron]); - else - do_inc_stat(randint(6) - 1); - break; - - case REW_LOSE_ABL: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'I grow tired of thee, mortal.'"); - if ((randint(3) == 1) && - !(chaos_stats[p_ptr->chaos_patron] < 0)) - do_dec_stat(chaos_stats[p_ptr->chaos_patron], STAT_DEC_NORMAL); - else - (void)do_dec_stat(randint(6) - 1, STAT_DEC_NORMAL); - break; - - case REW_RUIN_ABL: - msg_format("The voice of %s thunders:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou needst a lesson in humility, mortal!'"); - msg_print("You feel less powerful!"); - for (dummy = 0; dummy < 6; dummy++) - { - (void)dec_stat(dummy, 10 + randint(15), TRUE); - } - break; - - case REW_POLY_WND: - msg_format("You feel the power of %s touch you.", - chaos_patrons[p_ptr->chaos_patron]); - do_poly_wounds(); - break; - - case REW_AUGM_ABL: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Receive this modest gift from me!'"); - for (dummy = 0; dummy < 6; dummy++) - { - (void) do_inc_stat(dummy); - } - break; - - case REW_HURT_LOT: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Suffer, pathetic fool!'"); - fire_ball(GF_DISINTEGRATE, 0, (p_ptr->lev * 4), 4); - take_hit(p_ptr->lev * 4, wrath_reason); - break; - - case REW_HEAL_FUL: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Rise, my servant!'"); - restore_level(); - (void)set_poisoned(0); - (void)set_blind(0); - (void)set_confused(0); - (void)set_image(0); - (void)set_stun(0); - (void)set_cut(0); - hp_player(5000); - for (dummy = 0; dummy < 6; dummy++) - { - (void) do_res_stat(dummy, TRUE); - } - break; - - case REW_CURSE_WP: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou reliest too much on thy weapon.'"); - (void)curse_weapon(); - break; - - case REW_CURSE_AR: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Thou reliest too much on thine equipment.'"); - (void)curse_armor(); - break; - - case REW_PISS_OFF: - msg_format("The voice of %s whispers:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Now thou shalt pay for annoying me.'"); - switch (randint(4)) - { - case 1: - activate_ty_curse(); - break; - case 2: - activate_hi_summon(); - break; - case 3: - if (randint(2) == 1) (void)curse_weapon(); - else (void)curse_armor(); - break; - default: - for (dummy = 0; dummy < 6; dummy++) - { - (void) dec_stat(dummy, 10 + randint(15), TRUE); - } - break; - } - break; - - case REW_WRATH: - msg_format("The voice of %s thunders:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Die, mortal!'"); - take_hit(p_ptr->lev * 4, wrath_reason); - for (dummy = 0; dummy < 6; dummy++) - { - (void) dec_stat(dummy, 10 + randint(15), FALSE); - } - activate_hi_summon(); - activate_ty_curse(); - if (randint(2) == 1) (void)curse_weapon(); - if (randint(2) == 1) (void)curse_armor(); - break; - - case REW_DESTRUCT: - /* Prevent destruction of quest levels and town */ - if (!is_quest(dun_level) && dun_level) - { - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Death and destruction! This pleaseth me!'"); - destroy_area(p_ptr->py, p_ptr->px, 25, TRUE, FALSE); - } - break; - - case REW_GENOCIDE: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Let me relieve thee of thine oppressors!'"); - (void) genocide(FALSE); - break; - - case REW_MASS_GEN: - msg_format("The voice of %s booms out:", - chaos_patrons[p_ptr->chaos_patron]); - msg_print("'Let me relieve thee of thine oppressors!'"); - (void) mass_genocide(FALSE); - break; - - case REW_DISPEL_C: - msg_format("You can feel the power of %s assault your enemies!", - chaos_patrons[p_ptr->chaos_patron]); - (void) dispel_monsters(p_ptr->lev * 4); - break; - - case REW_IGNORE: - msg_format("%s ignores you.", - chaos_patrons[p_ptr->chaos_patron]); - break; - - case REW_SER_DEMO: - msg_format("%s rewards you with a demonic servant!", chaos_patrons[p_ptr->chaos_patron]); - if (!(summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_DEMON, FALSE))) - msg_print("Nobody ever turns up..."); - break; - - case REW_SER_MONS: - msg_format("%s rewards you with a servant!", chaos_patrons[p_ptr->chaos_patron]); - if (!(summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_NO_UNIQUES, FALSE))) - msg_print("Nobody ever turns up..."); - break; - - case REW_SER_UNDE: - msg_format("%s rewards you with an undead servant!", chaos_patrons[p_ptr->chaos_patron]); - if (!(summon_specific_friendly(p_ptr->py, p_ptr->px, dun_level, SUMMON_UNDEAD, FALSE))) - msg_print("Nobody ever turns up..."); - break; - - default: - msg_format("The voice of %s stammers:", - chaos_patrons[p_ptr->chaos_patron]); - msg_format("'Uh... uh... the answer's %d/%d, what's the question?'", type, - effect ); - break; - } -} - - /* * old -- from PsiAngband. */ |