From 41f78a696154902ae7baa22e116d39b6d321fc62 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Tue, 21 Jul 2009 17:53:49 +0000 Subject: Make fish on dry land (due to Feawn's Sunlight power) flop about and lose hit points until back in water, using ENCH_AQUATIC_LAND. (Bug 2824663) Also fix tiles compilation (patch 2824632) and add DATA_DIR_PATH to tiled icons (patch 2824635). Both patches (and some more) by Trent W. Buck. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10364 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/misc.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'crawl-ref/source/misc.cc') diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc index 5c98c97a4e..aabdcea2a9 100644 --- a/crawl-ref/source/misc.cc +++ b/crawl-ref/source/misc.cc @@ -1473,7 +1473,7 @@ static void set_entry_cause(entry_cause_type default_cause, } } -static int runes_in_pack() +static int runes_in_pack(std::vector &runes) { int num_runes = 0; @@ -1484,6 +1484,8 @@ static int runes_in_pack() && you.inv[i].sub_type == MISC_RUNE_OF_ZOT) { num_runes += you.inv[i].quantity; + for (int q = 1; runes.size() < 3 && q < you.inv[i].quantity; ++q) + runes.push_back(you.inv[i].plus); } } @@ -2123,7 +2125,8 @@ void down_stairs( int old_level, dungeon_feature_type force_stair, if (stair_find == DNGN_ENTER_ZOT && !you.opened_zot) { - const int num_runes = runes_in_pack(); + std::vector runes; + const int num_runes = runes_in_pack(runes); if (num_runes < NUMBER_OF_RUNES_NEEDED) { -- cgit v1.2.3-54-g00ecf