SEDUCE=0
When SEDUCE is disabled, instead of swapping attacks in mons[] once, do it on the fly in getmattk() whenever needed. That allows mons[] to become readonly, although this doesn't declare it 'const' because doing so will require a zillion 'struct permonst *' updates to match. This seemed trickier than it should be, but that turned out to be because the old behavior was broken. Setting SEDUCE=0 in sysconf or user's own configuration file resulted in all succubus and incubus attacks being described as monster smiles engagingly or seductively rather than hitting (while dishing out physical damage). I didn't try rebuilding 3.4.3 to see whether this was already broken before being migrated to SYSCF.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 monst.c $NHDT-Date: 1539804880 2018/10/17 19:34:40 $ $NHDT-Branch: keni-makedefsm $:$NHDT-Revision: 1.61 $ */
|
||||
/* NetHack 3.6 monst.c $NHDT-Date: 1547118631 2019/01/10 11:10:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.62 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Michael Allison, 2006. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -3235,8 +3235,8 @@ monst_init()
|
||||
return;
|
||||
}
|
||||
|
||||
struct attack sa_yes[NATTK] = SEDUCTION_ATTACKS_YES;
|
||||
struct attack sa_no[NATTK] = SEDUCTION_ATTACKS_NO;
|
||||
const struct attack sa_yes[NATTK] = SEDUCTION_ATTACKS_YES;
|
||||
const struct attack sa_no[NATTK] = SEDUCTION_ATTACKS_NO;
|
||||
#endif
|
||||
|
||||
/*monst.c*/
|
||||
|
||||
Reference in New Issue
Block a user