diff options
-rw-r--r-- | crawl-ref/source/command.cc | 12 | ||||
-rw-r--r-- | crawl-ref/source/dungeon.cc | 6 | ||||
-rw-r--r-- | crawl-ref/source/food.cc | 9 | ||||
-rw-r--r-- | crawl-ref/source/invent.cc | 21 | ||||
-rw-r--r-- | crawl-ref/source/invent.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/item_use.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/item_use.h | 3 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 30 |
8 files changed, 65 insertions, 27 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index a5c4389f2e..5c4cb1573e 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -2134,8 +2134,7 @@ static void _add_formatted_keyhelp(column_composer &cols) "<w>Ctrl-T</w> : change ally pickup behaviour\n", true, true, _cmdhelp_textfilter); - cols.add_formatted( - 1, + std::string interact = "<h>Item Interaction (inventory):\n" "<w>i</w> : show Inventory list\n" "<w>]</w> : show inventory of equipped items\n" @@ -2143,7 +2142,11 @@ static void _add_formatted_keyhelp(column_composer &cols) "<w>f</w> : Fire next appropriate item\n" "<w>F</w> : select an item and Fire it\n" "<w>(</w> : cycle current ammunition\n" - "<w>e</w> : Eat food (but tries floor first)\n" + "<w>e</w> : "; + + interact += (you.species == SP_VAMPIRE ? "Drain corpses" : "Eat food"); + interact += + " (tries floor first)\n" "<w>q</w> : Quaff a potion\n" "<w>Z</w> : Zap a wand\n" "<w>r</w> : Read a scroll or book\n" @@ -2153,6 +2156,9 @@ static void _add_formatted_keyhelp(column_composer &cols) "<w>v</w> : eVoke power of wielded item\n" "<w>W</w>/<w>T</w> : Wear or Take off armour\n" "<w>P</w>/<w>R</w> : Put on or Remove jewellery\n", + + cols.add_formatted( + 1, interact, true, true, _cmdhelp_textfilter); cols.add_formatted( diff --git a/crawl-ref/source/dungeon.cc b/crawl-ref/source/dungeon.cc index f54849c8a4..0cfc1166ac 100644 --- a/crawl-ref/source/dungeon.cc +++ b/crawl-ref/source/dungeon.cc @@ -3228,7 +3228,7 @@ static bool _make_room(int sx,int sy,int ex,int ey,int max_doors, int doorlevel) } // Doesn't include Polyphemus or Ilsuiw (only appear in the Shoals), -// Murray (Hell), or Tiamat (Zot). +// Dissolution (Slime), Murray (Hell), or Tiamat (Zot). // NOTE: The Lernaean hydra should *never* be randomly generated. // The Royal jelly likewise is only placed via Slime end vault. static monster_type _choose_unique_by_depth(int step) @@ -3263,7 +3263,7 @@ static monster_type _choose_unique_by_depth(int step) MONS_HAROLD, MONS_NORBERT, MONS_JOZEF, MONS_AGNES, MONS_MAUD, MONS_LOUISE, MONS_FRANCIS, MONS_FRANCES, MONS_AZRAEL, MONS_EUSTACHIO, MONS_NERGALLE, - MONS_SONJA, MONS_NESSOS, MONS_DISSOLUTION, -1); + MONS_SONJA, MONS_NESSOS, -1); break; case 6: // depth > 19 default: @@ -3271,7 +3271,7 @@ static monster_type _choose_unique_by_depth(int step) MONS_RUPERT, MONS_WAYNE, MONS_DUANE, MONS_XTAHUA, MONS_NORRIS, MONS_FREDERICK, MONS_MARGERY, MONS_BORIS, MONS_ROXANNE, MONS_NERGALLE, - MONS_SAINT_ROKA, MONS_DISSOLUTION, -1); + MONS_SAINT_ROKA, -1); } return static_cast<monster_type>(ret); diff --git a/crawl-ref/source/food.cc b/crawl-ref/source/food.cc index 1f2e9e4175..eebb9f5932 100644 --- a/crawl-ref/source/food.cc +++ b/crawl-ref/source/food.cc @@ -130,6 +130,13 @@ void set_hunger(int new_hunger_level, bool suppress_msg) // care of by calling wield_effects(). {gdl} void weapon_switch(int targ) { + if (you.equip[EQ_WEAPON] != -1 + && !check_old_item_warning(you.inv[you.equip[EQ_WEAPON]], + OPER_WIELD)) + { + return; + } + if (targ == -1) // Unarmed Combat. { // Already unarmed? @@ -319,7 +326,7 @@ static bool _prepare_butchery(bool can_butcher, bool removed_gloves, mprf("Switching to %s.", butchering_tool == -1 ? "unarmed" : "a butchering implement"); - if (!wield_weapon(true, butchering_tool, false)) + if (!wield_weapon(true, butchering_tool, false, true)) return (false); } diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index c782081d2d..288950d874 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -1237,10 +1237,10 @@ bool has_warning_inscription(const item_def& item, return (false); } -// checks if current item (to be removed) has a warning inscription -// and prompts the user for confirmation -static bool _check_old_item_warning( const item_def& item, - operation_types oper ) +// Checks if current item (to be removed) has a warning inscription +// and prompts the user for confirmation. +bool check_old_item_warning( const item_def& item, + operation_types oper ) { item_def old_item; std::string prompt; @@ -1347,7 +1347,7 @@ bool check_warning_inscriptions( const item_def& item, // Don't ask if item already worn. int equip = you.equip[get_armour_slot(item)]; if (equip != -1 && item.link == equip) - return (_check_old_item_warning(item, oper)); + return (check_old_item_warning(item, oper)); } else if (oper == OPER_PUTON) { @@ -1362,23 +1362,24 @@ bool check_warning_inscriptions( const item_def& item, { equip = you.equip[EQ_LEFT_RING]; if (equip != -1 && item.link == equip) - return (_check_old_item_warning(item, oper)); - // or maybe the other ring? + return (check_old_item_warning(item, oper)); + + // Or maybe the other ring? equip = you.equip[EQ_RIGHT_RING]; } if (equip != -1 && item.link == equip) - return (_check_old_item_warning(item, oper)); + return (check_old_item_warning(item, oper)); } std::string prompt = "Really " + _operation_verb(oper) + " "; prompt += item.name(DESC_INVENTORY); prompt += "?"; return (yesno(prompt.c_str(), false, 'n') - && _check_old_item_warning(item, oper)); + && check_old_item_warning(item, oper)); } else - return (_check_old_item_warning(item, oper)); + return (check_old_item_warning(item, oper)); } // This function prompts the user for an item, handles the '?' and '*' diff --git a/crawl-ref/source/invent.h b/crawl-ref/source/invent.h index c8debaac6e..c974027ed6 100644 --- a/crawl-ref/source/invent.h +++ b/crawl-ref/source/invent.h @@ -221,6 +221,7 @@ bool in_inventory(const item_def &i); std::string item_class_name(int type, bool terse = false); +bool check_old_item_warning(const item_def& item, operation_types oper); bool check_warning_inscriptions(const item_def& item, operation_types oper); bool has_warning_inscription(const item_def& item, operation_types oper); diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc index ee73745107..36a15df6ec 100644 --- a/crawl-ref/source/item_use.cc +++ b/crawl-ref/source/item_use.cc @@ -219,7 +219,10 @@ static bool _valid_weapon_swap(const item_def &item) return (false); } -bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages) +// If force is true, don't check weapon inscriptions. +// (Assuming the player was already prompted for that.) +bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages, + bool force) { if (inv_count() < 1) { @@ -318,8 +321,11 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages) return (false); // For non-auto_wield cases checked above. - if (auto_wield && !check_warning_inscriptions(new_wpn, OPER_WIELD)) + if (auto_wield && !force + && !check_warning_inscriptions(new_wpn, OPER_WIELD)) + { return (false); + } // Wield the weapon. if (!safe_to_remove_or_wear(new_wpn, false)) diff --git a/crawl-ref/source/item_use.h b/crawl-ref/source/item_use.h index 545712a4ef..e99d65181d 100644 --- a/crawl-ref/source/item_use.h +++ b/crawl-ref/source/item_use.h @@ -134,7 +134,8 @@ bool can_wield(item_def *weapon, bool say_why = false, /* *********************************************************************** * called from: acr * *********************************************************************** */ -bool wield_weapon(bool auto_wield, int slot = -1, bool show_we_messages = true); +bool wield_weapon(bool auto_wield, int slot = -1, bool show_we_messages = true, + bool force = false); // last updated 12may2000 {dlb} diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index 5f865a63f4..6c0cae9a37 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -3861,14 +3861,28 @@ bool ely_destroy_weapons() gain_piety(1); } - // Elyvilon doesn't care about item sacrifices at altars, so - // I'm stealing _Sacrifice_Messages. - _print_sacrifice_message(GOD_ELYVILON, item, pgain); - if (is_evil_weapon) + if (get_weapon_brand(item) == SPWPN_HOLY_WRATH) { - // Print this is addition to the above! - simple_god_message(" welcomes the destruction of this evil weapon.", - GOD_ELYVILON); + // Weapons blessed by TSO don't get destroyed but are instead + // returned whence they came. (jpeg) +// _print_sacrifice_message(GOD_SHINING_ONE, item, pgain); + simple_god_message( + make_stringf(" %sreclaims %s.", + pgain == PIETY_SOME ? "gladly " : "", + item.name(DESC_NOCAP_THE).c_str()).c_str(), + GOD_SHINING_ONE); + } + else + { + // Elyvilon doesn't care about item sacrifices at altars, so + // I'm stealing _Sacrifice_Messages. + _print_sacrifice_message(GOD_ELYVILON, item, pgain); + if (is_evil_weapon) + { + // Print this is addition to the above! + simple_god_message(" welcomes the destruction of this evil " + "weapon.", GOD_ELYVILON); + } } destroy_item(si.link()); @@ -4173,8 +4187,10 @@ static bool _zin_retribution() if (success) god_speaks(god, "You feel Zin's eyes turn towards you..."); else + { simple_god_message("'s eyes are elsewhere at the moment.", god); + } } else { |