diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 13:33:29 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-05 13:33:29 +0000 |
commit | ff2f267821153758bcd691e73b1b409c62f0c4e0 (patch) | |
tree | 11f18df98aad81ddfa9798dafd67eceb3b4ed510 /crawl-ref/source/stuff.cc | |
parent | 3423bbab5a0f024eeafffe6b8260c8c088647db1 (diff) | |
download | crawl-ref-ff2f267821153758bcd691e73b1b409c62f0c4e0.tar.gz crawl-ref-ff2f267821153758bcd691e73b1b409c62f0c4e0.zip |
Cleaned up monster generation functions, separate monster zombie type from monster number. May be buggy.
Allow hydra zombies (they currently do not get the right number of heads).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4872 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/stuff.cc')
-rw-r--r-- | crawl-ref/source/stuff.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/stuff.cc b/crawl-ref/source/stuff.cc index 099f0b81f5..fb9ea9b870 100644 --- a/crawl-ref/source/stuff.cc +++ b/crawl-ref/source/stuff.cc @@ -1101,6 +1101,12 @@ bool map_bounds( int x, int y ) && y >= Y_BOUND_1 && y <= Y_BOUND_2); } +coord_def random_in_bounds() +{ + return coord_def( random_range(MAPGEN_BORDER, GXM - MAPGEN_BORDER - 1), + random_range(MAPGEN_BORDER, GYM - MAPGEN_BORDER - 1) ); +} + // Returns a random location in (x_pos, y_pos)... the grid will be // DNGN_FLOOR if clear, and NON_MONSTER if empty. Exclusive tells // if we're using in_bounds() or map_bounds() restriction. |