for hero poly'd into a monster form that lacks a weapon attack but has a claw
attack, use wielded weapon even when claw attack isn't the very first
rename the SLEEPING property and Sleeping attribute to SLEEPY and Sleepy, resp.
+give alternate message for "<mon> turns to flee" when mon can't move
Platform- and/or Interface-Specific Fixes
/* NetHack 3.5 fountain.c $Date$ $Revision$ */
-/* SCCS Id: @(#)fountain.c 3.5 2009/01/31 */
/* Copyright Scott R. Turner, srt@ucla, 10/27/86 */
/* NetHack may be freely redistributed. See license for details. */
dowaternymph();
break;
- case 29: /* Scare */ {
+ case 29: /* Scare */
+ {
register struct monst *mtmp;
pline("This water gives you bad breath!");
- for(mtmp = fmon; mtmp; mtmp = mtmp->nmon)
- if(!DEADMONSTER(mtmp))
- monflee(mtmp, 0, FALSE, FALSE);
+ for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
+ if (DEADMONSTER(mtmp)) continue;
+ monflee(mtmp, 0, FALSE, FALSE);
}
break;
+ }
case 30: /* Gushing forth in this room */
if (!fleetime)
mtmp->mfleetim = 0;
else if (!mtmp->mflee || mtmp->mfleetim) {
- fleetime += mtmp->mfleetim;
+ fleetime += (int)mtmp->mfleetim;
/* ensure monster flees long enough to visibly stop fighting */
if (fleetime == 1) fleetime++;
- mtmp->mfleetim = min(fleetime, 127);
+ mtmp->mfleetim = (unsigned)min(fleetime, 127);
+ }
+ if (!mtmp->mflee && fleemsg && canseemon(mtmp) &&
+ mtmp->m_ap_type != M_AP_FURNITURE &&
+ mtmp->m_ap_type != M_AP_OBJECT) {
+ /* unfortunately we can't distinguish between temporary
+ sleep and temporary paralysis, so both conditions
+ receive the same alternate message */
+ if (!mtmp->mcanmove || !mtmp->data->mmove)
+ pline("%s seems to flinch.", Adjmonnam(mtmp, "immobile"));
+ else
+ pline("%s turns to flee.", Monnam(mtmp));
}
- if (!mtmp->mflee && fleemsg && canseemon(mtmp) && !mtmp->mfrozen &&
- mtmp->m_ap_type != M_AP_FURNITURE &&
- mtmp->m_ap_type != M_AP_OBJECT)
- pline("%s turns to flee!", (Monnam(mtmp)));
mtmp->mflee = 1;
}
}
seescaryx = u.ux;
seescaryy = u.uy;
}
- *scared = (*nearby && (onscary(seescaryx, seescaryy, mtmp) ||
- (!mtmp->mpeaceful &&
- in_your_sanctuary(mtmp, 0, 0))));
-
- if(*scared) {
- if (rn2(7))
- monflee(mtmp, rnd(10), TRUE, TRUE);
- else
- monflee(mtmp, rnd(100), TRUE, TRUE);
- }
-
+ if (*nearby &&
+ (onscary(seescaryx, seescaryy, mtmp) ||
+ (!mtmp->mpeaceful && in_your_sanctuary(mtmp, 0, 0)))) {
+ *scared = 1;
+ monflee(mtmp, rnd(rn2(7) ? 10 : 100), TRUE, TRUE);
+ } else
+ *scared = 0;
}
/* perform a special one-time action for a monster; returns -1 if nothing
/* NetHack 3.5 pline.c $Date$ $Revision$ */
-/* SCCS Id: @(#)pline.c 3.5 2009/01/29 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* [arbitrary reason why it isn't moving] */
else if (mtmp->mstrategy & STRAT_WAITMASK)
Strcat(info, ", meditating");
- else if (mtmp->mflee) Strcat(info, ", scared");
+ if (mtmp->mflee) Strcat(info, ", scared");
if (mtmp->mtrapped) Strcat(info, ", trapped");
if (mtmp->mspeed) Strcat(info,
mtmp->mspeed == MFAST ? ", fast" :
}
if (mtmp->mhp > 0) {
if (!context.mon_moving) setmangry(mtmp);
- if (tmp < 9 && !mtmp->isshk && rn2(4)) {
- if (rn2(4))
- monflee(mtmp, rnd(100), FALSE, TRUE);
- else
- monflee(mtmp, 0, FALSE, TRUE);
- }
+ if (tmp < 9 && !mtmp->isshk && rn2(4))
+ monflee(mtmp, rn2(4) ? rnd(100) : 0, FALSE, TRUE);
mtmp->mcansee = 0;
mtmp->mblinded = (tmp < 3) ? 0 : rnd(1 + 50/tmp);
}