tin variety followup (trunk only)

This commit is contained in:
nethack.allison
2003-10-28 04:14:01 +00:00
parent d08dcbc3fb
commit 4c0d380e68
5 changed files with 7 additions and 6 deletions

View File

@@ -1008,13 +1008,13 @@ int forcetype;
return;
} else if (forcetype >= 0 && forcetype < TTSZ-1) {
r = forcetype;
} else {
} else { /* RANDOM_TIN */
r = rn2(TTSZ-1); /* take your pick */
if (r == ROTTEN_TIN && (obj->corpsenm == PM_LIZARD ||
obj->corpsenm == PM_LICHEN))
r = HOMEMADE_TIN; /* lizards don't rot */
}
obj->spe = -(r+1);
obj->spe = -(r+1); /* offset by 1 to allow index 0 */
}
STATIC_OVL int
@@ -1027,7 +1027,7 @@ struct obj *obj;
r = ROTTEN_TIN; /* always rotten if cursed */
} else if (obj->spe < 0) {
r = -(obj->spe);
--r;
--r; /* get rid of the offset */
} else
r = rn2(TTSZ-1);

View File

@@ -431,7 +431,7 @@ boolean artif;
if (mons[mndx].cnutrit &&
!(mvitals[mndx].mvflags & G_NOCORPSE)) {
otmp->corpsenm = mndx;
set_tin_variety(otmp, 0);
set_tin_variety(otmp, RANDOM_TIN);
break;
}
}

View File

@@ -1802,7 +1802,7 @@ boolean from_user;
#endif
ispoisoned = isgreased = eroded = eroded2 = erodeproof =
halfeaten = islit = unlabeled = ishistoric = isdiluted = 0;
tvariety = -1;
tvariety = RANDOM_TIN;
mntmp = NON_PM;
#define UNDEFINED 0
#define EMPTY 1