Abolish MAXDIE in favor of maximum_deaths.
This commit is contained in:
parent
803d2b6ef9
commit
06e8d5a83e
4 changed files with 5 additions and 14 deletions
|
@ -502,14 +502,6 @@ static void write_hints(FILE* header_file, long matrix[][HINTLEN], long dim1, lo
|
|||
|
||||
static void write_file(FILE* header_file)
|
||||
{
|
||||
int MAXDIE;
|
||||
for (int i = 0; i <= 4; i++) {
|
||||
long x = 2 * i + 81;
|
||||
if (RTEXT[x] != 0)
|
||||
MAXDIE = i + 1;
|
||||
}
|
||||
|
||||
|
||||
fprintf(header_file, "#ifndef DATABASE_H\n");
|
||||
fprintf(header_file, "#define DATABASE_H\n");
|
||||
fprintf(header_file, "\n");
|
||||
|
@ -518,7 +510,6 @@ static void write_file(FILE* header_file)
|
|||
fprintf(header_file, "#define TABSIZ 330\n");
|
||||
fprintf(header_file, "#define HNTSIZ 20\n");
|
||||
fprintf(header_file, "#define TOKLEN %d\n", TOKLEN);
|
||||
fprintf(header_file, "#define MAXDIE %d\n", MAXDIE);
|
||||
fprintf(header_file, "\n");
|
||||
|
||||
fprintf(header_file, "\n");
|
||||
|
|
2
init.c
2
init.c
|
@ -350,7 +350,7 @@ void initialise(void)
|
|||
* game.iwest How many times he's said "west" instead of "w"
|
||||
* game.knfloc 0 if no knife here, loc if knife here, -1 after caveat
|
||||
* game.limit Lifetime of lamp (not set here)
|
||||
* MAXDIE Number of reincarnation messages available (up to 5)
|
||||
* maximum_deaths Number of reincarnation messages available (up to 5)
|
||||
* game.numdie Number of times killed so far
|
||||
* game.thresh Next #turns threshhold (-1 if none)
|
||||
* game.trndex Index in TRNVAL of next threshold (db section 14)
|
||||
|
|
2
main.c
2
main.c
|
@ -470,7 +470,7 @@ static bool dwarfmove(void)
|
|||
/* "You're dead, Jim."
|
||||
*
|
||||
* If the current loc is zero, it means the clown got himself killed.
|
||||
* We'll allow this maxdie times. MAXDIE is automatically set based
|
||||
* We'll allow this maxdie times. maximum_deaths is automatically set based
|
||||
* on the number of snide messages available. Each death results in
|
||||
* a message (81, 83, etc.) which offers reincarnation; if accepted,
|
||||
* this results in message 82, 84, etc. The last time, if he wants
|
||||
|
|
6
score.c
6
score.c
|
@ -50,14 +50,14 @@ long score(enum termination mode)
|
|||
}
|
||||
}
|
||||
|
||||
/* Now look at how he finished and how far he got. MAXDIE and
|
||||
/* Now look at how he finished and how far he got. maximum_deaths and
|
||||
* game.numdie tell us how well he survived. game.dflag will tell us
|
||||
* if he ever got suitably deep into the cave. game.closng still
|
||||
* indicates whether he reached the endgame. And if he got as far as
|
||||
* "cave closed" (indicated by "game.closed"), then bonus is zero for
|
||||
* mundane exits or 133, 134, 135 if he blew it (so to speak). */
|
||||
score += (MAXDIE - game.numdie) * 10;
|
||||
mxscor += MAXDIE * 10;
|
||||
score += (maximum_deaths - game.numdie) * 10;
|
||||
mxscor += maximum_deaths * 10;
|
||||
if (mode == endgame)
|
||||
score += 4;
|
||||
mxscor += 4;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue