diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-15 12:42:37 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-15 12:42:37 +0000 |
commit | 94ecb28d87ead9a3d77f2bbecc59eb8cc978d95c (patch) | |
tree | 772de64bfd8b558a1ee04307191c5fa8a9177001 /crawl-ref/source/fight.cc | |
parent | 78db5db504f491e368f4fdef6dff4976cb003951 (diff) | |
download | crawl-ref-94ecb28d87ead9a3d77f2bbecc59eb8cc978d95c.tar.gz crawl-ref-94ecb28d87ead9a3d77f2bbecc59eb8cc978d95c.zip |
Fix tutorial message about gaining a skill being shown outside tutorial.
Move damage reduction for petrified monsters out of the stab check and
into the general damage calculation. Still 1/3.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5846 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index bce2727800..1c92ab90c1 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1286,7 +1286,7 @@ void melee_attack::player_warn_miss() { did_hit = false; - // upset only non-sleeping monsters if we missed + // Upset only non-sleeping monsters if we missed. if (def->behaviour != BEH_SLEEP) behaviour_event( def, ME_WHACK, MHITYOU ); @@ -1496,7 +1496,7 @@ int melee_attack::player_stab(int damage) // The stabbing message looks better here: if (stab_attempt) { - // construct reasonable message + // Construct reasonable message. stab_message( def, stab_bonus ); exercise(SK_STABBING, 1 + random2avg(5, 4)); @@ -1506,14 +1506,14 @@ int melee_attack::player_stab(int damage) else { stab_bonus = 0; - // ok.. if you didn't backstab, you wake up the neighborhood. + // Ok.. if you didn't backstab, you wake up the neighborhood. // I can live with that. alert_nearby_monsters(); } if (stab_bonus) { - // lets make sure we have some damage to work with... + // Lets make sure we have some damage to work with... if (damage < 1) damage = 1; @@ -1532,8 +1532,6 @@ int melee_attack::player_stab(int damage) } damage = player_stab_weapon_bonus(damage); - if (mons_is_petrified(def)) - damage /= 3; } return (damage); @@ -1543,7 +1541,7 @@ int melee_attack::player_apply_monster_ac(int damage) { if (stab_bonus) { - // when stabbing we can get by some of the armour + // When stabbing we can get by some of the armour. if (def->ac > 0) { const int ac = def->ac @@ -1555,11 +1553,14 @@ int melee_attack::player_apply_monster_ac(int damage) } else { - // apply AC normally + // Apply AC normally. if (def->ac > 0) damage -= random2(1 + def->ac); } + if (mons_is_petrified(def)) + damage /= 3; + return (damage); } @@ -2671,7 +2672,8 @@ void melee_attack::player_calc_hit_damage() damage_done = player_stab(damage_done); damage_done = player_apply_monster_ac(damage_done); - // This doesn't actually modify damage -- bwr + // This doesn't actually modify damage. -- bwr + // It only chooses the appropriate verb. damage_done = player_weapon_type_modify( damage_done ); if (damage_done < 0) @@ -3949,7 +3951,7 @@ void melee_attack::mons_check_attack_perceived() { interrupt_activity(AI_MONSTER_ATTACKS, atk); - // if a friend wants to help, they can attack <monster_attacking> + // If a friend wants to help, they can attack the attacking monster. if (you.pet_target == MHITNOT) you.pet_target = monster_index(atk); } |