summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-13 20:40:39 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-13 20:40:39 +0000
commit9fecb788095cc5315ef5f1485e0b736563a21460 (patch)
tree4dd717741b428607d8b91ce4a5dd05044c2e0d2f /crawl-ref/source/monstuff.cc
parentcab797009b47f77520b8db9f8b427ba9ea14f63c (diff)
downloadcrawl-ref-9fecb788095cc5315ef5f1485e0b736563a21460.tar.gz
crawl-ref-9fecb788095cc5315ef5f1485e0b736563a21460.zip
* Add stair repelling as a bad Xom effect.
* Experimentally make tension increase the odds for good effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9600 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc11
1 files changed, 4 insertions, 7 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index c5948c9bef..e58056765b 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2201,13 +2201,16 @@ static coord_def _random_monster_nearby_habitable_space(const monsters& mon,
return (target);
}
-bool monster_blink(monsters *monster)
+bool monster_blink(monsters *monster, bool quiet)
{
coord_def near = _random_monster_nearby_habitable_space(*monster, false,
true);
if (near == monster->pos())
return (false);
+ if (!quiet)
+ simple_monster_message(monster, " blinks!");
+
if (!(monster->flags & MF_WAS_IN_VIEW))
monster->seen_context = "thin air";
@@ -5627,10 +5630,7 @@ static bool _handle_special_ability(monsters *monster, bolt & beem)
case MONS_KILLER_KLOWN:
case MONS_PRINCE_RIBBIT:
if (one_chance_in(7) || mons_is_caught(monster) && one_chance_in(3))
- {
- simple_monster_message(monster, " blinks.");
used = monster_blink(monster);
- }
break;
case MONS_MANTICORE:
@@ -6011,7 +6011,6 @@ static bool _handle_scroll(monsters *monster)
if (mons_near(monster))
{
simple_monster_message(monster, " reads a scroll.");
- simple_monster_message(monster, " blinks!");
monster_blink(monster);
read = true;
ident = ID_KNOWN_TYPE;
@@ -6602,8 +6601,6 @@ static bool _handle_spell(monsters *monster, bolt &beem)
if (monsterNearby)
{
mons_cast_noise(monster, beem, spell_cast);
-
- simple_monster_message(monster, " blinks!");
monster_blink(monster);
monster->lose_energy(EUT_SPELL);