From d9dd888a10a3087d3ec5cf82364cfd6495abd3e4 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 20 Apr 2009 18:01:09 +0000 Subject: * Fix database search crashing on pandemonium demons/player ghost. * Make Xom say e.g. "gate" for the repel stair effect if there's only a gate nearby. * Weapons of vampiricism have no effect on summoned creatures, as is already the case for Vampire bites and the Vampiric Draining spell. * Make berserking monsters immune to fear. (The sanctuary still works.) * General clean-up. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9669 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index f298b1ad60..a6c7a07e14 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -2921,8 +2921,15 @@ int melee_attack::random_chaos_brand() if (defender->holiness() == MH_UNDEAD) susceptible = false; break; - case SPWPN_DRAINING: case SPWPN_VAMPIRICISM: + if (defender->atype() != ACT_PLAYER + && defender_as_monster()->is_summoned()) + { + susceptible = false; + break; + } + // intentional fall-through + case SPWPN_DRAINING: if (defender->holiness() != MH_NATURAL) susceptible = false; break; @@ -3097,8 +3104,10 @@ bool melee_attack::apply_damage_brand() if (defender->atype() == ACT_PLAYER) old_poison = you.duration[DUR_POISONING]; else + { old_poison = (defender_as_monster()->get_ench(ENCH_POISON)).degree; + } // Poison monster message needs to arrive after hit message. emit_nodmg_hit_message(); @@ -3141,8 +3150,10 @@ bool melee_attack::apply_damage_brand() if (x_chance_in_y(defender->res_negative_energy(), 3)) break; - if (defender->holiness() != MH_NATURAL || !weapon - || damage_done < 1 || attacker->stat_hp() == attacker->stat_maxhp() + if (!weapon || defender->holiness() != MH_NATURAL || damage_done < 1 + || attacker->stat_hp() == attacker->stat_maxhp() + || defender->atype() != ACT_PLAYER + && defender_as_monster()->is_summoned() || one_chance_in(5)) { break; -- cgit v1.2.3-54-g00ecf