diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/mon-util.cc | 19 | ||||
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/ouch.cc | 8 |
3 files changed, 30 insertions, 7 deletions
diff --git a/crawl-ref/source/mon-util.cc b/crawl-ref/source/mon-util.cc index c49abd1bd9..655c8f429a 100644 --- a/crawl-ref/source/mon-util.cc +++ b/crawl-ref/source/mon-util.cc @@ -2015,6 +2015,25 @@ bool ms_waste_of_time( const monsters *mon, spell_type monspell ) // handled here as well. -- bwr switch (monspell) { + case SPELL_BOLT_OF_DRAINING: + case SPELL_AGONY: + case SPELL_SYMBOL_OF_TORMENT: + { + if (!foe) + return (true); + + // Check if the foe *appears* to be immune to negative energy. + // We can't just use foe->res_negative_energy() because + // that'll mean monsters can just "know" the player is fully + // life-protected if he has triple life protection. + const mon_holy_type holy = foe->holiness(); + return (holy == MH_UNDEAD || holy == MH_DEMONIC + || holy == MH_NONLIVING || holy == MH_PLANT); + } + + case SPELL_DISPEL_UNDEAD: + return (!foe || foe->holiness() != MH_UNDEAD); + case SPELL_BACKLIGHT: { ret = !foe || foe->backlit(); diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 07147b54c1..0d043a6451 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1638,6 +1638,16 @@ bolt mons_spells( int spell_cast, int power ) beam.is_beam = false; break; + case SPELL_DISPEL_UNDEAD: + beam.name = "0"; + beam.flavour = BEAM_DISPEL_UNDEAD; + beam.thrower = KILL_MON_MISSILE; + beam.range = 7 + random2(8); + beam.rangeMax = 9; + beam.damage = dice_def( 3, std::min(6 + power / 7, 40) ); + beam.is_beam = true; + break; + case SPELL_PARALYSE: beam.name = "0"; beam.range = 5; diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 2d7d5b5348..589973fcd3 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -131,19 +131,13 @@ int check_your_resists(int hurted, beam_type flavour) case BEAM_COLD: hurted = resist_adjust_damage(&you, flavour, - player_res_fire(), hurted, true); - resist = player_res_cold(); + player_res_cold(), hurted, true); if (hurted < original) - { canned_msg(MSG_YOU_RESIST); - hurted /= (1 + (resist * resist)); - } else if (hurted > original) { mpr("You feel a terrible chill!"); xom_is_stimulated(200); - hurted *= 15; - hurted /= 10; } break; |