silver vs poly'd hero (trunk only)
<Someone> reported that thitu() was adding d20 damage for silver object hitting silver-hating hero even though all the callers were using dmgval() which also does that, resulting in doubled silver bonus/penalty. This fixes that (including for boomerangs thrown by player, which weren't using dmgval(), to handle a hyptothetical silver boomerang). While testing it, I noticed that there was no "the silver sears your flesh" message when a monster hit you with a wielded silver weapon, so this fixes that too. (How did we miss that? And how did <Someone>? :-)
This commit is contained in:
10
src/zap.c
10
src/zap.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)zap.c 3.5 2006/01/30 */
|
||||
/* SCCS Id: @(#)zap.c 3.5 2006/04/05 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -3010,7 +3010,8 @@ struct obj **pobj; /* object tossed/used, set to NULL
|
||||
}
|
||||
|
||||
struct monst *
|
||||
boomhit(dx, dy)
|
||||
boomhit(obj, dx, dy)
|
||||
struct obj *obj;
|
||||
int dx, dy;
|
||||
{
|
||||
register int i, ct;
|
||||
@@ -3045,8 +3046,9 @@ int dx, dy;
|
||||
if(bhitpos.x == u.ux && bhitpos.y == u.uy) { /* ct == 9 */
|
||||
if(Fumbling || rn2(20) >= ACURR(A_DEX)) {
|
||||
/* we hit ourselves */
|
||||
(void) thitu(10, rnd(10), (struct obj *)0,
|
||||
"boomerang");
|
||||
(void) thitu(10 + obj->spe,
|
||||
dmgval(obj, &youmonst),
|
||||
obj, "boomerang");
|
||||
break;
|
||||
} else { /* we catch it */
|
||||
tmp_at(DISP_END, 0);
|
||||
|
||||
Reference in New Issue
Block a user