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>2008-12-06 19:03:47 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-12-06 19:03:47 +0000
commita7015583f900105e73b7dd65e0f7ee850bffbb24 (patch)
tree9958ef3bdb6132c664c2418f4ffca773812d3fbc /crawl-ref/source/fight.cc
parent63560aa98cbcbc1fc43ee3288ab72c32f3221eaa (diff)
downloadcrawl-ref-a7015583f900105e73b7dd65e0f7ee850bffbb24.tar.gz
crawl-ref-a7015583f900105e73b7dd65e0f7ee850bffbb24.zip
Try harder to make rock worms stay in rock until you actually lure them
out into the open. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7758 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r--crawl-ref/source/fight.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc
index ae21356345..83e1c6a377 100644
--- a/crawl-ref/source/fight.cc
+++ b/crawl-ref/source/fight.cc
@@ -1852,7 +1852,7 @@ bool melee_attack::player_monattk_hit_effects(bool mondied)
void melee_attack::_monster_die(monsters* monster, killer_type killer,
int killer_index)
{
- const bool chaos = damage_brand == SPWPN_CHAOS;
+ const bool chaos = (damage_brand == SPWPN_CHAOS);
// Copy defender before it gets reset by monster_die()
monsters* def_copy = NULL;
@@ -2431,7 +2431,7 @@ int melee_attack::random_chaos_brand()
int brands[] = {SPWPN_FLAMING, SPWPN_FREEZING, SPWPN_ELECTROCUTION,
SPWPN_VENOM, SPWPN_DRAINING, SPWPN_VAMPIRICISM,
SPWPN_PAIN, SPWPN_DISTORTION, SPWPN_CONFUSE,
- SPWPN_CHAOS};
+ SPWPN_CHAOS, SPWPN_NORMAL};
return (RANDOM_ELEMENT(brands));
}
@@ -2448,11 +2448,12 @@ bool melee_attack::apply_damage_brand()
bool brand_was_known = false;
if (weapon)
+ {
if (is_random_artefact(*weapon))
brand_was_known = randart_known_wpn_property(*weapon, RAP_BRAND);
else
brand_was_known = item_type_known(*weapon);
-
+ }
bool ret = false;
// Monster resistance to the brand.
@@ -2467,6 +2468,8 @@ bool melee_attack::apply_damage_brand()
else
brand = damage_brand;
+ mprf(MSGCH_DIAGNOSTICS, "brand = %d", brand);
+
switch (brand)
{
case SPWPN_FLAMING:
@@ -2703,11 +2706,12 @@ bool melee_attack::apply_damage_brand()
}
if (attacker->atype() == ACT_PLAYER && damage_brand == SPWPN_CHAOS)
+ {
// If your god objects to using chaos then it makes the
// brand obvious.
if (did_god_conduct(DID_CHAOS, 2 + random2(3), brand_was_known))
obvious_effect = true;
-
+ }
if (!obvious_effect)
obvious_effect = !special_damage_message.empty();