diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-26 18:38:24 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-26 18:38:24 +0000 |
commit | a0674f612de6ac549c585884ae88987974866b1f (patch) | |
tree | af74cbe8ef06d9e16d5847139faab1eb9589adef /crawl-ref/source/items.cc | |
parent | fa25a347164bc7fb888629c65a4e3daee6c65950 (diff) | |
download | crawl-ref-a0674f612de6ac549c585884ae88987974866b1f.tar.gz crawl-ref-a0674f612de6ac549c585884ae88987974866b1f.zip |
Abyssal rune tedium reduction:
- Abyssal rune generation chances rise with turns spent in the Abyss (in the current visit, not cumulative).
- Lugonu followers get better abyssal rune odds faster.
- Abyssal rune generation is stopped after one rune is picked up, re-enabled if rune is lost in the Abyss.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5267 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/items.cc')
-rw-r--r-- | crawl-ref/source/items.cc | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index f97806f52e..40f43c7358 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -748,7 +748,6 @@ static int item_name_specialness(const item_def& item) void item_check(bool verbose) { - describe_floor(); origin_set(you.x_pos, you.y_pos); @@ -2344,6 +2343,27 @@ int inv_count(void) return count; } +item_def *find_floor_item(object_class_type cls, int sub_type) +{ + int item = NON_ITEM; + for (int y = 0; y < GYM; ++y) + for (int x = 0; x < GXM; ++x) + { + item = igrd[x][y]; + while (item != NON_ITEM) + { + item_def &i(mitm[item]); + + if (is_valid_item(i) && i.base_type == cls + && i.sub_type == sub_type) + return (&i); + + item = i.link; + } + } + return (NULL); +} + static bool find_subtype_by_name(item_def &item, object_class_type base_type, int ntypes, const std::string &name) |