wielded leash, monster bullwhip use
Simplify <Someone>'s patch (the part for the secondary weapon wasn't and
still isn't needed since dual-wielding can only occur when both primary
and alternate weapon slots contain weapons or weapon-tools, but we might
as well keep it). There was at least one other case where wielded in-use
leash could be removed from inventory without becoming unleashed first:
a bullwhip-wielding monster could snatch it away.
That lead to some other whip issues: monsters who select disarming
via bullwhip as miscellaneous strategy had 80% chance of not using it on
any given turn, but had no chance to select another misc strategy on such
turns--they always resorted to ordinary nonMUSE behavior and usually just
attacked. The adjacency check missed diagonal locations, also would aim
the disarm attempt accurately even when displacement or invisibility made
the hero's precise location unknown. [I took the easy way out here and
only let them try to disarm when they know the hero's location. It's
tempting to aim at the guessed location and sometimes accidentally disarm
a nearby monster, but disarming is an action which targets a particular
weapon rather than just a location.] Lastly, disarming always targetted
hero's primary weapon, never a dual-wielder's secondary one.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)polyself.c 3.5 2006/12/01 */
|
||||
/* SCCS Id: @(#)polyself.c 3.5 2007/02/12 */
|
||||
/* Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -722,30 +722,24 @@ drop_weapon(alone)
|
||||
int alone;
|
||||
{
|
||||
struct obj *otmp;
|
||||
struct obj *otmp2;
|
||||
|
||||
if ((otmp = uwep) != 0) {
|
||||
if (uwep) {
|
||||
/* !alone check below is currently superfluous but in the
|
||||
* future it might not be so if there are monsters which cannot
|
||||
* wear gloves but can wield weapons
|
||||
*/
|
||||
if (!alone || cantwield(youmonst.data)) {
|
||||
struct obj *wep = uwep;
|
||||
|
||||
if (alone) You("find you must drop your weapon%s!",
|
||||
u.twoweap ? "s" : "");
|
||||
otmp2 = u.twoweap ? uswapwep : 0;
|
||||
uwepgone();
|
||||
if ((!wep->cursed || wep->otyp != LOADSTONE) &&
|
||||
(wep->otyp != LEASH || wep->leashmon == 0))
|
||||
dropx(otmp);
|
||||
if (otmp2 != 0) {
|
||||
u.twoweap ? "s" : "");
|
||||
if (u.twoweap) {
|
||||
otmp = uswapwep;
|
||||
uswapwepgone();
|
||||
if ((!otmp2->cursed || otmp2->otyp != LOADSTONE) &&
|
||||
(otmp2->otyp != LEASH || otmp2->leashmon == 0))
|
||||
dropx(otmp2);
|
||||
if (canletgo(otmp, "")) dropx(otmp);
|
||||
}
|
||||
untwoweapon();
|
||||
otmp = uwep;
|
||||
uwepgone();
|
||||
if (canletgo(otmp, "")) dropx(otmp);
|
||||
update_inventory();
|
||||
} else if (!could_twoweap(youmonst.data)) {
|
||||
untwoweapon();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user