diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-07 17:42:51 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-07 17:42:51 +0000 |
commit | b06697749c94d7ef021b6b7224df1a05dde6f7c4 (patch) | |
tree | 361fa887c793e5b0a7ec9d06f04108d92949691c /crawl-ref/source/fight.cc | |
parent | 95367a34cdd01b1e436f31a169626f68175330c4 (diff) | |
download | crawl-ref-b06697749c94d7ef021b6b7224df1a05dde6f7c4.tar.gz crawl-ref-b06697749c94d7ef021b6b7224df1a05dde6f7c4.zip |
Poison resistance was being misapplied for monsters, fixed.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1258 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index a8de265865..4523166154 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2674,10 +2674,13 @@ void melee_attack::wasp_paralyse_defender() if (attacker->id() == MONS_YELLOW_WASP) paralyse_roll += 3; - if (!defender->res_poison() && one_chance_in(paralyse_roll)) - defender->paralyse( roll_dice(1, 3) ); - else - defender->slow_down( roll_dice(1, 3) ); + if (defender->res_poison() <= 0) + { + if (one_chance_in(paralyse_roll)) + defender->paralyse( roll_dice(1, 3) ); + else + defender->slow_down( roll_dice(1, 3) ); + } } void melee_attack::splash_monster_with_acid(int strength) @@ -2845,7 +2848,7 @@ void melee_attack::mons_apply_attack_flavour(const mon_attack_def &attk) case AF_CONFUSE: if (attk.type == AT_SPORE) { - if (defender->res_poison()) + if (defender->res_poison() > 0) break; if (--atk->hit_dice <= 0) |