Replace magic MINTRS/MAXTRS with a treasure attribute in YAML.
This commit is contained in:
parent
25077d0b4e
commit
c3a2816821
7 changed files with 43 additions and 107 deletions
4
score.c
4
score.c
|
@ -37,7 +37,9 @@ long score(enum termination mode)
|
|||
/* First tally up the treasures. Must be in building and not broken.
|
||||
* Give the poor guy 2 points just for finding each treasure. */
|
||||
mxscor = 0;
|
||||
for (long i = MINTRS; i <= MAXTRS; i++) {
|
||||
for (int i = 1; i <= NOBJECTS; i++) {
|
||||
if (!object_descriptions[i].is_treasure)
|
||||
continue;
|
||||
if (object_descriptions[i].inventory != 0) {
|
||||
long k = 12;
|
||||
if (i == CHEST)k = 14;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue