From 7137a17f77fd3b6c3bbcefa2d621b3a11f161679 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Mon, 20 Jun 2016 22:49:05 +0200 Subject: Remove monster memory Instead of having monster memory, the player automatically knows everything about all monsters from the start. --- src/melee1.cc | 357 ++++++++-------------------------------------------------- 1 file changed, 48 insertions(+), 309 deletions(-) (limited to 'src/melee1.cc') diff --git a/src/melee1.cc b/src/melee1.cc index fb2b1749..2753f78c 100644 --- a/src/melee1.cc +++ b/src/melee1.cc @@ -232,7 +232,7 @@ bool_ carried_make_attack_normal(int r_idx) char ddesc[80] = "your symbiote"; cptr sym_name = symbiote_name(TRUE); - bool_ touched = FALSE, alive = TRUE; + bool_ alive = TRUE; /* Not allowed to attack */ if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE); @@ -246,9 +246,6 @@ bool_ carried_make_attack_normal(int r_idx) /* Scan through all four blows */ for (ap_cnt = 0; ap_cnt < 4; ap_cnt++) { - bool_ visible = FALSE; - bool_ obvious = FALSE; - int power = 0; int damage = 0; @@ -271,9 +268,6 @@ bool_ carried_make_attack_normal(int r_idx) /* Handle "leaving" */ if (p_ptr->leaving) break; - /* Extract visibility (before blink) */ - visible = TRUE; - /* Extract the attack "power" */ power = get_attack_power(effect); @@ -290,9 +284,6 @@ bool_ carried_make_attack_normal(int r_idx) (p_ptr->lev >= rlev) && ((rand_int(100) + p_ptr->lev) > 50)) { - /* Remember the Evil-ness */ - r_ptr->r_flags3 |= (RF3_EVIL); - /* Message */ msg_format("%s is repelled.", sym_name); @@ -306,9 +297,6 @@ bool_ carried_make_attack_normal(int r_idx) (p_ptr->lev >= rlev) && ((rand_int(100) + p_ptr->lev) > 50)) { - /* Remember the Good-ness */ - r_ptr->r_flags3 |= (RF3_GOOD); - /* Message */ msg_format("%s is repelled.", sym_name); @@ -326,7 +314,6 @@ bool_ carried_make_attack_normal(int r_idx) { act = "hits you."; do_cut = do_stun = 1; - touched = TRUE; sound(SOUND_HIT); break; } @@ -334,7 +321,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_TOUCH: { act = "touches you."; - touched = TRUE; sound(SOUND_TOUCH); break; } @@ -342,7 +328,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_PUNCH: { act = "punches you."; - touched = TRUE; do_stun = 1; sound(SOUND_HIT); break; @@ -351,7 +336,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_KICK: { act = "kicks you."; - touched = TRUE; do_stun = 1; sound(SOUND_HIT); break; @@ -360,7 +344,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_CLAW: { act = "claws you."; - touched = TRUE; do_cut = 1; sound(SOUND_CLAW); break; @@ -370,7 +353,6 @@ bool_ carried_make_attack_normal(int r_idx) { act = "bites you."; do_cut = 1; - touched = TRUE; sound(SOUND_BITE); break; } @@ -378,7 +360,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_STING: { act = "stings you."; - touched = TRUE; sound(SOUND_STING); break; } @@ -393,7 +374,6 @@ bool_ carried_make_attack_normal(int r_idx) { act = "butts you."; do_stun = 1; - touched = TRUE; sound(SOUND_HIT); break; } @@ -402,7 +382,6 @@ bool_ carried_make_attack_normal(int r_idx) { act = "crushes you."; do_stun = 1; - touched = TRUE; sound(SOUND_CRUSH); break; } @@ -410,7 +389,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_ENGULF: { act = "engulfs you."; - touched = TRUE; sound(SOUND_CRUSH); break; } @@ -418,7 +396,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_CHARGE: { act = "charges you."; - touched = TRUE; sound(SOUND_BUY); /* Note! This is "charges", not "charges at". */ break; } @@ -426,7 +403,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBM_CRAWL: { act = "crawls on you."; - touched = TRUE; sound(SOUND_SLIME); break; } @@ -513,9 +489,6 @@ bool_ carried_make_attack_normal(int r_idx) if (act) msg_format("%s %s", sym_name, act); - /* Hack -- assume all attacks are obvious */ - obvious = TRUE; - /* Roll out the damage */ damage = damroll(d_dice, d_side); @@ -524,9 +497,6 @@ bool_ carried_make_attack_normal(int r_idx) { case 0: { - /* Hack -- Assume obvious */ - obvious = TRUE; - /* Hack -- No damage */ damage = 0; @@ -535,9 +505,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_HURT: { - /* Obvious */ - obvious = TRUE; - /* Hack -- Player armor reduces total damage */ damage -= (damage * ((ac < 150) ? ac : 150) / 250); @@ -550,9 +517,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_ABOMINATION: { - /* Obvious */ - obvious = TRUE; - /* Morph, but let mimicry skill have a chance to stop this */ if (magik(60 - get_skill(SKILL_MIMICRY))) { @@ -572,8 +536,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_SANITY: { - obvious = TRUE; - take_sanity_hit(damage, ddesc); break; } @@ -587,10 +549,7 @@ bool_ carried_make_attack_normal(int r_idx) /* Take "poison" effect */ if (!(p_ptr->resist_pois || p_ptr->oppose_pois)) { - if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5)) - { - obvious = TRUE; - } + set_poisoned(p_ptr->poisoned + randint(rlev) + 5); } break; @@ -606,7 +565,7 @@ bool_ carried_make_attack_normal(int r_idx) if (!p_ptr->resist_disen) { /* Apply disenchantment */ - if (apply_disenchant(0)) obvious = TRUE; + apply_disenchant(0); } break; @@ -654,9 +613,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_ACID: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are covered in acid!"); @@ -669,9 +625,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_ELEC: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are struck by electricity!"); @@ -685,9 +638,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_FIRE: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are enveloped in flames!"); @@ -701,9 +651,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_COLD: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are covered with frost!"); @@ -724,10 +671,7 @@ bool_ carried_make_attack_normal(int r_idx) /* Increase "blind" */ if (!p_ptr->resist_blind) { - if (set_blind(p_ptr->blind + 10 + randint(rlev))) - { - obvious = TRUE; - } + set_blind(p_ptr->blind + 10 + randint(rlev)); } @@ -743,10 +687,7 @@ bool_ carried_make_attack_normal(int r_idx) /* Increase "confused" */ if (!p_ptr->resist_conf) { - if (set_confused(p_ptr->confused + 3 + randint(rlev))) - { - obvious = TRUE; - } + set_confused(p_ptr->confused + 3 + randint(rlev)); } @@ -763,19 +704,14 @@ bool_ carried_make_attack_normal(int r_idx) if (p_ptr->resist_fear) { msg_print("You stand your ground!"); - obvious = TRUE; } else if (rand_int(100) < p_ptr->skill_sav) { msg_print("You stand your ground!"); - obvious = TRUE; } else { - if (set_afraid(p_ptr->afraid + 3 + randint(rlev))) - { - obvious = TRUE; - } + set_afraid(p_ptr->afraid + 3 + randint(rlev)); } @@ -795,19 +731,14 @@ bool_ carried_make_attack_normal(int r_idx) if (p_ptr->free_act) { msg_print("You are unaffected!"); - obvious = TRUE; } else if (rand_int(100) < p_ptr->skill_sav) { msg_print("You resist the effects!"); - obvious = TRUE; } else { - if (set_paralyzed(3 + randint(rlev))) - { - obvious = TRUE; - } + set_paralyzed(3 + randint(rlev)); } @@ -821,7 +752,7 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_STR, STAT_DEC_NORMAL); break; } @@ -833,7 +764,7 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_INT, STAT_DEC_NORMAL); break; } @@ -845,7 +776,7 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_WIS, STAT_DEC_NORMAL); break; } @@ -857,7 +788,7 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_DEX, STAT_DEC_NORMAL); break; } @@ -869,7 +800,7 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_CON, STAT_DEC_NORMAL); break; } @@ -881,7 +812,7 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_CHR, STAT_DEC_NORMAL); break; } @@ -893,21 +824,18 @@ bool_ carried_make_attack_normal(int r_idx) take_hit(damage, ddesc); /* Damage (stats) */ - if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_STR, STAT_DEC_NORMAL); + do_dec_stat(A_DEX, STAT_DEC_NORMAL); + do_dec_stat(A_CON, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_CHR, STAT_DEC_NORMAL); break; } case RBE_SHATTER: { - /* Obvious */ - obvious = TRUE; - /* Hack -- Reduce damage based on the player armor class */ damage -= (damage * ((ac < 150) ? ac : 150) / 250); @@ -928,9 +856,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_EXP_10: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ carried_monster_hit = TRUE; take_hit(damage, ddesc); @@ -958,9 +883,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_EXP_20: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ carried_monster_hit = TRUE; take_hit(damage, ddesc); @@ -988,9 +910,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_EXP_40: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ carried_monster_hit = TRUE; take_hit(damage, ddesc); @@ -1018,9 +937,6 @@ bool_ carried_make_attack_normal(int r_idx) case RBE_EXP_80: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ carried_monster_hit = TRUE; take_hit(damage, ddesc); @@ -1055,10 +971,7 @@ bool_ carried_make_attack_normal(int r_idx) /* Take "poison" effect */ if (!(p_ptr->resist_pois || p_ptr->oppose_pois)) { - if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5)) - { - obvious = TRUE; - } + set_poisoned(p_ptr->poisoned + randint(rlev) + 5); } /* Damage CON (10% chance)*/ @@ -1066,16 +979,13 @@ bool_ carried_make_attack_normal(int r_idx) { /* 1% chance for perm. damage */ bool_ perm = (randint(10) == 1); - if (dec_stat(A_CON, randint(10), perm)) obvious = TRUE; + dec_stat(A_CON, randint(10), perm); } break; } case RBE_PARASITE: { - /* Obvious */ - obvious = TRUE; - if (!p_ptr->parasite) set_parasite(damage, r_idx); break; @@ -1088,10 +998,7 @@ bool_ carried_make_attack_normal(int r_idx) /* Increase "image" */ if (!p_ptr->resist_chaos) { - if (set_image(p_ptr->image + 3 + randint(rlev / 2))) - { - obvious = TRUE; - } + set_image(p_ptr->image + 3 + randint(rlev / 2)); } break; @@ -1265,20 +1172,6 @@ bool_ carried_make_attack_normal(int r_idx) /* Apply the stun */ if (k) (void)set_stun(p_ptr->stun + k); } - - if (touched) - { - if (p_ptr->sh_fire && alive) - { - r_ptr->r_flags3 |= RF3_IM_FIRE; - } - - if (p_ptr->sh_elec && alive) - { - r_ptr->r_flags3 |= RF3_IM_ELEC; - } - touched = FALSE; - } } /* Monster missed player */ @@ -1309,21 +1202,6 @@ bool_ carried_make_attack_normal(int r_idx) break; } } - - - /* Analyze "visible" monsters only */ - if (visible) - { - /* Count "obvious" attacks (and ones that cause damage) */ - if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10)) - { - /* Count attacks of this type */ - if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR) - { - r_ptr->r_blows[ap_cnt]++; - } - } - } } /* Assume we attacked */ return (TRUE); @@ -1403,9 +1281,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Scan through all four blows */ for (ap_cnt = 0; ap_cnt < 4; ap_cnt++) { - bool_ visible = FALSE; - bool_ obvious = FALSE; - int power = 0; int damage = 0; @@ -1428,9 +1303,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Handle "leaving" */ if (p_ptr->leaving) break; - /* Extract visibility (before blink) */ - if (m_ptr->ml) visible = TRUE; - /* Extract the attack "power" */ switch (effect) { @@ -1565,9 +1437,6 @@ bool_ make_attack_normal(int m_idx, byte divis) if ((randint(100000) < chance) && (r_ptr->flags3 & (RF3_EVIL))) { - /* Remember the Evil-ness */ - r_ptr->r_flags3 |= (RF3_EVIL); - /* Message */ msg_format("The hand of Eru Iluvatar stops %s blow.", m_name); @@ -1582,12 +1451,6 @@ bool_ make_attack_normal(int m_idx, byte divis) (p_ptr->lev >= rlev) && ((rand_int(100) + p_ptr->lev) > 50)) { - /* Remember the Evil-ness */ - if (m_ptr->ml) - { - r_ptr->r_flags3 |= (RF3_EVIL); - } - /* Message */ msg_format("%^s is repelled.", m_name); @@ -1601,12 +1464,6 @@ bool_ make_attack_normal(int m_idx, byte divis) (p_ptr->lev >= rlev) && ((rand_int(100) + p_ptr->lev) > 50)) { - /* Remember the Good-ness */ - if (m_ptr->ml) - { - r_ptr->r_flags3 |= (RF3_GOOD); - } - /* Message */ msg_format("%^s is repelled.", m_name); @@ -1832,9 +1689,6 @@ bool_ make_attack_normal(int m_idx, byte divis) black_breath_attack(450 - m_ptr->level); } - /* Hack -- assume all attacks are obvious */ - obvious = TRUE; - /* Roll out the damage */ damage = damroll(d_dice, d_side); @@ -1846,9 +1700,6 @@ bool_ make_attack_normal(int m_idx, byte divis) { case 0: { - /* Hack -- Assume obvious */ - obvious = TRUE; - /* Hack -- No damage */ damage = 0; @@ -1857,9 +1708,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_HURT: { - /* Obvious */ - obvious = TRUE; - /* Hack -- Player armor reduces total damage */ damage -= (damage * ((ac < 150) ? ac : 150) / 250); @@ -1871,9 +1719,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_ABOMINATION: { - /* Obvious */ - obvious = TRUE; - /* Morph, but let mimicry skill have a chance to stop this */ if (magik(60 - get_skill(SKILL_MIMICRY))) { @@ -1893,8 +1738,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_SANITY: { - obvious = TRUE; - take_sanity_hit(damage, ddesc); break; } @@ -1907,10 +1750,7 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Take "poison" effect */ if (!(p_ptr->resist_pois || p_ptr->oppose_pois)) { - if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5)) - { - obvious = TRUE; - } + set_poisoned(p_ptr->poisoned + randint(rlev) + 5); } /* Learn about the player */ @@ -1927,8 +1767,7 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Allow complete resist */ if (!p_ptr->resist_disen) { - /* Apply disenchantment */ - if (apply_disenchant(0)) obvious = TRUE; + apply_disenchant(0); } /* Learn about the player */ @@ -1964,9 +1803,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Message */ msg_print("Energy drains from your pack!"); - /* Obvious */ - obvious = TRUE; - /* Heal */ j = rlev; m_ptr->hp += j * o_ptr->pval * o_ptr->number; @@ -1997,9 +1833,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Take some damage */ take_hit(damage, ddesc); - /* Obvious */ - obvious = TRUE; - /* Saving throw (unless paralyzed) based on dex and level */ if (!p_ptr->paralyzed && (rand_int(100) < (adj_dex_safe[p_ptr->stat_ind[A_DEX]] + @@ -2082,9 +1915,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Occasional "blink" anyway */ blinked = TRUE; - /* Obvious */ - obvious = TRUE; - /* Done */ break; } @@ -2157,9 +1987,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Steal the items */ inc_stack_size_ex(i, -1, OPTIMIZE, NO_DESCRIBE); - /* Obvious */ - obvious = TRUE; - /* Blink away */ blinked = TRUE; @@ -2201,9 +2028,6 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Steal the items */ inc_stack_size_ex(i, -1, OPTIMIZE, NO_DESCRIBE); - /* Obvious */ - obvious = TRUE; - /* Done */ break; } @@ -2230,7 +2054,6 @@ bool_ make_attack_normal(int m_idx, byte divis) if (!p_ptr->blind) { msg_print("Your light dims."); - obvious = TRUE; } /* Window stuff */ @@ -2242,9 +2065,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_ACID: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are covered in acid!"); @@ -2259,9 +2079,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_ELEC: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are struck by electricity!"); @@ -2276,9 +2093,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_FIRE: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are enveloped in flames!"); @@ -2293,9 +2107,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_COLD: { - /* Obvious */ - obvious = TRUE; - /* Message */ msg_print("You are covered with frost!"); @@ -2316,10 +2127,7 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Increase "blind" */ if (!p_ptr->resist_blind) { - if (set_blind(p_ptr->blind + 10 + randint(rlev))) - { - obvious = TRUE; - } + set_blind(p_ptr->blind + 10 + randint(rlev)); } /* Learn about the player */ @@ -2336,10 +2144,7 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Increase "confused" */ if (!p_ptr->resist_conf) { - if (set_confused(p_ptr->confused + 3 + randint(rlev))) - { - obvious = TRUE; - } + set_confused(p_ptr->confused + 3 + randint(rlev)); } /* Learn about the player */ @@ -2357,19 +2162,14 @@ bool_ make_attack_normal(int m_idx, byte divis) if (p_ptr->resist_fear) { msg_print("You stand your ground!"); - obvious = TRUE; } else if (rand_int(100) < p_ptr->skill_sav) { msg_print("You stand your ground!"); - obvious = TRUE; } else { - if (set_afraid(p_ptr->afraid + 3 + randint(rlev))) - { - obvious = TRUE; - } + set_afraid(p_ptr->afraid + 3 + randint(rlev)); } /* Learn about the player */ @@ -2390,19 +2190,14 @@ bool_ make_attack_normal(int m_idx, byte divis) if (p_ptr->free_act) { msg_print("You are unaffected!"); - obvious = TRUE; } else if (rand_int(100) < p_ptr->skill_sav) { msg_print("You resist the effects!"); - obvious = TRUE; } else { - if (set_paralyzed(3 + randint(rlev))) - { - obvious = TRUE; - } + set_paralyzed(3 + randint(rlev)); } /* Learn about the player */ @@ -2417,7 +2212,7 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_STR, STAT_DEC_NORMAL); break; } @@ -2428,7 +2223,7 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_INT, STAT_DEC_NORMAL); break; } @@ -2439,7 +2234,7 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_WIS, STAT_DEC_NORMAL); break; } @@ -2450,7 +2245,7 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_DEX, STAT_DEC_NORMAL); break; } @@ -2461,7 +2256,7 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_CON, STAT_DEC_NORMAL); break; } @@ -2472,7 +2267,7 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stat) */ - if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_CHR, STAT_DEC_NORMAL); break; } @@ -2483,21 +2278,18 @@ bool_ make_attack_normal(int m_idx, byte divis) take_hit(damage, ddesc); /* Damage (stats) */ - if (do_dec_stat(A_STR, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_DEX, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_CON, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_INT, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_WIS, STAT_DEC_NORMAL)) obvious = TRUE; - if (do_dec_stat(A_CHR, STAT_DEC_NORMAL)) obvious = TRUE; + do_dec_stat(A_STR, STAT_DEC_NORMAL); + do_dec_stat(A_DEX, STAT_DEC_NORMAL); + do_dec_stat(A_CON, STAT_DEC_NORMAL); + do_dec_stat(A_INT, STAT_DEC_NORMAL); + do_dec_stat(A_WIS, STAT_DEC_NORMAL); + do_dec_stat(A_CHR, STAT_DEC_NORMAL); break; } case RBE_SHATTER: { - /* Obvious */ - obvious = TRUE; - /* Hack -- Reduce damage based on the player armor class */ damage -= (damage * ((ac < 150) ? ac : 150) / 250); @@ -2517,9 +2309,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_EXP_10: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ take_hit(damage, ddesc); @@ -2546,9 +2335,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_EXP_20: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ take_hit(damage, ddesc); @@ -2575,9 +2361,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_EXP_40: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ take_hit(damage, ddesc); @@ -2604,9 +2387,6 @@ bool_ make_attack_normal(int m_idx, byte divis) case RBE_EXP_80: { - /* Obvious */ - obvious = TRUE; - /* Take damage */ take_hit(damage, ddesc); @@ -2639,10 +2419,7 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Take "poison" effect */ if (!(p_ptr->resist_pois || p_ptr->oppose_pois)) { - if (set_poisoned(p_ptr->poisoned + randint(rlev) + 5)) - { - obvious = TRUE; - } + set_poisoned(p_ptr->poisoned + randint(rlev) + 5); } /* Damage CON (10% chance)*/ @@ -2650,7 +2427,7 @@ bool_ make_attack_normal(int m_idx, byte divis) { /* 1% chance for perm. damage */ bool_ perm = (randint(10) == 1); - if (dec_stat(A_CON, randint(10), perm)) obvious = TRUE; + dec_stat(A_CON, randint(10), perm); } break; @@ -2663,10 +2440,7 @@ bool_ make_attack_normal(int m_idx, byte divis) /* Increase "image" */ if (!p_ptr->resist_chaos) { - if (set_image(p_ptr->image + 3 + randint(rlev / 2))) - { - obvious = TRUE; - } + set_image(p_ptr->image + 3 + randint(rlev / 2)); } /* Learn about the player */ @@ -2745,9 +2519,6 @@ bool_ make_attack_normal(int m_idx, byte divis) } case RBE_PARASITE: { - /* Obvious */ - obvious = TRUE; - if (!p_ptr->parasite) set_parasite(damage, m_ptr->r_idx); break; @@ -2877,11 +2648,6 @@ bool_ make_attack_normal(int m_idx, byte divis) alive = FALSE; } } - else - { - if (m_ptr->ml) - r_ptr->r_flags3 |= RF3_IM_FIRE; - } } if (p_ptr->sh_elec && alive) @@ -2896,12 +2662,8 @@ bool_ make_attack_normal(int m_idx, byte divis) alive = FALSE; } } - else - { - if (m_ptr->ml) - r_ptr->r_flags3 |= RF3_IM_ELEC; - } } + if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_COUNTER) && alive) { msg_format("%^s gets bashed by your mystic shield!", m_name); @@ -2912,6 +2674,7 @@ bool_ make_attack_normal(int m_idx, byte divis) alive = FALSE; } } + if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_FIRE) && alive) { if (!(r_ptr->flags3 & RF3_IM_FIRE)) @@ -2924,12 +2687,8 @@ bool_ make_attack_normal(int m_idx, byte divis) alive = FALSE; } } - else - { - if (m_ptr->ml) - r_ptr->r_flags3 |= RF3_IM_FIRE; - } } + if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_GREAT_FIRE) && alive) { msg_format("%^s gets burned by your fiery shield!", m_name); @@ -2940,6 +2699,7 @@ bool_ make_attack_normal(int m_idx, byte divis) alive = FALSE; } } + if (p_ptr->shield && (p_ptr->shield_opt & SHIELD_FEAR) && alive) { int tmp; @@ -2993,21 +2753,6 @@ bool_ make_attack_normal(int m_idx, byte divis) break; } } - - - /* Analyze "visible" monsters only */ - if (visible) - { - /* Count "obvious" attacks (and ones that cause damage) */ - if (obvious || damage || (r_ptr->r_blows[ap_cnt] > 10)) - { - /* Count attacks of this type */ - if (r_ptr->r_blows[ap_cnt] < MAX_UCHAR) - { - r_ptr->r_blows[ap_cnt]++; - } - } - } } @@ -3018,13 +2763,7 @@ bool_ make_attack_normal(int m_idx, byte divis) teleport_away(m_idx, MAX_SIGHT * 2 + 5); } - - /* Always notice cause of death */ - if (death && (r_ptr->r_deaths < MAX_SHORT)) - { - r_ptr->r_deaths++; - } - + /* Fear */ if (m_ptr->ml && fear) { sound (SOUND_FLEE); -- cgit v1.2.3