summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monplace.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 11:22:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 11:22:35 +0000
commit92a5149b413abe69641720581624b5f867e663e5 (patch)
treed84e98dc32f8c68121ee4d4085f035008a4f04f0 /crawl-ref/source/monplace.cc
parentf910f85b74d9dae832f8d3422f51d87565ea3a08 (diff)
downloadcrawl-ref-92a5149b413abe69641720581624b5f867e663e5.tar.gz
crawl-ref-92a5149b413abe69641720581624b5f867e663e5.zip
Make patrolling monster movement more natural: don't always return to
the patrol centre, make it more likely to return to the patrol area if the monster left it somehow but is still nearby, and make friendly monsters move around the player on their way to their target. Also, highlight wizard commands in the wizard help. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5252 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monplace.cc')
-rw-r--r--crawl-ref/source/monplace.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/crawl-ref/source/monplace.cc b/crawl-ref/source/monplace.cc
index 2eb7eb29ae..4c9af2a0ff 100644
--- a/crawl-ref/source/monplace.cc
+++ b/crawl-ref/source/monplace.cc
@@ -188,8 +188,8 @@ static void hell_spawn_random_monsters()
if (one_chance_in(genodds))
{
mgen_data mg(WANDERING_MONSTER);
- mg.proximity =
- (one_chance_in(10) ? PROX_NEAR_STAIRS : PROX_AWAY_FROM_PLAYER);
+ mg.proximity = (one_chance_in(10) ? PROX_NEAR_STAIRS
+ : PROX_AWAY_FROM_PLAYER);
mons_place(mg);
viewwindow(true, false);
}
@@ -1737,12 +1737,12 @@ int mons_place( mgen_data mg )
mg.cls = RANDOM_MONSTER;
}
- // all monsters have been assigned? {dlb}
+ // All monsters have been assigned? {dlb}
if (mon_count >= MAX_MONSTERS - 1)
return (-1);
- // this gives a slight challenge to the player as they ascend the
- // dungeon with the Orb
+ // This gives a slight challenge to the player as they ascend the
+ // dungeon with the Orb.
if (you.char_direction == GDT_ASCENDING && mg.cls == RANDOM_MONSTER
&& you.level_type == LEVEL_DUNGEON && !mg.summoned())
{
@@ -1776,8 +1776,8 @@ int mons_place( mgen_data mg )
monsters *creation = &menv[mid];
- // look at special cases: CHARMED, FRIENDLY, HOSTILE, GOD_GIFT
- // alert summoned being to player's presence
+ // Look at special cases: CHARMED, FRIENDLY, HOSTILE, GOD_GIFT.
+ // Alert summoned being to player's presence.
if (mg.behaviour > NUM_BEHAVIOURS)
{
if (mg.behaviour == BEH_FRIENDLY || mg.behaviour == BEH_GOD_GIFT)
@@ -1801,6 +1801,10 @@ int mons_place( mgen_data mg )
if (creation->type == MONS_RAKSHASA_FAKE && !one_chance_in(3))
creation->add_ench(ENCH_INVIS);
}
+
+ if (mg.needs_patrol_point())
+ creation->patrol_point = coord_def(creation->x, creation->y);
+
return (mid);
}