diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/monstuff.cc | 3 | ||||
-rw-r--r-- | crawl-ref/source/spells3.cc | 25 |
2 files changed, 19 insertions, 9 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 7d4a331074..09f156a371 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -1689,8 +1689,9 @@ bool monster_polymorph( monsters *monster, monster_type targetc, } player_angers_monster(monster); + return (player_messaged); -} // end monster_polymorph() +} bool monster_blink(monsters *monster) { 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."); } |