int dobreathe(void) { const struct attack *mattk; schar dx, dy, dz; if (Strangled) { pline("You can't breathe. Sorry."); return 0; } if (u.uen < 15) { pline("You don't have enough energy to breathe!"); return 0; } u.uen -= 15; iflags.botl = 1; if (!getdir(NULL, &dx, &dy, &dz)) return 0; mattk = attacktype_fordmg(youmonst.data, AT_BREA, AD_ANY); if (!mattk) impossible("bad breath attack?"); /* mouthwash needed... */ else buzz((int) (20 + mattk->adtyp-1), (int)mattk->damn, u.ux, u.uy, dx, dy); return 1; }
int dobreathe(void) { const struct attack *mattk; if (Strangled) { You_cant("breathe. Sorry."); return(0); } if (u.uen < 15) { You("don't have enough energy to breathe!"); return (0); } u.uen -= 15; if (!getdir((char *)0)) return (0); mattk = attacktype_fordmg(youmonst.data, AT_BREA, AD_ANY); if (!mattk) impossible("bad breath attack?"); /* mouthwash needed... */ else buzz((int)(20 + mattk->adtyp - 1), (int)mattk->damn, u.ux, u.uy, u.delta.x, u.delta.y); return (1); }
boolean attacktype(const struct permonst * ptr, int atyp) { return attacktype_fordmg(ptr, atyp, AD_ANY) ? TRUE : FALSE; }