From df28b4a38276bd56fdf1512fdebeb7c2707dfc18 Mon Sep 17 00:00:00 2001 From: dolorous Date: Mon, 9 Jun 2008 16:11:35 +0000 Subject: 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 --- crawl-ref/source/spells3.cc | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/spells3.cc') 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."); } -- cgit v1.2.3-54-g00ecf