From a0674f612de6ac549c585884ae88987974866b1f Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 26 May 2008 18:38:24 +0000 Subject: 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 --- crawl-ref/source/items.cc | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/items.cc') 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) -- cgit v1.2.3-54-g00ecf