You can also set options automatically by placing them in the
NETHACKOPTIONS environment variable or in a configuration file.
Some versions of NetHack also have front-end programs that allow
-you to set options before starting the game.
+you to set options before starting the game or a global configuration
+for system administrators.
.hn 2
Using the NETHACKOPTIONS environment variable
.pg
A lot of speech access programs use the number-pad to review the screen.
If this is the case, disable the number_pad option and use the traditional
Rogue-like commands.
+.hn 2
+Global Configuration for System Administrators
+.pg
+If NetHack is compiled with the SYSCF option, a system administrator
+should set up a global configuration; this is a file in the
+same format as the traditional per-user configuration file (see above).
+This file should be named sysconf and placed in the same directory as
+the other NetHack support files.
+The options recognized in this file are listed below. Any option not
+set uses a compiled-in default (which may not be appropriate for your
+system).
+.pg
+.lp
+WIZARDS
+A space-separated list of user names who are allowed to play in wizard
+mode (the debugging mode, not the magic-using role). A value of a single
+asterisk (*) allows anyone to start a game in wizard mode.
+.lp
+SHELLERS
+A list of users who are allowed to use the shell escape command (!). The
+syntax is the same as WIZARDS.
+.lp
+MAXPLAYERS
+Limit the maximum number of games that can be running at the same time.
+.lp
+SUPPORT
+A string explaining how to get local support (no default value).
+.lp
+RECOVER
+A string explaining how to recover a game on this system (no default value).
+.lp
+SEDUCE
+0 or 1 to disable or enable, respectively, the SEDUCE option (see the source
+for details on this function).
+.pg
+The following options affect the score file:
+.pg
+.lp
+PERSMAX
+Maximum number of entries for one person.
+.lp
+ENTRYMAX
+Maximum number of entries in the score file.
+.lp
+POINTSMIN
+Minimum number of points to get an entry in the score file.
+.lp
+PERS_IS_UID
+0 or 1 to use user names or numeric userids, respectively, to identify
+unique people for the score file.
.hn 1
Scoring
.pg
\fBChristian ``Marvin'' Bressler\fP maintained 3.5 for the Atari after he
resurrected it for 3.3.1.
.pg
-There is a NetHack web site maintained by \fBKen Lorber\fP at http://www.nethack.org/.
+The official NetHack web site is maintained by \fBKen Lorber\fP at http://www.nethack.org/.
.pg
- - - - - - - - - -
.pg
* ENTRYMAX (max entries in the record file)
* POINTSMIN (min points to get an entry)
* PERS_IS_UID (0 or 1 - person is name or (numeric) userid)
+ * SEDUCE (0 or 1 - runtime disable/enable SEDUCE option)
*
* The following options select how the config space is stored:
* SYSCF_FILE in the named file
E void FDECL(play_sound_for_message, (const char *));
#endif
+/* ### sys.c ### */
+
+#ifdef SYSCF
+E void FDECL(sysopt_seduce_set,(int));
+#endif
+
/* ### sys/msdos/sound.c ### */
#ifdef MSDOS
int panictrace_glibc;
# endif
#endif
+ int seduce;
};
E struct sysopt sysopt;
+#ifdef SEDUCE
+# define SYSOPT_SEDUCE sysopt.seduce
+#else
+# define SYSOPT_SEDUCE 0
+#endif
+
#endif /* SYS_H */
if(sysopt.recover) free(sysopt.recover);
sysopt.recover = (char*)alloc(strlen(bufp)+1);
Strcpy(sysopt.recover, bufp);
+ } else if ( match_varname(buf, "SEDUCE", 6)) {
+ int temp = !!atoi(bufp); /* XXX this could be tighter */
+ /* allow anyone to turn it off, but only sysconf to turn it on*/
+ if(src!=SET_IN_SYS && temp!=0){
+ raw_printf("Illegal value in SEDUCE");
+ return 0;
+ }
+ sysopt.seduce = temp;
+ sysopt_seduce_set(temp);
} else if ( (src==SET_IN_SYS) && match_varname(buf, "MAXPLAYERS", 10)) {
int temp = atoi(bufp);
/* XXX to get more than 25, need to rewrite all lock code */
if(!mtmp->mcan) stealgold(mtmp);
break;
+#ifdef SEDUCE
+ case AD_SSEX:
+ if(SYSOPT_SEDUCE){
+ if(could_seduce(mtmp, &youmonst, mattk) == 1
+ && !mtmp->mcan)
+ if (doseduce(mtmp))
+ return 3;
+ break;
+ }
+ /* else FALLTHRU */
+#endif
case AD_SITM: /* for now these are the same */
case AD_SEDU:
if (is_animal(mtmp->data)) {
/* Continue below */
} else if (dmgtype(youmonst.data, AD_SEDU)
#ifdef SEDUCE
- || dmgtype(youmonst.data, AD_SSEX)
+ || (SYSOPT_SEDUCE && dmgtype(youmonst.data, AD_SSEX))
#endif
) {
pline("%s %s.", Monnam(mtmp), mtmp->minvent ?
return 3;
}
break;
-#ifdef SEDUCE
- case AD_SSEX:
- if(could_seduce(mtmp, &youmonst, mattk) == 1
- && !mtmp->mcan)
- if (doseduce(mtmp))
- return 3;
- break;
-#endif
+
case AD_SAMU:
hitmsg(mtmp, mattk);
/* when the Wiz hits, 1/20 steals the amulet */
if(agrinvis && !defperc
#ifdef SEDUCE
- && mattk && mattk->adtyp != AD_SSEX
+ && (!SYSOPT_SEDUCE || ( mattk && mattk->adtyp != AD_SSEX))
#endif
)
return 0;
if(pagr->mlet != S_NYMPH
&& ((pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS])
#ifdef SEDUCE
- || (mattk && mattk->adtyp != AD_SSEX)
+ || (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX)
#endif
))
return 0;
M3_INFRAVISIBLE|M3_INFRAVISION, CLR_BLUE),
/* standard demons & devils
*/
-#ifdef SEDUCE
-# define SEDUCTION_ATTACKS \
+#define SEDUCTION_ATTACKS_YES \
A(ATTK(AT_BITE, AD_SSEX, 0, 0), ATTK(AT_CLAW, AD_PHYS, 1, 3), \
ATTK(AT_CLAW, AD_PHYS, 1, 3), NO_ATTK, NO_ATTK, NO_ATTK)
-#else
-# define SEDUCTION_ATTACKS \
+#define SEDUCTION_ATTACKS_NO \
A(ATTK(AT_CLAW, AD_PHYS, 1, 3), ATTK(AT_CLAW, AD_PHYS, 1, 3), \
ATTK(AT_BITE, AD_DRLI, 2, 6), NO_ATTK, NO_ATTK, NO_ATTK)
+#ifdef SEDUCE
+# define SEDUCTION_ATTACKS SEDUCTION_ATTACKS_YES
+#else
+# define SEDUCTION_ATTACKS SEDUCTION_ATTACKS_NO
#endif
MON("succubus", S_DEMON,
LVL(6, 12, 0, 70, -9), (G_NOCORPSE|1),
{
return;
}
+
+struct attack sa_yes[NATTK] = SEDUCTION_ATTACKS_YES;
+struct attack sa_no[NATTK] = SEDUCTION_ATTACKS_NO;
+
#endif
/*monst.c*/
}
break;
case MS_SEDUCE:
+ {
+ int swval;
#ifdef SEDUCE
- if (ptr->mlet != S_NYMPH &&
+ if (SYSOPT_SEDUCE) {
+ if (ptr->mlet != S_NYMPH &&
could_seduce(mtmp, &youmonst, (struct attack *)0) == 1) {
(void) doseduce(mtmp);
break;
- }
- switch ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0)
-#else
- switch ((poly_gender() == 0) ? rn2(3) : 0)
+ }
+ swval = ((poly_gender() != (int) mtmp->female) ? rn2(3) : 0);
+ } else
#endif
- {
+ swval = ((poly_gender() == 0) ? rn2(3) : 0);
+ switch(swval){
case 2:
verbl_msg = "Hello, sailor.";
break;
default:
pline_msg = "cajoles you.";
}
+ }
break;
#ifdef KOPS
case MS_ARREST:
# endif
# endif
#endif
+
+#ifdef SEDUCE
+ sysopt.seduce = 1; /* if it's compiled in, default to on */
+ sysopt_seduce_set(sysopt.seduce);
+#endif
}
+
+extern struct attack sa_yes[NATTK];
+extern struct attack sa_no[NATTK];
+
+void
+sysopt_seduce_set(val)
+ int val;
+{
+ struct attack *setval = val ? sa_yes : sa_no;
+ int x;
+ for(x=0; x<NATTK; x++){
+ mons[PM_INCUBUS].mattk[x] = setval[x];
+ mons[PM_SUCCUBUS].mattk[x] = setval[x];
+ }
+}
/* succubi/incubi are humanoid, but their _second_
* attack is AT_CLAW, not their first...
*/
- if (i==1 && uwep && (u.umonnum == PM_SUCCUBUS ||
+ if (SYSOPT_SEDUCE && i==1 && uwep &&
+ (u.umonnum == PM_SUCCUBUS ||
u.umonnum == PM_INCUBUS)) goto use_weapon;
#endif
case AT_KICK:
but some need to stay cancelled */
if (!dmgtype(mtmp2->data, AD_SEDU)
#ifdef SEDUCE
- && !dmgtype(mtmp2->data, AD_SSEX)
+ && (!SYSOPT_SEDUCE || !dmgtype(mtmp2->data, AD_SSEX))
#endif
) mtmp2->mcan = 0;
mtmp2->mcansee = 1; /* set like in makemon */
# If not null, displayed at the end of a panic-save sequence.
#RECOVER=Run the recover program.
+# Uncomment the next line to disable the SEDUCE option.
+#SEDUCE=0
+
# Record (high score) file options.
# CAUTION: changing these after people have started playing games can
# lead to lost high scores!