Skip to content

Commit

Permalink
No random role/race and no inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
omnicron-llc committed Oct 8, 2024
1 parent b7d8d8e commit 5a0cc7e
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 18 deletions.
10 changes: 5 additions & 5 deletions GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
GAMEDIR = notnotdnethackdir
GAMEDIR = ../slashdnhdir

# only used for generating include/macromagic.h
PYTHON = python3
Expand Down Expand Up @@ -37,14 +37,14 @@ CPPFLAGS += -Wno-format-overflow
.DELETE_ON_ERROR:

.PHONY: all
all: src/notnotdnethack util/recover dat/nhdat dat/license
all: src/slashdnh util/recover dat/nhdat dat/license

ATOMIC_LN = ln $(1) $(2).new && mv $(2).new $(2)

.PHONY: install
install: all
mkdir -p $(GAMEDIR)
install src/notnotdnethack $(GAMEDIR)
install src/slashdnh $(GAMEDIR)
install util/recover $(GAMEDIR)
install -m 644 dat/nhdat dat/license $(GAMEDIR)
touch $(GAMEDIR)/perm
Expand Down Expand Up @@ -84,9 +84,9 @@ GAME_O = $(SRCOBJ:%.o=src/%.o) $(SYSUNIXOBJ:%.o=sys/unix/%.o) \
$(SYSSHAREOBJ:%.o=sys/share/%.o) \
$(WINTTYOBJ:%.o=win/tty/%.o) \
$(WINCURSESOBJ:%.o=win/curses/%.o)
src/notnotdnethack: $(GAME_O)
src/slashdnh: $(GAME_O)
$(CC) $(LDFLAGS) $^ $(LDLIBS) $(GAMELIBS) -o $@
AUTO_BIN += src/notnotdnethack
AUTO_BIN += src/slashdnh

RECOVER_O = util/recover_main.o src/recover.o
util/recover: $(RECOVER_O)
Expand Down
10 changes: 5 additions & 5 deletions include/patchlevel.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/* NetHack may be freely redistributed. See license for details. */

/* NetHack 3.4.3, dNethack version 3.15.1 */
#define VERSION_MAJOR 2024
#define VERSION_MAJOR 1
/* Started at 3.4.3, for the nethack version. Incremented straight
to 3.6 with the advent of the Noble role, counting the initial
release as 3.5 (with Pirate already in, I think?).
Expand All @@ -15,7 +15,7 @@
Incremented to 3.11 with the introduction Anachrononauts.
Incremented to 3.12 with the introduction Magic chests, scrolls of antimagic, resistance, and consecration, YARevison to chaos quest, beter resistance-from-diet, and lightsaber forms.
*/
#define VERSION_MINOR 5
#define VERSION_MINOR 0
/*
* PATCHLEVEL is updated for each release.
*
Expand Down Expand Up @@ -52,18 +52,18 @@
* 3.22.0: Drow Healer, Elf Madman, Healer quest revision, Human, Vampire, and Gnome madman differentiation, new psychic and goatmom monster spells, center of all balance adjustments, y'ha-talla insight traits, amnesia cures monster madnesses, complex ward handling refactor, blasphemous lurker madness, the many wormy fingers entity (internally the "psurlon" template, but this is an artifact name), tweak glyph code to leak less info to blind PCs, allow option-file setting of template symbols, quest guardian-ship is a faction, named ("semiunique") monsters in hell get max HD and HP, and misc bug fixes and tweaks.
* 3.23.0: Yog-Sothoth cult, Cult revisions and mutations system, Bokrug "cult", Descendant option, Knight fighting styles, Advanced spellcasting fixes, Monk moves are free, Samurai "Kendo", Half dragon level 15 intrinsics, Attack and Passive pet commands, Mercurial weapon insight traits and gith artifact "swords", Scorpion Carapace revision, MC3 nerf, Monster smiths and forges v1, Random Insight monsters, Depths monster gen zone, Variable monster Hit Dice sizes, and misc bug fixes and tweaks.
*/
#define PATCHLEVEL 15
#define PATCHLEVEL 0
/*
* Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files.
*/
#define EDITLEVEL 0

