summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/debug.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-21 09:07:46 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-21 09:07:46 +0000
commit71509500b1ec921faf74b64f7bcad6ab96ab6f51 (patch)
tree92d6c1085738a847aa8a45a91038b1a0806b04bd /crawl-ref/source/debug.cc
parent7d74044829242da97e6db5c87b336f4c1a17883e (diff)
downloadcrawl-ref-71509500b1ec921faf74b64f7bcad6ab96ab6f51.tar.gz
crawl-ref-71509500b1ec921faf74b64f7bcad6ab96ab6f51.zip
Don't note monsters of HD <= 2. (Butterflies may be extremely rare, but
when they appear, it's not interesting enough to be noted.) Tweak wizmode monster placement to never place monsters at the player position. Rather, change one of the neighbouring square's terrain type, if need be. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6032 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/debug.cc')
-rw-r--r--crawl-ref/source/debug.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index 4268ffbfaf..b462a5d3ac 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -505,6 +505,13 @@ void wizard_create_spec_monster_name()
type = mspec.monbase;
coord_def place = find_newmons_square(type, coord_def(x, y));
+ if (!in_bounds(place))
+ {
+ // Try again with habitat HT_LAND.
+ // (Will be changed to the necessary terrain type in dgn_place_monster.)
+ place = find_newmons_square(MONS_PROGRAM_BUG, coord_def(x,y));
+ }
+
if (in_bounds(place))
{
x = place.x;
@@ -512,9 +519,8 @@ void wizard_create_spec_monster_name()
}
else
{
- // Reset to your position.
- x = you.x_pos;
- y = you.y_pos;
+ mpr("Found no space to place monster.", MSGCH_DIAGNOSTICS);
+ return;
}
// Wizmode users should be able to conjure up uniques even if they