1
0
Fork 0
mirror of https://codeberg.org/noisytoot/notnotdnethack.git synced 2025-07-28 16:32:27 +01:00

Use Slime_res() in more places where it should be checked.

This commit is contained in:
ChrisANG 2021-02-09 19:44:12 -05:00
parent 9b7917dd36
commit b999aad8fb
4 changed files with 6 additions and 21 deletions

View file

@ -665,7 +665,7 @@ register struct obj *obj;
if (obj->otyp == CORPSE) {
could_petrify = touch_petrifies(&mons[obj->corpsenm]);
could_poly = polyfodder(obj) && !resists_poly(u.ustuck->data);
could_slime = (obj->corpsenm == PM_GREEN_SLIME || obj->corpsenm == PM_FLUX_SLIME) && !resists_poly(u.ustuck->data);
could_slime = (obj->corpsenm == PM_GREEN_SLIME || obj->corpsenm == PM_FLUX_SLIME) && !Slime_res(u.ustuck);
could_grow = (obj->corpsenm == PM_WRAITH);
could_heal = (obj->corpsenm == PM_NURSE);
}

View file

@ -737,10 +737,7 @@ BOOLEAN_P bld, nobadeffects;
break;
case PM_GREEN_SLIME:
case PM_FLUX_SLIME:
if (!nobadeffects && !Slimed && !Unchanging
&& !GoodHealth && !flaming(youracedata)
&& youracedata->mtyp != PM_GREEN_SLIME
) {
if (!nobadeffects && !Slime_res(&youmonst)) {
You("don't feel very well.");
Slimed = 10L;
flags.botl = 1;
@ -808,10 +805,7 @@ struct monst *mon;
case PM_GREEN_SLIME:
case PM_FLUX_SLIME:
if (!Unchanging && !GoodHealth &&
youracedata->mtyp != PM_FIRE_VORTEX &&
youracedata->mtyp != PM_FIRE_ELEMENTAL &&
youracedata->mtyp != PM_GREEN_SLIME) {
if (!Slime_res(&youmonst)) {
You("don't feel very well.");
Slimed = 10L;
}
@ -2576,8 +2570,7 @@ struct obj *otmp;
!poly_when_stoned(youracedata)));
if (mtyp == PM_GREEN_SLIME || mtyp == PM_FLUX_SLIME)
stoneorslime = (!Unchanging && !flaming(youracedata) &&
youracedata->mtyp != PM_GREEN_SLIME);
stoneorslime = !Slime_res(&youmonst);
if (cadaver && mtyp != PM_LIZARD && mtyp != PM_SMALL_CAVE_LIZARD && mtyp != PM_CAVE_LIZARD
&& mtyp != PM_LARGE_CAVE_LIZARD && mtyp != PM_LICHEN && mtyp != PM_BEHOLDER ) {

View file

@ -14544,11 +14544,7 @@ boolean endofchain; /* if the attacker has finished their attack chain */
}
else if (pd->mtyp == PM_GREEN_SLIME || pd->mtyp == PM_FLUX_SLIME) {
/* slime it */
if (!(Change_res(magr)
|| pa->mtyp == PM_GREEN_SLIME
|| pa->mtyp == PM_FLUX_SLIME
|| is_rider(pa)
|| resists_poly(pa))) {
if (!Slime_res(magr)) {
if (youdef) {
Your("%s turns %s into slime.", body_part(BODY_FLESH), mon_nam(mdef));
(void)newcham(mdef, PM_GREEN_SLIME, FALSE, FALSE);

View file

@ -1258,11 +1258,7 @@ struct permonst * pd;
/* consuming the defender is fatal */
if ((is_deadly(pd) ||
((pd->mtyp == PM_GREEN_SLIME || pd->mtyp == PM_FLUX_SLIME) &&
!(Change_res(magr)
|| pa->mtyp == PM_GREEN_SLIME
|| pa->mtyp == PM_FLUX_SLIME
|| is_rider(pa)
|| resists_poly(pa)))
!(Slime_res(magr)))
) && (
((attk->aatyp == AT_BITE || attk->aatyp == AT_LNCK || attk->aatyp == AT_5SBT) && is_vampire(pa)) ||
(attk->aatyp == AT_ENGL && attk->adtyp == AD_DGST)