diff options
Diffstat (limited to 'crawl-ref/source')
-rw-r--r-- | crawl-ref/source/acr.cc | 13 | ||||
-rw-r--r-- | crawl-ref/source/describe.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/fight.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/invent.cc | 11 | ||||
-rw-r--r-- | crawl-ref/source/invent.h | 12 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/items.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/ouch.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 30 | ||||
-rw-r--r-- | crawl-ref/source/shopping.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/transfor.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/version.h | 2 |
12 files changed, 48 insertions, 43 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc index 02ce386d18..97668ba38a 100644 --- a/crawl-ref/source/acr.cc +++ b/crawl-ref/source/acr.cc @@ -1786,17 +1786,18 @@ static void _print_friendly_pickup_setting(bool was_changed) if (you.friendly_pickup == FRIENDLY_PICKUP_NONE) { - mprf("Your intelligent, permanent allies are %sforbidden to pick up anything at all.", - now.c_str()); + mprf("Your intelligent allies are %sforbidden to pick up anything " + "at all.", now.c_str()); } else if (you.friendly_pickup == FRIENDLY_PICKUP_FRIEND) { - mprf("Your intelligent, permanent allies may %sonly pick up items dropped by allies.", - now.c_str()); + mprf("Your intelligent allies may %sonly pick up items dropped by " + "allies.", now.c_str()); } else if (you.friendly_pickup == FRIENDLY_PICKUP_ALL) { - mprf("Your intelligent, permanent allies may %spick up anything they need.", now.c_str()); + mprf("Your intelligent allies may %spick up anything they need.", + now.c_str()); } else { @@ -2435,7 +2436,7 @@ void process_command( command_type cmd ) break; case CMD_LIST_EQUIPMENT: - get_invent( OSEL_EQUIP ); + get_invent(OSEL_EQUIP); break; case CMD_INSCRIBE_ITEM: diff --git a/crawl-ref/source/describe.cc b/crawl-ref/source/describe.cc index 1ae4a49c63..67a31438d4 100644 --- a/crawl-ref/source/describe.cc +++ b/crawl-ref/source/describe.cc @@ -2146,7 +2146,7 @@ void inscribe_item(item_def &item, bool proper_prompt) break; } // If autoinscription is impossible, prompt for an inscription instead. - case 'y': + case 'i': { prompt = (is_inscribed ? "Add what to inscription? " : "Inscribe with what? "); diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index e2e10491df..8dfbb0aafe 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -4117,7 +4117,7 @@ bool you_attack(int monster_attacked, bool unarmed_attacks) interrupt_activity(AI_HIT_MONSTER, defender); // Check if the player is fighting with something unsuitable. - if (!wielded_weapon_check(attk.weapon)) + if (you.can_see(defender) && !wielded_weapon_check(attk.weapon)) { you.turn_is_over = false; return (false); diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index b162e2e739..a8320981b7 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -173,6 +173,13 @@ const int InvEntry::item_freshness() const return freshness; } +void InvEntry::select(int qty) +{ + if ( item && item->quantity < qty ) + qty = item->quantity; + MenuEntry::select(qty); +} + std::string InvEntry::get_text() const { std::ostringstream tstr; @@ -947,10 +954,10 @@ unsigned char invent_select( const char *title, return (menu.getkey()); } -unsigned char invent( int item_class_inv, bool show_price ) +void browse_inventory( bool show_price ) { InvShowPrices show_item_prices(show_price); - return (invent_select(NULL, MT_INVLIST, item_class_inv)); + get_invent(OSEL_ANY); } // Reads in digits for a count and apprends then to val, the diff --git a/crawl-ref/source/invent.h b/crawl-ref/source/invent.h index 4f6bffc642..6ae30e9441 100644 --- a/crawl-ref/source/invent.h +++ b/crawl-ref/source/invent.h @@ -100,6 +100,7 @@ public: tag ); } + virtual void select( int qty = -1 ); private: void add_class_hotkeys(const item_def &i); @@ -199,12 +200,6 @@ std::vector<SelItem> prompt_invent_items( const std::vector<SelItem> *pre_select = NULL ); -// last updated 12may2000 {dlb} -/* *********************************************************************** - * called from: invent - ouch - shopping - * *********************************************************************** */ -unsigned char invent( int item_class_inv, bool show_price ); - unsigned char invent_select( // Use NULL for stock Inventory title const char *title = NULL, @@ -219,10 +214,7 @@ unsigned char invent_select( Menu::selitem_tfn fn = NULL, const std::vector<SelItem> *pre_select = NULL ); -// last updated 24may2000 {dlb} -/* *********************************************************************** - * called from: acr - command - food - item_use - items - spl-book - spells1 - * *********************************************************************** */ +void browse_inventory( bool show_price ); unsigned char get_invent(int invent_type); bool in_inventory(const item_def &i); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index 54c0d5a659..0ddeac68ed 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -4774,8 +4774,8 @@ void tile_use_item(int idx, InvAction act) { if (act == INV_PICKUP) { - pickup_single_item(idx, mitm[idx].quantity); - return; + pickup_single_item(idx, mitm[idx].quantity); + return; } else if (act == INV_DROP) { diff --git a/crawl-ref/source/items.cc b/crawl-ref/source/items.cc index 4c1fb06865..4fd9dc21c7 100644 --- a/crawl-ref/source/items.cc +++ b/crawl-ref/source/items.cc @@ -2042,7 +2042,7 @@ static bool _drop_item_order(const SelItem &first, const SelItem &second) // Prompts the user for an item to drop // //--------------------------------------------------------------- -void drop(void) +void drop() { if (inv_count() < 1 && you.gold == 0) { diff --git a/crawl-ref/source/ouch.cc b/crawl-ref/source/ouch.cc index 2b9c8a38dd..b9de06806f 100644 --- a/crawl-ref/source/ouch.cc +++ b/crawl-ref/source/ouch.cc @@ -1067,7 +1067,7 @@ void end_game( scorefile_entry &se ) if (!crawl_state.seen_hups) more(); - invent( -1, true ); + browse_inventory(true); textcolor( LIGHTGREY ); clrscr(); diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 96e59b0319..a1ecd1ab1f 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -4950,39 +4950,39 @@ void excommunication(god_type new_god) learned_something_new(TUT_EXCOMMUNICATE, (int)new_god, old_piety); } -static bool _bless_weapon( god_type god, int brand, int colour ) +static bool _bless_weapon( god_type god, brand_type brand, int colour ) { - const int wpn = get_player_wielded_weapon(); + item_def& weap = *you.weapon(); // Only bless melee weapons. - if (!is_artefact(you.inv[wpn]) && !is_range_weapon(you.inv[wpn])) + if (!is_artefact(weap) && !is_range_weapon(weap)) { you.duration[DUR_WEAPON_BRAND] = 0; // just in case - set_equip_desc( you.inv[wpn], ISFLAG_GLOWING ); - set_item_ego_type( you.inv[wpn], OBJ_WEAPONS, brand ); - you.inv[wpn].colour = colour; + set_equip_desc( weap, ISFLAG_GLOWING ); + set_item_ego_type( weap, OBJ_WEAPONS, brand ); + weap.colour = colour; - do_uncurse_item( you.inv[wpn] ); + do_uncurse_item( weap ); - enchant_weapon( ENCHANT_TO_HIT, true, you.inv[wpn] ); + enchant_weapon( ENCHANT_TO_HIT, true, weap ); if (coinflip()) - enchant_weapon( ENCHANT_TO_HIT, true, you.inv[wpn] ); + enchant_weapon( ENCHANT_TO_HIT, true, weap ); - enchant_weapon( ENCHANT_TO_DAM, true, you.inv[wpn] ); + enchant_weapon( ENCHANT_TO_DAM, true, weap ); if (coinflip()) - enchant_weapon( ENCHANT_TO_DAM, true, you.inv[wpn] ); + enchant_weapon( ENCHANT_TO_DAM, true, weap ); if ( god == GOD_SHINING_ONE ) { - convert2good(you.inv[wpn]); + convert2good(weap); - if (is_convertible(you.inv[wpn])) + if (is_convertible(weap)) { - origin_acquired(you.inv[wpn], GOD_SHINING_ONE); - make_item_blessed_blade(you.inv[wpn]); + origin_acquired(weap, GOD_SHINING_ONE); + make_item_blessed_blade(weap); } burden_change(); diff --git a/crawl-ref/source/shopping.cc b/crawl-ref/source/shopping.cc index 0766efd39f..27b3cccff0 100644 --- a/crawl-ref/source/shopping.cc +++ b/crawl-ref/source/shopping.cc @@ -286,7 +286,7 @@ static void _in_a_shop( int shopidx ) item.flags = old_flags; } else if (ft == '?' || ft == '*') - invent(-1, false); + browse_inventory(false); else if (!isalpha(ft)) { _shop_print("Huh?", 1); diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc index 77a578a875..af37ccf225 100644 --- a/crawl-ref/source/transfor.cc +++ b/crawl-ref/source/transfor.cc @@ -328,8 +328,13 @@ bool transform(int pow, transformation_type which_trans, bool quiet) return (false); } - //jmf: Silently discard this enchantment - you.duration[DUR_STONESKIN] = 0; + // Most transformations conflict with stone skin. + if (which_trans != TRAN_NONE + && which_trans != TRAN_BLADE_HANDS + && which_trans != TRAN_STATUE) + { + you.duration[DUR_STONESKIN] = 0; + } // We drop everything except jewellery by default. equipment_type default_rem[] = { diff --git a/crawl-ref/source/version.h b/crawl-ref/source/version.h index d0fd736eed..0ea837c36d 100644 --- a/crawl-ref/source/version.h +++ b/crawl-ref/source/version.h @@ -37,7 +37,7 @@ #define CRAWL "Dungeon Crawl Stone Soup" -#define VER_NUM "0.4.2" +#define VER_NUM "0.4.3" #define VER_QUAL "" // last updated 07august2001 {mv} |