summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/fight.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-20 18:01:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-20 18:01:09 +0000
commitd9dd888a10a3087d3ec5cf82364cfd6495abd3e4 (patch)
tree6acddf0f589891b2925f7653208ba2e29d1478d6 /crawl-ref/source/fight.cc
parentbb3b8b8286b84de95546d1121d0c305bbdc85851 (diff)
downloadcrawl-ref-d9dd888a10a3087d3ec5cf82364cfd6495abd3e4.tar.gz
crawl-ref-d9dd888a10a3087d3ec5cf82364cfd6495abd3e4.zip
* 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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc17
1 files changed, 14 insertions, 3 deletions
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;