summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/effects.cc22
-rw-r--r--crawl-ref/source/invent.cc2
-rw-r--r--crawl-ref/source/item_use.cc2
-rw-r--r--crawl-ref/source/itemprop.cc16
-rw-r--r--crawl-ref/source/itemprop.h4
-rw-r--r--crawl-ref/source/spl-cast.cc9
-rw-r--r--crawl-ref/source/transfor.cc5
7 files changed, 28 insertions, 32 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 241a1e909f..509fc8c2c8 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1903,20 +1903,24 @@ bool recharge_wand(int item_slot)
}
// Weapons of electrocution can be "charged", i.e. gain +1 damage.
- if (wand.base_type == OBJ_WEAPONS
- && get_weapon_brand(wand) == SPWPN_ELECTROCUTION)
+ if (wand.base_type == OBJ_WEAPONS)
{
- // Might fail because of already high enchantment.
- if (enchant_weapon( ENCHANT_TO_DAM, false, wand ))
+ if (get_weapon_brand(wand) == SPWPN_ELECTROCUTION)
{
- you.wield_change = true;
+ // Might fail because of already high enchantment.
+ if (enchant_weapon( ENCHANT_TO_DAM, false, wand ))
+ {
+ you.wield_change = true;
- if (!item_ident(wand, ISFLAG_KNOW_TYPE))
- set_ident_flags(wand, ISFLAG_KNOW_TYPE);
+ if (!item_ident(wand, ISFLAG_KNOW_TYPE))
+ set_ident_flags(wand, ISFLAG_KNOW_TYPE);
- return (true);
+ return (true);
+ }
+ return (false);
}
- return (false);
+ else
+ canned_msg( MSG_NOTHING_HAPPENS );
}
if (wand.base_type != OBJ_WANDS && !item_is_rod(wand))
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 6a7767f64c..0a4fa56f33 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -1015,7 +1015,7 @@ static bool _item_class_selected(const item_def &i, int selector)
return (itype == OBJ_SCROLLS || itype == OBJ_BOOKS);
case OSEL_RECHARGE:
- return (item_is_rechargeable(i, true, true));
+ return (item_is_rechargeable(i, true));
case OSEL_ENCH_ARM:
return (is_enchantable_armour(i, true, true));
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index cbef83db3c..ac34457c8c 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4674,7 +4674,7 @@ static bool _scroll_modify_item(item_def scroll)
}
break;
case SCR_RECHARGING:
- if (item_is_rechargeable(item, true))
+ if (item_is_rechargeable(item, false, true))
{
// Might still fail on highly enchanted weapons of electrocution.
// (If so, already prints the "Nothing happens" message.)
diff --git a/crawl-ref/source/itemprop.cc b/crawl-ref/source/itemprop.cc
index e0e6e5dc2b..829b6ca1b9 100644
--- a/crawl-ref/source/itemprop.cc
+++ b/crawl-ref/source/itemprop.cc
@@ -1313,16 +1313,14 @@ bool check_armour_shape( const item_def &item, bool quiet )
// Returns whether a wand or rod can be charged, or a weapon of electrocution
// enchanted.
-// If unknown is true, wands with unknown charges and weapons with unknown
-// brand will also return true.
// If hide_charged is true, wands known to be full will return false.
// (This distinction is necessary because even full wands/rods give a message.)
-bool item_is_rechargeable(const item_def &it, bool unknown, bool hide_charged)
+bool item_is_rechargeable(const item_def &it, bool hide_charged, bool weapons)
{
// These are obvious...
if (it.base_type == OBJ_WANDS)
{
- if (unknown && !hide_charged)
+ if (!hide_charged)
return (true);
// Don't offer wands already maximally charged.
@@ -1336,7 +1334,7 @@ bool item_is_rechargeable(const item_def &it, bool unknown, bool hide_charged)
}
else if (item_is_rod(it))
{
- if (unknown && !hide_charged)
+ if (!hide_charged)
return (true);
if (item_ident(it, ISFLAG_KNOW_PLUSES))
@@ -1348,16 +1346,16 @@ bool item_is_rechargeable(const item_def &it, bool unknown, bool hide_charged)
}
else if (it.base_type == OBJ_WEAPONS)
{
- if (unknown && !item_type_known(it)) // Could be electrocution.
+ // Might be electrocution.
+ if (weapons && !item_type_known(it))
return (true);
// Weapons of electrocution can get +1 to-dam this way.
if (!is_artefact(it)
&& get_weapon_brand(it) == SPWPN_ELECTROCUTION
&& item_type_known(it)
- && (unknown && !item_ident(it, ISFLAG_KNOW_PLUSES )
- || item_ident(it, ISFLAG_KNOW_PLUSES )
- && it.plus2 < MAX_WPN_ENCHANT))
+ && (!item_ident(it, ISFLAG_KNOW_PLUSES)
+ || it.plus2 < MAX_WPN_ENCHANT))
{
return (true);
}
diff --git a/crawl-ref/source/itemprop.h b/crawl-ref/source/itemprop.h
index c908854657..e1b4755f8f 100644
--- a/crawl-ref/source/itemprop.h
+++ b/crawl-ref/source/itemprop.h
@@ -675,8 +675,8 @@ int fit_armour_size( const item_def &item, size_type size );
bool check_armour_size( const item_def &item, size_type size );
bool check_armour_shape( const item_def &item, bool quiet );
-bool item_is_rechargeable(const item_def &it, bool unknown = false,
- bool hide_charged = false);
+bool item_is_rechargeable(const item_def &it, bool hide_charged = false,
+ bool weapons = false);
int wand_charge_value(int type);
bool is_enchantable_weapon(const item_def &wpn, bool uncurse);
bool is_enchantable_armour(const item_def &arm, bool uncurse,
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 42c040a3c0..780d1184dc 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -216,14 +216,7 @@ int list_spells(bool toggle_with_I, bool viewing)
spell_menu.add_toggle_key('I');
more_str += "or 'I' ";
}
- more_str += "to toggle spell view";
- if (!viewing)
- {
- spell_menu.allow_toggle = true;
- spell_menu.menu_action = Menu::ACT_EXECUTE;
- more_str += ", or '?' to read the descriptions";
- }
- more_str += ".";
+ more_str += "to toggle spell view.";
spell_menu.set_more(formatted_string(more_str));
for (int i = 0; i < 52; ++i)
diff --git a/crawl-ref/source/transfor.cc b/crawl-ref/source/transfor.cc
index fe17503537..4724ef63f1 100644
--- a/crawl-ref/source/transfor.cc
+++ b/crawl-ref/source/transfor.cc
@@ -536,8 +536,9 @@ bool transform(int pow, transformation_type which_trans, bool force,
}
// The actual transformation may still fail later (e.g. due to cursed
- // equipment). In any case, untransforming costs us a turn but nothing
- // else (as does the "End Transformation" ability).
+ // equipment). Ideally, untransforming should cost a turn but nothing
+ // else (as does the "End Transformation" ability). As it is, you
+ // pay with mana and hunger if you already untransformed.
if (!just_check && you.attribute[ATTR_TRANSFORMATION] != TRAN_NONE)
{
bool skip_wielding = false;