summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells2.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-19 17:15:42 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-19 17:15:42 +0000
commita06c2f795ee9726b7b3b9890a6a9b46d932745fe (patch)
tree38b0388485590eeb8350511d0a2253c12c924d04 /crawl-ref/source/spells2.cc
parentd51dd4717c3e7842d0647c58de13863e0c9491d6 (diff)
downloadcrawl-ref-a06c2f795ee9726b7b3b9890a6a9b46d932745fe.tar.gz
crawl-ref-a06c2f795ee9726b7b3b9890a6a9b46d932745fe.zip
Handle burning/freezing, smiting, and airstriking the same way as beams:
the attacked god gift stays, while the others disappear. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5131 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells2.cc')
-rw-r--r--crawl-ref/source/spells2.cc16
1 files changed, 10 insertions, 6 deletions
diff --git a/crawl-ref/source/spells2.cc b/crawl-ref/source/spells2.cc
index 6e90afa632..a86da4b960 100644
--- a/crawl-ref/source/spells2.cc
+++ b/crawl-ref/source/spells2.cc
@@ -1150,7 +1150,6 @@ int vampiric_drain(int pow, const dist &vmove)
char burn_freeze(int pow, beam_type flavour)
{
int mgr = NON_MONSTER;
- struct monsters *monster = 0; // NULL {dlb}
struct dist bmove;
if (pow > 25)
@@ -1189,7 +1188,7 @@ char burn_freeze(int pow, beam_type flavour)
}
}
- monster = &menv[mgr];
+ monsters *monster = &menv[mgr];
mprf("You %s %s.",
(flavour == BEAM_FIRE) ? "burn" :
@@ -1210,19 +1209,24 @@ char burn_freeze(int pow, beam_type flavour)
if (hurted)
{
+ god_conduct_trigger conduct;
+ conduct.enabled = false;
+
if (mons_friendly(monster))
- did_god_conduct(DID_ATTACK_FRIEND, 5, true, monster);
+ conduct.set(DID_ATTACK_FRIEND, 5, true, monster);
else if (mons_neutral(monster))
- did_god_conduct(DID_ATTACK_NEUTRAL, 5, true, monster);
+ conduct.set(DID_ATTACK_NEUTRAL, 5, true, monster);
if (is_unchivalric_attack(&you, monster, monster))
- did_god_conduct(DID_UNCHIVALRIC_ATTACK, 5, true, monster);
+ conduct.set(DID_UNCHIVALRIC_ATTACK, 5, true, monster);
if (mons_is_holy(monster))
- did_god_conduct(DID_ATTACK_HOLY, monster->hit_dice);
+ conduct.set(DID_ATTACK_HOLY, monster->hit_dice);
behaviour_event(monster, ME_ANNOY, MHITYOU);
+ conduct.enabled = true;
+
hurt_monster(monster, hurted);
if (monster->hit_points < 1)