void new_were(struct monst *mon) { int pm; pm = counter_were(monsndx(mon->data)); if (!pm) { impossible("unknown lycanthrope %s.", mon->data->mname); return; } if (canseemon(mon) && !Hallucination) pline("%s changes into a %s.", Monnam(mon), is_human(&mons[pm]) ? "human" : mons[pm].mname+4); set_mon_data(mon, &mons[pm], 0); if (mon->msleeping || !mon->mcanmove) { /* transformation wakens and/or revitalizes */ mon->msleeping = 0; mon->mfrozen = 0; /* not asleep or paralyzed */ mon->mcanmove = 1; } /* regenerate by 1/4 of the lost hit points */ mon->mhp += (mon->mhpmax - mon->mhp) / 4; newsym(mon->mx,mon->my); mon_break_armor(mon, FALSE); possibly_unwield(mon, FALSE); }
/* update the youmonst.data structure pointer */ void set_uasmon(void) { const struct permonst *pm = &mons[u.umonnum]; if (!Upolyd) pm = flags.female ? &pm_you_female : &pm_you_male; set_mon_data(&youmonst, pm, 0); }
/* update the youmonst.data structure pointer */ void set_uasmon() { set_mon_data(&youmonst, &mons[u.umonnum], 0); }
/* update the youmonst.data structure pointer */ void set_uasmon() { set_mon_data(&youmonst, ((u.umonnum == u.umonster) ? &upermonst : &mons[u.umonnum]), 0); }