intrinsics revamp (trunk only)

Simplify many of the intrinsics macros from
  #define xxx_resistance (Hxxx || Exxx || resists_xxx(&youmonst))
down to
  #define xxx_resistance (Hxxx || Exxx)
by setting or clearing an extra bit in Hxxx during polymorph so that the
resists_xxx() check becomes implicit.

     Unfornately there were lots of places in the code that treat Hxxx
as a timeout number--primarily for Stunned, Confused, and Hallucination;
Stunned happens to be one of the revised macros--rather than as a bit
mask, so this patch needed a lot more changes than originally antipated.
This commit is contained in:
nethack.rankin
2011-10-01 00:25:57 +00:00
parent cd8eefb622
commit 84f02bd336
24 changed files with 231 additions and 191 deletions

View File

@@ -1748,7 +1748,7 @@ int final;
else if (Invis) you_are("invisible to others",from_what(INVIS));
/* ordinarily "visible" is redundant; this is a special case for
the situation when invisibility would be an expected attribute */
else if ((HInvis || EInvis || pm_invisible(youmonst.data)) && BInvis)
else if ((HInvis || EInvis) && BInvis)
you_are("visible", from_what(-INVIS));
if (Displaced) you_are("displaced",from_what(DISPLACED));
if (Stealth) you_are("stealthy",from_what(STEALTH));
@@ -1821,6 +1821,8 @@ int final;
if (wizard) Sprintf(eos(buf), " (%d)", u.mtimedone);
#endif
you_are(buf,"");
if (lays_eggs(youmonst.data) && flags.female)
you_can("lay eggs", "");
}
if (Unchanging) you_can("not change from your current form",
from_what(UNCHANGING));