summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/itemname.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2010-01-02 17:46:08 -0800
committerStefan O'Rear <stefanor@cox.net>2010-01-02 17:50:56 -0800
commit22019ceee8c3df285becfd98445aaec91055c6df (patch)
tree91c26482c566be2399b049b863f919c803f27222 /crawl-ref/source/itemname.cc
parent985744902fd6c56fe3c30a2d1a00aeacfffba475 (diff)
downloadcrawl-ref-22019ceee8c3df285becfd98445aaec91055c6df.tar.gz
crawl-ref-22019ceee8c3df285becfd98445aaec91055c6df.zip
Rods have an intrinsic recharge rate (#300)
Using Eronarn's proposed system. Rods get a baseline of 4 MP per 100 turns; every rod has an enchantment, which adds to this. On top of that, you get the old Evocations bonus. At maxed Evocations with a +9 rod, you gain 52 MP per 100 turns. Unfortunately, all four of the multi-purpose fields were already used for rods, so I had to spill enchantment into props.
Diffstat (limited to 'crawl-ref/source/itemname.cc')
-rw-r--r--crawl-ref/source/itemname.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/crawl-ref/source/itemname.cc b/crawl-ref/source/itemname.cc
index d39e16abf2..81bb850f16 100644
--- a/crawl-ref/source/itemname.cc
+++ b/crawl-ref/source/itemname.cc
@@ -1618,7 +1618,17 @@ std::string item_def::name_aux(description_level_type desc,
}
else
{
- buff << (item_is_rod(*this) ? "rod" : "staff")
+ if (item_is_rod(*this) && know_type && know_pluses
+ && !basename && !qualname && !dbname)
+ {
+ short rmod = 0;
+ if (props.exists("rod_enchantment"))
+ rmod = props["rod_enchantment"];
+
+ output_with_sign(buff, rmod);
+ }
+
+ buff << (item_is_rod(*this) ? " rod" : " staff")
<< " of " << staff_type_name(item_typ);
}
break;