summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-08 03:11:37 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-08 03:11:37 +0000
commitc2828b086fcebd014d25b64a34bd118db2021bd4 (patch)
tree224473bea83c3f105bef50e81df1ccdcd9d4b578 /crawl-ref/source/fight.cc
parent441574bfa280b63cbe6d84a8ba1f8656ca5e1ded (diff)
downloadcrawl-ref-c2828b086fcebd014d25b64a34bd118db2021bd4.tar.gz
crawl-ref-c2828b086fcebd014d25b64a34bd118db2021bd4.zip
Make attacks on paralyzed monsters count as stabbing.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4125 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc16
1 files changed, 12 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index 998a3147e4..a57e4ec095 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1390,7 +1390,7 @@ int melee_attack::player_stab_weapon_bonus(int damage)
bonus /= 2;
bonus = stepdown_value( bonus, 10, 10, 30, 30 );
-
+
damage += bonus;
}
// fall through
@@ -1433,14 +1433,14 @@ int melee_attack::player_stab(int damage)
// lets make sure we have some damage to work with...
if (damage < 1)
damage = 1;
-
+
if (def->behaviour == BEH_SLEEP)
{
// Sleeping moster wakes up when stabbed but may be groggy
if (random2(200) <= you.skills[SK_STABBING] + you.dex)
{
int stun = random2( you.dex + 1 );
-
+
if (def->speed_increment > stun)
def->speed_increment -= stun;
else
@@ -2748,7 +2748,7 @@ void melee_attack::player_stab_check()
}
// confused (but not perma-confused)
- if (def->has_ench(ENCH_CONFUSION)
+ if (def->has_ench(ENCH_CONFUSION)
&& !mons_class_flag(def->type, M_CONFUSED))
{
stab_attempt = true;
@@ -2770,6 +2770,14 @@ void melee_attack::player_stab_check()
stab_bonus = 2;
}
+ // paralysed
+ if (def->has_ench(ENCH_PARALYSIS))
+ {
+ stab_attempt = true;
+ roll_needed = false;
+ stab_bonus = 1;
+ }
+
// sleeping
if (def->behaviour == BEH_SLEEP)
{