Skip to content

Commit

Permalink
Make several deathmatch tweaks
Browse files Browse the repository at this point in the history
- Remove its fountains. We had previously removed water in this arena
  because it allowed the player to score an easy kill by freezing and
  melting the water under the NPC. Word has spread that you can do the
  same thing by digging the fountains first to make your own pools.
  (Also, there's no particular reason to give the player extra
  opportunities for water demon wishes or Excalibur, thus making the
  game easier. These were here only for effect.)
- Add a livelog for fleeing the deathmatch.
- Fix segfault when loading the deathmatch with no NPC files available -
  this is because pick_npc_file was changed to return a null when its
  calling code assumed it would always be returned a valid pointer.
  Restore that assumption.
  • Loading branch information
copperwater committed Sep 25, 2022
1 parent 7d1684c commit 427c59f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions dat/npcdeath.des
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ NON_DIGGABLE:(0,0,75,19)
ENGRAVING:(54,09),burn,"Point of no return"
ENGRAVING:(60,09),burn,"Two players enter, one player leaves..."

FOUNTAIN:(64,08)
FOUNTAIN:(64,10)
DOOR:closed,(53,09)

# Statues of those before...
Expand Down
4 changes: 2 additions & 2 deletions src/files.c
Original file line number Diff line number Diff line change
Expand Up @@ -5076,15 +5076,15 @@ pick_npc_file(VOID_ARGS)
DIR *d = opendir(TNNT_NPC_DIR);
int chance = 0;
struct dirent *de;
npcpath[0] = '\0';
if (!d) {
const char *errormsg;
if (!(errormsg = strerror(errno)))
errormsg = "unknown error";
impossible("can't open NPC directory at %s (%s)",
TNNT_NPC_DIR, errormsg);
return (char *) 0;
return npcpath; /* with leading \0 */
}
npcpath[0] = '\0';
while ((de = readdir(d)) != NULL) {
if (!strncmp(de->d_name, "NPC-", 4)
&& !rn2(++chance)) {
Expand Down
1 change: 1 addition & 0 deletions src/teleport.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,6 +1084,7 @@ register struct trap *ttmp;
deltrap(ttmp); /* destroy this portal - maybe unnecessary */
portal_flag = -1; /* destroy corresponding portal */
msg = "Loud booing follows you out of the arena...";
livelog_printf(LL_UMONST, "cowardly fled from the Arena");
}
}

Expand Down

0 comments on commit 427c59f

Please sign in to comment.