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:
@@ -862,11 +862,11 @@ struct obj *obj;
|
||||
case 1 : pline("%s too much to comprehend!", Tobjnam(obj, "are"));
|
||||
break;
|
||||
case 2 : pline("%s you!", Tobjnam(obj, "confuse"));
|
||||
make_confused(HConfusion + rnd(100),FALSE);
|
||||
make_confused((HConfusion & TIMEOUT) + (long)rnd(100), FALSE);
|
||||
break;
|
||||
case 3 : if (!resists_blnd(&youmonst)) {
|
||||
pline("%s your vision!", Tobjnam(obj, "damage"));
|
||||
make_blinded(Blinded + rnd(100),FALSE);
|
||||
make_blinded((Blinded & TIMEOUT) + (long)rnd(100), FALSE);
|
||||
if (!Blind) Your(vision_clears);
|
||||
} else {
|
||||
pline("%s your vision.", Tobjnam(obj, "assault"));
|
||||
@@ -874,7 +874,8 @@ struct obj *obj;
|
||||
}
|
||||
break;
|
||||
case 4 : pline("%s your mind!", Tobjnam(obj, "zap"));
|
||||
(void) make_hallucinated(HHallucination + rnd(100),FALSE,0L);
|
||||
(void) make_hallucinated((HHallucination & TIMEOUT) +
|
||||
(long)rnd(100), FALSE, 0L);
|
||||
break;
|
||||
case 5 : pline("%s!", Tobjnam(obj, "explode"));
|
||||
useup(obj);
|
||||
|
||||
Reference in New Issue
Block a user