|
From: <gi...@cr...> - 2012-02-28 17:48:33
|
via 28819cb77ceb5f7688fc0b8bd1a804f2e725ebd8 (commit)
via c04e5462e3e615079396f837c8b413226ff09413 (commit)
from 1deeae5ee24f35eaec9989fcf4c5d22020e93a8f (commit)
-----------------------------------------------------------------------
commit 28819cb77ceb5f7688fc0b8bd1a804f2e725ebd8
Author: David Lawrence Ramsey <dol...@us...>
Date: Tue Feb 28 11:45:17 2012 -0600
Add formatting fixes.
commit c04e5462e3e615079396f837c8b413226ff09413
Author: David Lawrence Ramsey <dol...@us...>
Date: Tue Feb 28 11:40:49 2012 -0600
Clean up monster scroll-blinking a bit more.
The scroll should count as read whether it succeeded or not, as is done
for e.g. a scroll of summoning.
-----------------------------------------------------------------------
Summary of changes:
crawl-ref/source/mon-act.cc | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 2457824..55bbbbf 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -875,13 +875,12 @@ static bool _handle_scroll(monster* mons)
case SCR_TELEPORTATION:
if (!mons->has_ench(ENCH_TP))
{
- if (mons->caught() || mons_is_fleeing(mons)
- || mons->pacified())
+ if (mons->caught() || mons_is_fleeing(mons) || mons->pacified())
{
simple_monster_message(mons, " reads a scroll.");
- monster_teleport(mons, false);
- read = true;
+ read = true;
ident = ID_KNOWN_TYPE;
+ monster_teleport(mons, false);
}
}
break;
@@ -891,12 +890,14 @@ static bool _handle_scroll(monster* mons)
&& mons_near(mons))
{
simple_monster_message(mons, " reads a scroll.");
+ read = true;
if (mons->caught())
+ {
+ ident = ID_KNOWN_TYPE;
monster_blink(mons);
- else if (!blink_away(mons))
- break;
- read = true;
- ident = ID_KNOWN_TYPE;
+ }
+ else if (blink_away(mons))
+ ident = ID_KNOWN_TYPE;
}
break;
@@ -912,8 +913,8 @@ static bool _handle_scroll(monster* mons)
{
if (you.can_see(mon))
{
- mprf("%s appears!", mon->name(DESC_A).c_str());
ident = ID_KNOWN_TYPE;
+ mprf("%s appears!", mon->name(DESC_A).c_str());
}
player_angers_monster(mon);
}
--
Dungeon Crawl Stone Soup
|