#define COPYRIGHT_BANNER_A \
"notnotdNetHack, Copyright 2024"
"SlashDNH, Copyright 2025"

#define COPYRIGHT_BANNER_B \
" Based on notdNetHack, Copyright 2017-2024"
" Based on notnotdNetHack, Copyright 2017-2024"

#define COPYRIGHT_BANNER_C \
" Based on dNetHack, Copyright 2012-2024"
Expand Down
4 changes: 2 additions & 2 deletions src/allmain.c
Original file line number Diff line number Diff line change
Expand Up @@ -3711,8 +3711,8 @@ welcome(boolean new_game) /* false => restoring an old game */
Sprintf(eos(racebuf), "%s", urace.adj);
}

pline(new_game ? "%s %s, welcome to notnotdNetHack! You are a%s %s%s %s."
: "%s %s, the%s %s%s %s, welcome back to notnotdNetHack!",
pline(new_game ? "%s %s, welcome to SlashDNH! You are a%s %s%s %s."
: "%s %s, the%s %s%s %s, welcome back to SlashDNH!",
Hello((struct monst *) 0), plname, buf, racebuf, (flags.descendant) ? " descendant" : "",
(currentgend && urole.name.f) ? urole.name.f : urole.name.m);
if(iflags.dnethack_start_text){
Expand Down
2 changes: 1 addition & 1 deletion src/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,7 @@ unlock_file(const char *filename)

const char *configfile =
#ifdef UNIX
".notnotdnethackrc";
".slashdnhrc";
#else
"NetHack.cnf";
#endif
Expand Down
Binary file added src/slashdnh
Binary file not shown.
8 changes: 4 additions & 4 deletions util/makedefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,10 +412,10 @@ version_id_string(char *outbuf, const char *build_date)
#endif

if (getenv("COMMIT_DESC") && getenv("COMMIT_DESC")[0])
Sprintf(outbuf, "notnotdNetHack v%s (notnotdnethack git %s), last build %s.",
Sprintf(outbuf, "SlashDNH v%s (SlashDNH git %s), last build %s.",
version_string(versbuf), getenv("COMMIT_DESC"), build_date);
else
Sprintf(outbuf, "notnotdNetHack v%s (notnotdnethack), last build %s.",
Sprintf(outbuf, "slashdnh v%s (slashdnh), last build %s.",
version_string(versbuf), build_date);
return outbuf;
}
Expand Down Expand Up @@ -589,9 +589,9 @@ do_options(void)
build_savebones_compat_string();
Fprintf(ofp,
#ifdef BETA
"\n notnotdNetHack version %d.%d.%d [beta]\n",
"\n slashdnh version %d.%d.%d [beta]\n",
#else
"\n notnotdNetHack version %d.%d.%d\n",
"\n slashdnh version %d.%d.%d\n",
#endif
VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL);

Expand Down
3 changes: 2 additions & 1 deletion win/tty/wintty.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ tty_player_selection(void)
rigid_role_checks();

/* Should we randomly pick for the player? */
if (!flags.randomall &&
if (0 && !flags.randomall &&
(flags.initrole == ROLE_NONE || flags.initrace == ROLE_NONE ||
flags.initgend == ROLE_NONE ||
(flags.initalign == ROLE_NONE && !(flags.initrole != ROLE_NONE && roles[flags.initrole].malenum == PM_EXILE))
Expand Down Expand Up @@ -711,6 +711,7 @@ tty_player_selection(void)
}
}

flags.descendant = 0;
/* Select descendant status, if necessary */
if (flags.descendant < 0) {
if (pick4u == 'y' || flags.descendant == ROLE_RANDOM || flags.randomall || flags.initrole < 0 || !validdescendant(flags.initrole)) {
Expand Down

0 comments on commit 5a0cc7e

Please sign in to comment.