allow optional parameter "true", "yes", "false", or "no" for boolean options
actually make the castle chest not trapped
level-drain resistance wasn't shown during enlightenment if it was conferred
- by worn/wielded equipment
+ by worn/wielded equipment or by lycanthropy
wizard mode enlightenment now shows more reasons for various intrinsics
rehumanizing after being poly'd into vampire left hero with ability to sense
humans and elves
E int FDECL(were_summon, (struct permonst *, BOOLEAN_P, int *, char *));
E void NDECL(you_were);
E void FDECL(you_unwere, (BOOLEAN_P));
+E void FDECL(set_ulycn, (int));
/* ### wield.c ### */
if (innateness == FROM_EXP)
Strcpy(buf, " because of your experience");
else if (innateness == FROM_FORM)
- Strcpy(buf, " from current creature form");
+ Strcpy(buf, (u.ulycn >= LOW_PM)
+ ? " due to your lycanthropy"
+ : " from current creature form");
else if (innateness == FROM_ROLE || innateness == FROM_RACE)
Strcpy(buf, " innately");
else if (wizard
register int pm;
{
register int tmp = 0;
- boolean catch_lycanthropy = FALSE;
+ int catch_lycanthropy = NON_PM;
/* in case `afternmv' didn't get called for previously mimicking
gold, clean up now to avoid `eatmbuf' memory leak */
pluslvl(FALSE);
break;
case PM_HUMAN_WERERAT:
- catch_lycanthropy = TRUE;
- u.ulycn = PM_WERERAT;
+ catch_lycanthropy = PM_WERERAT;
break;
case PM_HUMAN_WEREJACKAL:
- catch_lycanthropy = TRUE;
- u.ulycn = PM_WEREJACKAL;
+ catch_lycanthropy = PM_WEREJACKAL;
break;
case PM_HUMAN_WEREWOLF:
- catch_lycanthropy = TRUE;
- u.ulycn = PM_WEREWOLF;
+ catch_lycanthropy = PM_WEREWOLF;
break;
case PM_NURSE:
if (Upolyd)
gainstr((struct obj *) 0, 0, TRUE);
else if (tmp > 0)
givit(tmp, ptr);
- } break;
- }
+ break;
+ } /* default case */
+ } /* switch */
- if (catch_lycanthropy)
+ if (catch_lycanthropy >= LOW_PM) {
+ set_ulycn(catch_lycanthropy);
retouch_equipment(2);
-
+ }
return;
}
&& !Protection_from_shape_changers && !defends(AD_WERE, uwep)) {
You_feel("feverish.");
exercise(A_CON, FALSE);
- u.ulycn = monsndx(mdat);
+ set_ulycn(monsndx(mdat));
retouch_equipment(2);
}
break;
makeplural(mons[u.ulycn].mname));
if (youmonst.data == &mons[u.ulycn])
you_unwere(FALSE);
- u.ulycn = NON_PM; /* cure lycanthropy */
+ set_ulycn(NON_PM); /* cure lycanthropy */
}
losehp(Maybe_Half_Phys(d(2, 6)), "potion of holy water",
KILLED_BY_AN);
} else if (!rn2(30) || Protection_from_shape_changers) {
new_were(mon); /* change back into human form */
}
+ /* update innate intrinsics (mainly Drain_resistance) */
+ set_uasmon(); /* new_were() doesn't do this */
}
int
possibly_unwield(mon, FALSE);
}
-int were_summon(ptr, yours, visible,
- genbuf) /* were-creature (even you) summons a horde */
-register struct permonst *ptr;
-register boolean yours;
+/* were-creature (even you) summons a horde */
+int were_summon(ptr, yours, visible, genbuf)
+struct permonst *ptr;
+boolean yours;
int *visible; /* number of visible helpers created */
char *genbuf;
{
- register int i, typ, pm = monsndx(ptr);
- register struct monst *mtmp;
+ int i, typ, pm = monsndx(ptr);
+ struct monst *mtmp;
int total = 0;
*visible = 0;
if (purify) {
You_feel("purified.");
- u.ulycn = NON_PM; /* cure lycanthropy */
+ set_ulycn(NON_PM); /* cure lycanthropy */
}
if (!Unchanging && is_were(youmonst.data)
&& (!controllable_poly || yn("Remain in beast form?") == 'n'))
rehumanize();
}
+/* lycanthropy is being caught or cured, but no shape change is involved */
+void
+set_ulycn(which)
+int which;
+{
+ u.ulycn = which;
+ /* add or remove lycanthrope's innate intrinsics (Drain_resistance) */
+ set_uasmon();
+}
+
/*were.c*/