summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/dungeon.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-01 14:32:57 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-01 14:32:57 +0000
commit6e6f15e72a505631d8ce778da9a54024c774bfc9 (patch)
tree9524dcc562497091bb1964d601717b1756944e0a /crawl-ref/source/dungeon.cc
parent033b2f5904e3a87e5ce2605b2779be860bf46682 (diff)
downloadcrawl-ref-6e6f15e72a505631d8ce778da9a54024c774bfc9.tar.gz
crawl-ref-6e6f15e72a505631d8ce778da9a54024c774bfc9.zip
Fix wizard mode being unable to create monsters of nonfloor habitat.
Changed labyrinth handling for minotaurs: Instead of being magic mappable, labyrinths are plain mappable. Yes, that makes everything much easier, but allowing magic mapping and yet you still have to trudge along by hand (rather than use autotravel) is worse. To make up for it, we might want to boost the monster minotaur (trying to defend its home against a rival?) Or we could just remove the difference altogether... Cleaned up debug.cc a bit. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5401 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r--crawl-ref/source/dungeon.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc
index 5ab12f34b2..0e42db0004 100644
--- a/crawl-ref/source/dungeon.cc
+++ b/crawl-ref/source/dungeon.cc
@@ -763,14 +763,13 @@ static void _reset_level()
// Set default level flags.
if (you.level_type == LEVEL_DUNGEON)
env.level_flags = branches[you.where_are_you].default_level_flags;
- else if (you.level_type == LEVEL_LABYRINTH
- || you.level_type == LEVEL_ABYSS)
+ else if (you.level_type == LEVEL_LABYRINTH || you.level_type == LEVEL_ABYSS)
{
- env.level_flags = LFLAG_NO_TELE_CONTROL | LFLAG_NOT_MAPPABLE;
+ env.level_flags = LFLAG_NO_TELE_CONTROL | LFLAG_NO_MAGIC_MAP;
- // Labyrinths are *only* magic mappable for minotaurs.
+ // Labyrinths are *only* mappable for minotaurs.
if (you.level_type != LEVEL_LABYRINTH || you.species != SP_MINOTAUR)
- env.level_flags |= LFLAG_NO_MAGIC_MAP;
+ env.level_flags |= LFLAG_NOT_MAPPABLE;
}
else
env.level_flags = 0;
@@ -4534,7 +4533,7 @@ static void _dgn_give_mon_spec_items(mons_spec &mspec,
bool dgn_place_monster(mons_spec &mspec,
- int monster_level, int vx, int vy,
+ int monster_level, int vx, int vy, bool force_pos,
bool generate_awake, bool patrolling)
{
if (mspec.mid != -1)
@@ -4576,10 +4575,11 @@ bool dgn_place_monster(mons_spec &mspec,
mg.number = mspec.number;
mg.colour = mspec.colour;
mg.pos = coord_def(vx, vy);
+
if (m_patrolling)
mg.flags |= MG_PATROLLING;
- const int mindex = place_monster(mg);
+ const int mindex = place_monster(mg, true);
if (mindex != -1)
{
if (mspec.items.size() > 0)
@@ -4599,8 +4599,8 @@ static bool _dgn_place_monster( const vault_placement &place, mons_spec &mspec,
const bool patrolling
= mspec.patrolling || place.map.has_tag("patrolling");
- return dgn_place_monster(mspec, monster_level, vx, vy, generate_awake,
- patrolling);
+ return dgn_place_monster(mspec, monster_level, vx, vy, false,
+ generate_awake, patrolling);
}
static bool _dgn_place_one_monster( const vault_placement &place,