breaking empty wands
I found a copy of a news posting from 1996 which suggested that using a[pply] to break a wand which has 0 charges should have a chance of wresting out one extra charge, like zapping. That way the player can't destroy spent wands with impunity, and it makes the two wand actions be more consistent. Also, it's trivial to implement. :-)
This commit is contained in:
@@ -390,6 +390,7 @@ give feedback when a nearby monster grows into a stronger form
|
||||
familiars are now created without any starting inventory
|
||||
using the 'f' command when quiver is empty will fill quiver if player selects
|
||||
a stack of 2 or more items in response to the "what to throw?" prompt
|
||||
breaking a wand with the apply command has a chance to wrest an extra charge
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific New Features
|
||||
|
||||
13
src/apply.c
13
src/apply.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)apply.c 3.5 2007/03/07 */
|
||||
/* SCCS Id: @(#)apply.c 3.5 2007/05/05 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -2808,10 +2808,19 @@ do_break_wand(obj)
|
||||
freeinv(obj); /* hide it from destroy_item instead... */
|
||||
setnotworn(obj); /* so we need to do this ourselves */
|
||||
|
||||
if (obj->spe <= 0) {
|
||||
if (!zappable(obj)) {
|
||||
pline(nothing_else_happens);
|
||||
goto discard_broken_wand;
|
||||
}
|
||||
/* successful call to zappable() consumes a charge; put it back */
|
||||
obj->spe++;
|
||||
/* might have "wrested" a final charge, taking it from 0 to -1;
|
||||
if so, we just brought it back up to 0, which wouldn't do much
|
||||
below so give it 1..3 charges now, usually making it stronger
|
||||
than an ordinary last charge (the wand is already gone from
|
||||
inventory, so perm_invent can't accidentally reveal this) */
|
||||
if (!obj->spe) obj->spe = rnd(3);
|
||||
|
||||
obj->ox = u.ux;
|
||||
obj->oy = u.uy;
|
||||
dmg = obj->spe * 4;
|
||||
|
||||
Reference in New Issue
Block a user