diff options
Diffstat (limited to 'crawl-ref/source/ouch.cc')
-rw-r--r-- | crawl-ref/source/ouch.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 91753b5ff0..69bba8b5dc 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -943,6 +943,17 @@ void ouch(int dam, int death_source, kill_method_type death_type, if (dam != INSTANT_DEATH) { + if (player_spirit_shield() && death_type != KILLED_BY_POISON) + { + if (dam <= you.magic_points) + { + dec_mp(dam); + return; + } + dam -= you.magic_points; + dec_mp(you.magic_points); + } + if (dam >= you.hp) { if (harm_protection_type hpt = god_protects_from_harm(you.religion)) |