summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-27 23:47:05 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-06-27 23:47:05 +0000
commit26f8579e71cadfe6d757a1a8c979a51eba6305df (patch)
tree9e03efe6bff7051626e32cc74247352be119365f /crawl-ref/source/effects.cc
parent7d9c2931b71d159f79d3b422bb891b5afdc2e641 (diff)
downloadcrawl-ref-26f8579e71cadfe6d757a1a8c979a51eba6305df.tar.gz
crawl-ref-26f8579e71cadfe6d757a1a8c979a51eba6305df.zip
Implemented 1735752: wands are (fake-)inscribed with the number of times
you've zapped them. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1675 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc27
1 files changed, 3 insertions, 24 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index 1e04e81b36..e04ba8b87e 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -1395,29 +1395,6 @@ bool acquirement(object_class_type force_class, int agent)
return (true);
} // end acquirement()
-// Remove the "empty" autoinscription, if present.
-// Return true if the inscription was there, false otherwise.
-bool remove_empty_inscription( item_def& item )
-{
- const char* empty_inscription = "empty";
- size_t p = item.inscription.find(empty_inscription);
- if ( p != std::string::npos )
- {
- // found it, delete it
- size_t prespace = 0;
- // if preceded by a space, delete that too
- if ( p != 0 && item.inscription[p-1] == ' ' )
- prespace = 1;
- item.inscription =
- item.inscription.substr(0, p - prespace) +
- item.inscription.substr(p + strlen(empty_inscription),
- std::string::npos);
- return true;
- }
- else
- return false;
-}
-
bool recharge_wand(void)
{
if (you.equip[EQ_WEAPON] == -1)
@@ -1431,7 +1408,6 @@ bool recharge_wand(void)
int charge_gain = 0;
if (wand.base_type == OBJ_WANDS)
{
- remove_empty_inscription(wand);
switch (wand.sub_type)
{
case WAND_INVISIBILITY:
@@ -1456,6 +1432,9 @@ bool recharge_wand(void)
break;
}
+ // don't display zap counts any more
+ wand.plus2 = ZAPCOUNT_UNKNOWN;
+
mprf("%s glows for a moment.", wand.name(DESC_CAP_YOUR).c_str());
wand.plus += 1 + random2avg( ((charge_gain - 1) * 3) + 1, 3 );