summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/item_use.cc11
-rw-r--r--crawl-ref/source/monstuff.cc7
2 files changed, 12 insertions, 6 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index b50de889d3..fe1a1c8bdf 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4857,11 +4857,15 @@ void read_scroll(int slot)
break;
case SCR_SUMMONING:
- if (create_monster(
- mgen_data(MONS_ABOMINATION_SMALL, BEH_FRIENDLY,
- 0, 0, you.pos(), you.pet_target)) != -1)
+ {
+ const int monster = create_monster(
+ mgen_data(MONS_ABOMINATION_SMALL, BEH_FRIENDLY,
+ 0, 0, you.pos(), you.pet_target,
+ MG_FORCE_BEH));
+ if (monster != -1)
{
mpr("A horrible Thing appears!");
+ player_angers_monster(&menv[monster]);
}
else
{
@@ -4869,6 +4873,7 @@ void read_scroll(int slot)
id_the_scroll = false;
}
break;
+ }
case SCR_FOG:
mpr("The scroll dissolves into smoke.");
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 657b385573..efe77740e2 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -5772,14 +5772,15 @@ static bool _handle_scroll(monsters *monster)
if (mons_near(monster))
{
simple_monster_message(monster, " reads a scroll.");
- int mon = create_monster(
+ const int mon = create_monster(
mgen_data(MONS_ABOMINATION_SMALL, SAME_ATTITUDE(monster),
- 0, 0, monster->pos(), monster->foe));
+ 0, 0, monster->pos(), monster->foe, MG_FORCE_BEH));
read = true;
if (mon != -1 && you.can_see(&menv[mon]))
{
- ident = ID_KNOWN_TYPE;
mprf("%s appears!", menv[mon].name(DESC_CAP_A).c_str());
+ ident = ID_KNOWN_TYPE;
+ player_angers_monster(&menv[mon]);
}
else if (you.can_see(monster))
canned_msg(MSG_NOTHING_HAPPENS);