summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-02 23:51:50 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-02 23:52:58 -0800
commitec56a2051c1562c03a0a7715510e8da5c7a19925 (patch)
treecfe4668b2e02fb88eff1fcd6e2f68d2b7b6651fd /crawl-ref/source/item_use.cc
parent458c930834995837efa33192af898e4316c11fa2 (diff)
downloadcrawl-ref-ec56a2051c1562c03a0a7715510e8da5c7a19925.tar.gz
crawl-ref-ec56a2051c1562c03a0a7715510e8da5c7a19925.zip
Wizard inscription 'range:' for wands
While in wizard mode, inscribing a wand with 'range:number' will change that wand's range to 'number' when zapped by the player.
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 8f703652b7..16d2717b38 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -4138,6 +4138,17 @@ void zap_wand(int slot)
// Reset range.
beam.range = _wand_range(type_zapped);
+
+#ifdef WIZARD
+ if (you.wizard)
+ {
+ std::string str = wand.inscription;
+ int wiz_range = strip_number_tag(str, "range:");
+ if (wiz_range != TAG_UNFOUND)
+ beam.range = wiz_range;
+ }
+#endif
+
// zapping() updates beam.
zapping( type_zapped, 30 + roll_dice(2, you.skills[SK_EVOCATIONS]), beam );