wand/spell/breath zaps hitting secret doors (trunk only)

From a bug report, black dragon breath
destroys closed doors didn't acknowledge hitting secret doors.  bhit()
reveals secret doors, but zap_over_floor() (called by buzz() for ray-type
wands and spells, and for breath attacks) didn't check for hitting those.

     When testing the fix, I noticed that feedback for an explosion caused
by breaking a wand was worded oddly for zaps like magic missile which don't
damage doors.  "The door absorbs your bolt" didn't make much sense; what
bolt?  That was first changed to "absords your blast", which still sounded
weird, then to "absorbs the blast", which seemed better but was inaccurate.
Next was "absorbs some of the blast" since the explosion continues to hit
adjacent spots, but since it still has full strength that wasn't accurate
either.  It's finally become "The door remains intact."  Unlike with zaps,
there is no additional range being lost, so no reference to absorption.
This commit is contained in:
nethack.rankin
2009-05-28 14:09:30 +00:00
parent 2dfe3f45c1
commit 8f3c74d804
4 changed files with 55 additions and 14 deletions

View File

@@ -1,5 +1,4 @@
/* NetHack 3.5 explode.c $Date$ $Revision$ */
/* SCCS Id: @(#)explode.c 3.5 2009/01/04 */
/* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
@@ -51,9 +50,21 @@ int expltype;
short exploding_wand_typ = 0;
if (olet == WAND_CLASS) { /* retributive strike */
/* If 'type' < 0 it indicates (wand type * -1) */
/* 'type' is passed as (wand's object type * -1); save
object type and convert 'type' itself to zap-type */
if (type < 0) {
exploding_wand_typ = (short)(type * -1);
type = -type;
exploding_wand_typ = (short)type;
/* most attack wands produce specific explosions;
other types produce a generic magical explosion */
if (objects[type].oc_dir == RAY && type != WAN_DIGGING) {
type -= WAN_MAGIC_MISSILE;
if (type < 0 || type > 9) {
impossible("explode: wand has bad zap type (%d).",
type);
type = 0;
}
} else
type = 0;
}
switch (Role_switch) {