diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-09 12:27:58 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2006-12-09 12:27:58 +0000 |
commit | 1a2b6ba98ba8ffd482ac94c4e7fa76910c446ffb (patch) | |
tree | e88605e60a9e3f0aac5089a4b4617e87b65a6406 /crawl-ref/source/dungeon.cc | |
parent | fd80ba19d0a9cf334b3dcd34098db1bf9843477f (diff) | |
download | crawl-ref-1a2b6ba98ba8ffd482ac94c4e7fa76910c446ffb.tar.gz crawl-ref-1a2b6ba98ba8ffd482ac94c4e7fa76910c446ffb.zip |
Allow alternating items with "nothing" to control generation chance. Example:
ITEM: heal wounds / nothing
Generation weight can be set with the weight: tag, which defaults to 10, so:
ITEM: weight:1 heal wounds / nothing
generates a potion of heal wounds 1 in 11 times it is used.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@601 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/dungeon.cc')
-rw-r--r-- | crawl-ref/source/dungeon.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index 49e0e6f90a..59fed1ab5f 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -5746,6 +5746,10 @@ static void dngn_place_item_explicit(int index, int x, int y, return; } + // Dummy object? + if (spec->base_type == OBJ_UNASSIGNED) + return; + if (spec->level >= 0) level = spec->level; |