summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells3.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 16:11:35 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-09 16:11:35 +0000
commitdf28b4a38276bd56fdf1512fdebeb7c2707dfc18 (patch)
tree4dedccb038244b00f71205115e0f61dcfb0bafdf /crawl-ref/source/spells3.cc
parentcf3c0bb3c21f28a112f691bdbf9189bb579dc4c4 (diff)
downloadcrawl-ref-df28b4a38276bd56fdf1512fdebeb7c2707dfc18.tar.gz
crawl-ref-df28b4a38276bd56fdf1512fdebeb7c2707dfc18.zip
Add more message fixes for angered monsters.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5656 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r--crawl-ref/source/spells3.cc25
1 files changed, 17 insertions, 8 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc
index 06eba824ae..de6abf84b5 100644
--- a/crawl-ref/source/spells3.cc
+++ b/crawl-ref/source/spells3.cc
@@ -1133,11 +1133,12 @@ bool cast_twisted_resurrection(int pow, bool god_gift)
(rotted >= random2(how_many_corpses)) ? RED
: LIGHTRED;
- const int monster = create_monster(
- mgen_data(mon, BEH_FRIENDLY, 0,
- you.pos(), you.pet_target,
- god_gift ? MG_GOD_GIFT : 0,
- MONS_PROGRAM_BUG, 0, colour));
+ const int monster =
+ create_monster(
+ mgen_data(mon, BEH_FRIENDLY, 0,
+ you.pos(), you.pet_target,
+ (god_gift ? MG_GOD_GIFT : 0) | MG_FORCE_BEH,
+ MONS_PROGRAM_BUG, 0, colour));
if (monster == -1)
{
@@ -1166,6 +1167,8 @@ bool cast_twisted_resurrection(int pow, bool god_gift)
menv[monster].ac += total_mass / 1000;
}
+ player_angers_monster(&menv[monster]);
+
return (true);
}
@@ -1178,17 +1181,23 @@ bool cast_summon_wraiths(int pow, bool god_gift)
(chance > 3) ? MONS_FREEZING_WRAITH // 20%
: MONS_SPECTRAL_WARRIOR); // 16%
- const bool friendly = (random2(pow) > 5);
+ bool friendly = (random2(pow) > 5);
- if (create_monster(
+ const int monster =
+ create_monster(
mgen_data(mon,
friendly ? BEH_FRIENDLY : BEH_HOSTILE,
5, you.pos(),
friendly ? you.pet_target : MHITYOU,
- god_gift ? MG_GOD_GIFT : 0)) != -1)
+ (god_gift ? MG_GOD_GIFT : 0) | MG_FORCE_BEH));
+
+ if (monster != -1)
{
success = true;
+ if (player_angers_monster(&menv[monster]))
+ friendly = false;
+
mpr(friendly ? "An insubstantial figure forms in the air."
: "You sense a hostile presence.");
}