slime groundwork

New macro slimeproof() to decide whether something is susceptible
to turning into green slime.  Most of this is just making use of existing
cached permonst values in damageum() and mdamagem() and shouldn't affect
anything.  I wanted to avoid mixing that in with the actual slime changes
which are coming.
This commit is contained in:
nethack.rankin
2007-04-30 02:18:03 +00:00
parent 94327317c2
commit 9870c9aaa3
4 changed files with 36 additions and 39 deletions

View File

@@ -687,8 +687,7 @@ register int pm;
return;
}
case PM_GREEN_SLIME:
if (!Slimed && !Unchanging && !flaming(youmonst.data) &&
youmonst.data != &mons[PM_GREEN_SLIME]) {
if (!Slimed && !Unchanging && !slimeproof(youmonst.data)) {
You("don't feel very well.");
make_slimed(10L, (char*) 0);
delayed_killer(SLIMED, KILLED_BY_AN, nul);
@@ -2146,8 +2145,7 @@ struct obj *otmp;
!poly_when_stoned(youmonst.data));
if (mnum == PM_GREEN_SLIME)
stoneorslime = (!Unchanging && !flaming(youmonst.data) &&
youmonst.data != &mons[PM_GREEN_SLIME]);
stoneorslime = (!Unchanging && !slimeproof(youmonst.data));
if (cadaver && !nonrotting_corpse(mnum)) {
long age = peek_at_iced_corpse_age(otmp);