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:
@@ -1,5 +1,4 @@
|
||||
/* NetHack 3.5 u_init.c $Date$ $Revision$ */
|
||||
/* SCCS Id: @(#)u_init.c 3.5 2006/12/13 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -563,6 +562,7 @@ u_init()
|
||||
u.umonnum = u.umonster = (flags.female &&
|
||||
urole.femalenum != NON_PM) ? urole.femalenum :
|
||||
urole.malenum;
|
||||
u.ulycn = NON_PM;
|
||||
set_uasmon();
|
||||
|
||||
u.ulevel = 0; /* set up some of the initial attributes */
|
||||
@@ -577,7 +577,6 @@ u_init()
|
||||
u.ublesscnt = 300; /* no prayers just yet */
|
||||
u.ualignbase[A_CURRENT] = u.ualignbase[A_ORIGINAL] = u.ualign.type =
|
||||
aligns[flags.initalign].value;
|
||||
u.ulycn = NON_PM;
|
||||
|
||||
#if defined(BSD) && !defined(POSIX_TYPES)
|
||||
(void) time((long *)&ubirthday);
|
||||
|
||||
Reference in New Issue
Block a user