diff options
author | Stefan O'Rear <stefanor@cox.net> | 2009-11-08 15:29:05 -0800 |
---|---|---|
committer | Stefan O'Rear <stefanor@cox.net> | 2009-11-08 15:29:54 -0800 |
commit | 444cf58a14428a88d0adb4f36f694da950e4d46a (patch) | |
tree | da0a6c20eb11c18e1d21c37bb5aafb338fea5288 /crawl-ref/source/monster.cc | |
parent | 7eb0ec4b7f8ef0b96a54ddb5626f71084213bf4f (diff) | |
download | crawl-ref-444cf58a14428a88d0adb4f36f694da950e4d46a.tar.gz crawl-ref-444cf58a14428a88d0adb4f36f694da950e4d46a.zip |
Add hooks to evasion for observing the size of modifiers
Diffstat (limited to 'crawl-ref/source/monster.cc')
-rw-r--r-- | crawl-ref/source/monster.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/monster.cc b/crawl-ref/source/monster.cc index cf1e224d29..3a54692345 100644 --- a/crawl-ref/source/monster.cc +++ b/crawl-ref/source/monster.cc @@ -2901,9 +2901,13 @@ int monsters::armour_class() const return (ac); } -int monsters::melee_evasion(const actor *act) const +int monsters::melee_evasion(const actor *act, ev_ignore_type evit) const { int evasion = ev; + + if (evit & EV_IGNORE_HELPLESS) + return (evasion); + if (paralysed() || asleep()) evasion = 0; else if (caught()) |