diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-17 21:26:57 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-07-17 21:26:57 +0000 |
commit | 24bbfa46caf3c7972ddac1b8cec577bfd0fa29e0 (patch) | |
tree | beea6f8c3fd95b0629e31bcdbe7f92ea26a53e2b /crawl-ref | |
parent | 3390e50bf690f56f9ae078b7ff9695e20355f905 (diff) | |
download | crawl-ref-24bbfa46caf3c7972ddac1b8cec577bfd0fa29e0.tar.gz crawl-ref-24bbfa46caf3c7972ddac1b8cec577bfd0fa29e0.zip |
Apply Haran's recent fixes to branch.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.4@6592 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/docs/changes.stone_soup | 1 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/hiscores.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/itemname.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/makefile | 4 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 9 |
8 files changed, 20 insertions, 15 deletions
diff --git a/crawl-ref/docs/changes.stone_soup b/crawl-ref/docs/changes.stone_soup index deed7f6ec8..75e0367e2e 100644 --- a/crawl-ref/docs/changes.stone_soup +++ b/crawl-ref/docs/changes.stone_soup @@ -13,6 +13,7 @@ Disclaimer: These are merely the highlights, not an exhaustive list of changes. * Fixed item quotes causing overlong descriptions. * Fixed vampire bat jewellery exploit. * Fixed secondary monster attacks being branded according to their weapon. +* Fixed runes not being counted correctly in scoring. * Fixed kills by hell effects counting as player kills. * Fixed persistent --more-- in wizard mode. * Fixed cold/fire always destroying all potions/scrolls on the floor. diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index cf4f1e96b8..7d59e1a6a3 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -1638,6 +1638,7 @@ std::string get_item_description( const item_def &item, bool verbose, << std::dec << "$" << "x: " << item.x << " y: " << item.y << " link: " << item.link + << " slot: " << item.slot << " ident_type: " << static_cast<int>(get_ident_type(item)); } diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 8aac6e201f..c1b4d0d9c3 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -1953,7 +1953,7 @@ static int _player_likes_food_type(int type) return 0; } - mprf(MSGCH_ERROR, "Couldn't handle food type: %d"); + mprf(MSGCH_ERROR, "Couldn't handle food type: %d", type); return 0; } diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index 3d2f7dc281..6267202d22 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -972,8 +972,7 @@ void scorefile_entry::init() num_diff_runes = 0; FixedVector< int, NUM_RUNE_TYPES > rune_array; - for (int i = 0; i < NUM_RUNE_TYPES; i++) - rune_array[i] = 0; + rune_array.init(0); // inventory value is only calculated for winners const bool calc_item_values = (death_type == KILLED_BY_WINNING); @@ -1003,9 +1002,10 @@ void scorefile_entry::init() continue; } - rune_array[ you.inv[d].plus ] += you.inv[d].quantity; if (rune_array[ you.inv[d].plus ] == 0) num_diff_runes++; + + rune_array[ you.inv[d].plus ] += you.inv[d].quantity; } } } diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc index a8f79190b3..2d02dccdef 100644 --- a/crawl-ref/source/itemname.cc +++ b/crawl-ref/source/itemname.cc @@ -2624,6 +2624,8 @@ const std::string menu_colour_item_prefix(const item_def &item, bool temp) prefixes.push_back("equipped"); if (is_artefact(item)) prefixes.push_back("artefact"); + break; + default: break; } diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 7ee40289ca..4c1fb06865 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2389,7 +2389,9 @@ static bool _find_subtype_by_name(item_def &item, item.special = 0; item.flags = 0; item.quantity = 1; - set_ident_flags( item, ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES ); + // Don't use set_ident_flags in order to avoid triggering notes. + // FIXME - is this the proper solution? + item.flags |= (ISFLAG_KNOW_TYPE | ISFLAG_KNOW_PROPERTIES); int type_wanted = -1; @@ -2475,14 +2477,12 @@ bool item_is_equipped(const item_def &item) if (you.equip[i] == EQ_NONE) continue; - item_def& eq(you.inv[you.equip[i]]); + const item_def& eq(you.inv[you.equip[i]]); if (!is_valid_item(eq)) continue; - if (eq.slot == item.slot) - return (true); - else if (&eq == &item) + if (&eq == &item) return (true); } diff --git a/crawl-ref/source/makefile b/crawl-ref/source/makefile index 9e1ded2ab6..0bb53bc62a 100644 --- a/crawl-ref/source/makefile +++ b/crawl-ref/source/makefile @@ -4,12 +4,12 @@ #Makefile chooser. Choose one: -MAKEFILE ?= makefile.unix +#MAKEFILE ?= makefile.unix #MAKEFILE ?= makefile.dos #MAKEFILE ?= makefile.osx #MAKEFILE ?= makefile.mgw #MAKEFILE ?= makefile_tiles.mgw -#MAKEFILE ?= makefile.x11 +MAKEFILE ?= makefile.x11 #jmf: number of concurrent jobs -- good value is (#_of_CPUs * 2) + 1 # cuts build time a lot on multi-cpu machines diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index d0f9d7dee0..7317e0c5f5 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3091,16 +3091,17 @@ bool god_dislikes_item_handling(const item_def &item) { const int item_brand = get_weapon_brand(item); - if (item_brand == SPWPN_VENOM) + if (item_brand == SPWPN_VENOM && item_type_known(item)) return (true); } else if (item.base_type == OBJ_MISSILES) { const int item_brand = get_ammo_brand(item); - if (item_brand == SPMSL_POISONED - || item_brand == SPMSL_POISONED_II - || item_brand == SPMSL_CURARE) + if (item_type_known(item) && + (item_brand == SPMSL_POISONED + || item_brand == SPMSL_POISONED_II + || item_brand == SPMSL_CURARE)) { return (true); } |