summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.h
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 12:35:56 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-05-26 12:35:56 +0000
commit760d182372b577060b2a48baef13d97e3f5e11b6 (patch)
treec7ee6b836aa661870f72e57ae162983032c6e5ff /crawl-ref/source/dungeon.h
parent92a5149b413abe69641720581624b5f867e663e5 (diff)
downloadcrawl-ref-760d182372b577060b2a48baef13d97e3f5e11b6.tar.gz
crawl-ref-760d182372b577060b2a48baef13d97e3f5e11b6.zip
Add a "patrolling" flag to monster creation in mapdef and dungeon.cc,
and add it to Orb Guardians in Zot:5. At least in theory, they should now be returning to their starting points if you flee and stay away for long enough. "In theory" because the bad monster pathfinding prevents them from actually finding their way back. We've got the same problem with minotaurs in labyrinths, who've also got this flag set. Because of these restrictions it's almost impossible to test whether it would work without such problems. In any case, it's there for later. Also: spacing and commenting fixes in dungeon.cc. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5253 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.h')
-rw-r--r--crawl-ref/source/dungeon.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/crawl-ref/source/dungeon.h b/crawl-ref/source/dungeon.h
index 06755245f2..fa7ad5e945 100644
--- a/crawl-ref/source/dungeon.h
+++ b/crawl-ref/source/dungeon.h
@@ -127,13 +127,13 @@ class dgn_region
return (xp >= pos.x && xp < pos.x + size.x
&& yp >= pos.y && yp < pos.y + size.y);
}
-
+
bool fully_contains(const coord_def &p) const
{
return (p.x > pos.x && p.x < pos.x + size.x - 1
&& p.y > pos.y && p.y < pos.y + size.y - 1);
}
-
+
bool overlaps(const dgn_region &other) const;
bool overlaps_any(const dgn_region_list &others) const;
bool overlaps(const dgn_region_list &others,
@@ -156,7 +156,7 @@ public:
bool has_exit_from(const coord_def &start);
bool did_leave_vault() const { return left_vault; }
-
+
protected:
bool path_flood(const coord_def &c, const coord_def &dc);
protected:
@@ -275,7 +275,7 @@ bool flood_find<fgrd, bound_check>::path_flood(
}
return (false);
}
-
+
if (needed_features[ grid ])
{
unexplored_place = dc;
@@ -294,7 +294,7 @@ bool flood_find<fgrd, bound_check>::path_flood(
left_vault = true;
good_square(dc);
-
+
return (false);
}
//////////////////////////////////////////////////////////////////////////
@@ -326,7 +326,7 @@ int count_neighbours(int x, int y, dungeon_feature_type feat);
class mons_spec;
bool dgn_place_monster(mons_spec &mspec,
int monster_level, int vx, int vy,
- bool generate_awake);
+ bool generate_awake, bool patrolling = false);
bool set_level_flags(unsigned long flags, bool silent = false);
bool unset_level_flags(unsigned long flags, bool silent = false);