diff options
author | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-21 07:30:33 +0000 |
---|---|---|
committer | j-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-05-21 07:30:33 +0000 |
commit | 9b55168648a4ddc1887d0ae560ec00d8f1ff3b23 (patch) | |
tree | e4c268b925a397f19f74cb6e4bbc3f6378a12c01 /crawl-ref/source/effects.cc | |
parent | 98e3c24887ee5a4670cf58eaa614084a720b5853 (diff) | |
download | crawl-ref-9b55168648a4ddc1887d0ae560ec00d8f1ff3b23.tar.gz crawl-ref-9b55168648a4ddc1887d0ae560ec00d8f1ff3b23.zip |
Fix 1941612: Zapping wands known to be empty shouldn't cost a turn, but
empty wands with unknown charges should cost a turn.
Experimentally add a "Really fire through friendly creature?" prompt
when a beam tracer passes through a friend. This currently uses the
existing monster tracer and probably has huge problems because of this.
In any case, it appears to only work sometimes, though consistently for
wands in my testing, possibly because the range is fixed (?) when
compared to spells. (This is part of FR 1962548.)
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5171 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index 7bc319bff2..b26f14c4f9 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -1800,8 +1800,10 @@ bool acquirement(object_class_type class_wanted, int agent, bool recharge_wand(int item_slot) { if (item_slot == -1) + { item_slot = prompt_invent_item( "Charge which item?", MT_INVLIST, OSEL_RECHARGE, true, true, false ); + } if (item_slot == PROMPT_ABORT) { @@ -1811,10 +1813,11 @@ bool recharge_wand(int item_slot) item_def &wand = you.inv[ item_slot ]; + // Weapons of electrocution can be "charged", i.e. gain +1 damage. if (wand.base_type == OBJ_WEAPONS && get_weapon_brand(wand) == SPWPN_ELECTROCUTION) { - // might fail because of already high enchantment + // Might fail because of already high enchantment. if (enchant_weapon( ENCHANT_TO_DAM, false, wand )) { you.wield_change = true; @@ -1858,7 +1861,7 @@ bool recharge_wand(int item_slot) break; } - // don't display zap counts any more + // Don't display zap counts any more. wand.plus2 = ZAPCOUNT_UNKNOWN; mprf("%s glows for a moment.", wand.name(DESC_CAP_YOUR).c_str()); @@ -1868,9 +1871,8 @@ bool recharge_wand(int item_slot) if (wand.plus > charge_gain * 3) wand.plus = charge_gain * 3; } - else + else // It's a rod. { - // This is a rod. bool work = false; if (wand.plus2 <= MAX_ROD_CHARGE * ROD_CHARGE_MULT) |