only give monk's "cumbersome armor" message when the armor penalty causes
an attack to miss
identified touchstone can rub on gold like the data.base entry says
+dust vortex-induced blindness should kick in immediately when blindfold
+ is removed or glop is wiped off
+prayer/unicorn-horn won't fix blindness while still engulfed in a dust
+ vortex since it will just return immediately
Platform- and/or Interface-Specific Fixes
E struct attack *FDECL(getmattk, (struct permonst *,int,int *,struct attack *));
E int FDECL(mattacku, (struct monst *));
E int FDECL(magic_negation, (struct monst *));
+E boolean NDECL(gulp_blnd_check);
E int FDECL(gazemu, (struct monst *,struct attack *));
E void FDECL(mdamageu, (struct monst *,int));
E int FDECL(could_seduce, (struct monst *,struct monst *,struct attack *));
}
if (Glib) {
- Glib = 0;
- You("wipe off your %s.", makeplural(body_part(HAND)));
- return 1;
+ Glib = 0;
+ You("wipe off your %s.", makeplural(body_part(HAND)));
+ return 1;
} else if(u.ucreamed) {
- Blinded -= u.ucreamed;
- u.ucreamed = 0;
-
- if (!Blinded) {
- pline("You've got the glop off.");
- Blinded = 1;
- make_blinded(0L,TRUE);
- } else {
- Your("%s feels clean now.", body_part(FACE));
+ Blinded -= u.ucreamed;
+ u.ucreamed = 0;
+
+ if (!Blinded) {
+ pline("You've got the glop off.");
+ if (!gulp_blnd_check()) {
+ Blinded = 1;
+ make_blinded(0L,TRUE);
}
- return 1;
+ } else {
+ Your("%s feels clean now.", body_part(FACE));
+ }
+ return 1;
}
Your("%s and %s are already clean.",
/* collect property troubles */
if (Sick) prop_trouble(SICK);
- if (Blinded > (long)u.ucreamed) prop_trouble(BLINDED);
+ if (Blinded > (long)u.ucreamed &&
+ !(u.uswallow &&
+ attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)))
+ prop_trouble(BLINDED);
if (HHallucination) prop_trouble(HALLUC);
if (Vomiting) prop_trouble(VOMITING);
if (HConfusion) prop_trouble(CONFUSION);
if (!Blinded) {
pline("You've got the glop off.");
u.ucreamed = 0;
- Blinded = 1;
- make_blinded(0L,TRUE);
+ if (!gulp_blnd_check()) {
+ Blinded = 1;
+ make_blinded(0L,TRUE);
+ }
return(0);
} else if (!u.ucreamed) {
Your("%s feels clean now.", body_part(FACE));
if (Punished) set_bc(0);
}
} else if (was_blind) {
- changed = TRUE; /* !Blind */
- You("can see again.");
+ if (!gulp_blnd_check()) {
+ changed = TRUE; /* !Blind */
+ You("can see again.");
+ }
}
if (changed) {
/* blindness has just been toggled */
you_unwere(TRUE);
break;
case CARROT:
- make_blinded((long)u.ucreamed,TRUE);
+ if (!u.uswallow ||
+ !attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND))
+ make_blinded((long)u.ucreamed,TRUE);
break;
case FORTUNE_COOKIE:
outrumor(bcsign(otmp), BY_COOKIE);
#endif /* OVL1 */
#ifdef OVLB
+/* An interface for use when taking a blindfold off, for example,
+ * to see if an engulfing attack should immediately take affect, like
+ * a passive attack. TRUE if engulfing blindness occurred */
+boolean
+gulp_blnd_check()
+{
+ struct attack *mattk;
+
+ if (!Blinded && u.uswallow &&
+ (mattk = attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)) &&
+ can_blnd(u.ustuck, &youmonst, mattk->aatyp, (struct obj*)0)) {
+ ++u.uswldtim; /* compensate for gulpmu change */
+ (void) gulpmu(u.ustuck, mattk);
+ return TRUE;
+ }
+ return FALSE;
+}
+
STATIC_OVL int
gulpmu(mtmp, mattk) /* monster swallows you, or damage if u.uswallow */
register struct monst *mtmp;
}
#endif
- if (Blinded > 1 && haseyes(youmonst.data)) return(TROUBLE_BLIND);
+ if (Blinded > 1 && haseyes(youmonst.data) &&
+ (!u.uswallow ||
+ !attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND)))
+ return(TROUBLE_BLIND);
for(i=0; i<A_MAX; i++)
if(ABASE(i) < AMAX(i)) return(TROUBLE_POISONED);
if(Wounded_legs