summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemprop.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-06 19:36:52 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2009-04-06 19:36:52 +0000
commit1f949e4b0f972867e6274a8a4fc3db8d5fe924e8 (patch)
treea0668ece3d80e4b2409e8cff04e3351b406c20b1 /crawl-ref/source/itemprop.cc
parentc5887300c0f938671c78fc4a59f74ea98ac5bd04 (diff)
downloadcrawl-ref-1f949e4b0f972867e6274a8a4fc3db8d5fe924e8.tar.gz
crawl-ref-1f949e4b0f972867e6274a8a4fc3db8d5fe924e8.zip
* After some thought, remove the description toggle from the spell menu as
the double toggle makes everything much more complicated, and you can easily access the spell descriptions from the very similar 'I' menu. * Don't offer weapons of unknown brand types for ?recharging. I tested a few combination cases, but I might have overlooked something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9589 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/itemprop.cc')
-rw-r--r--crawl-ref/source/itemprop.cc16
1 files changed, 7 insertions, 9 deletions
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);
}