fix #H1554, #H1736, github issue #240 - silver )
Fixes #240 Monster versus monster (melee and throwing) didn't handle shades (need silver or blessed weapon to take damage) or silver feedback (extra info when silver-haters are hit). I did a lot of test, revise, re-test but didn't always re-test everything that had previously been tested, so bugs that I thought were quashed might have crept in. Now if a missile weapon "passes harmlessly through the shade" it will continue on and maybe hit something else. (Regular misses still stop at the missed target.) A couple of minor ball&chain changes accidentally got included.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 dothrow.c $NHDT-Date: 1569276989 2019/09/23 22:16:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.161 $ */
|
||||
/* NetHack 3.6 dothrow.c $NHDT-Date: 1573688688 2019/11/13 23:44:48 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.164 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1151,6 +1151,10 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
||||
will be left with a stale pointer. */
|
||||
|
||||
if (u.uswallow) {
|
||||
if (obj == uball) {
|
||||
uball->ox = uchain->ox = u.ux;
|
||||
uball->oy = uchain->oy = u.uy;
|
||||
}
|
||||
mon = u.ustuck;
|
||||
bhitpos.x = mon->mx;
|
||||
bhitpos.y = mon->my;
|
||||
@@ -1285,7 +1289,7 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
||||
(void) snuff_candle(obj);
|
||||
notonhead = (bhitpos.x != mon->mx || bhitpos.y != mon->my);
|
||||
obj_gone = thitmonst(mon, obj);
|
||||
/* Monster may have been tamed; this frees old mon */
|
||||
/* Monster may have been tamed; this frees old mon [obsolete] */
|
||||
mon = m_at(bhitpos.x, bhitpos.y);
|
||||
|
||||
/* [perhaps this should be moved into thitmonst or hmon] */
|
||||
@@ -1310,8 +1314,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
||||
clear_thrownobj = TRUE;
|
||||
goto throwit_return;
|
||||
} else {
|
||||
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
||||
aklys must we wielded as primary to return when thrown */
|
||||
/* Mjollnir must be wielded to be thrown--caller verifies this;
|
||||
aklys must be wielded as primary to return when thrown */
|
||||
if (iflags.returning_missile) { /* Mjollnir or aklys */
|
||||
if (rn2(100)) {
|
||||
if (tethered_weapon)
|
||||
|
||||
Reference in New Issue
Block a user