From ec56a2051c1562c03a0a7715510e8da5c7a19925 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Mon, 2 Nov 2009 23:51:50 -0800 Subject: 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. --- crawl-ref/source/item_use.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/item_use.cc') 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 ); -- cgit v1.2.3-54-g00ecf