fix spelling of Dr Dolittle
hero's sleep resistance shouldn't protect steed from sleeping gas trap
dropped wielded, in use leash should remain in inventory, since it's in-use
+wielded, in use leash can't be snatched by whip-wielding monster
+when using two weapons at once, whip-wielding monster can target either one
Platform- and/or Interface-Specific Fixes
m.has_misc = MUSE_POT_GAIN_LEVEL;
}
nomore(MUSE_BULLWHIP);
- if(obj->otyp == BULLWHIP && (MON_WEP(mtmp) == obj) &&
- distu(mtmp->mx,mtmp->my)==1 && uwep && !mtmp->mpeaceful) {
+ if (obj->otyp == BULLWHIP && !mtmp->mpeaceful &&
+ /* the random test prevents whip-wielding
+ monster from attempting disarm every turn */
+ uwep && !rn2(5) && obj == MON_WEP(mtmp) &&
+ /* hero's location must be known and adjacent */
+ mtmp->mux == u.ux && mtmp->muy == u.uy &&
+ distu(mtmp->mx, mtmp->my) <= 2 &&
+ /* don't bother if it can't work (this doesn't
+ prevent cursed weapons from being targetted) */
+ (canletgo(uwep, "") ||
+ (u.twoweap && canletgo(uswapwep, "")))) {
m.misc = obj;
m.has_misc = MUSE_BULLWHIP;
}
return 2;
case MUSE_BULLWHIP:
/* attempt to disarm hero */
- if (uwep && !rn2(5)) {
+ {
const char *The_whip = vismon ? "The bullwhip" : "A whip";
int where_to = rn2(4);
struct obj *obj = uwep;
const char *hand;
char the_weapon[BUFSZ];
+ if (!obj || !canletgo(obj, "") ||
+ (u.twoweap && canletgo(uswapwep, "") && rn2(2)))
+ obj = uswapwep;
+ if (!obj) break; /* shouldn't happen after find_misc() */
+
Strcpy(the_weapon, the(xname(obj)));
hand = body_part(HAND);
if (bimanual(obj)) hand = makeplural(hand);
weapon; drop it at hero's feet instead */
where_to = 2;
}
+ remove_worn_item(obj, FALSE);
freeinv(obj);
- uwepgone();
switch (where_to) {
case 1: /* onto floor beneath mon */
pline("%s yanks %s from your %s!", Monnam(mtmp),
-/* 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. */
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();
}