Use TAINT_AGE for old corpses instead of hardcoded value
This commit is contained in:
@@ -477,6 +477,11 @@ enum bodypart_types {
|
||||
#define RANDOM_TIN (-2)
|
||||
#define HEALTHY_TIN (-3)
|
||||
|
||||
/* Corpse aging */
|
||||
#define TAINT_AGE (50L) /* age when corpses go bad */
|
||||
#define TROLL_REVIVE_CHANCE 37 /* 1/37 chance for 50 turns ~ 75% chance */
|
||||
#define ROT_AGE (250L) /* age when corpses rot away */
|
||||
|
||||
/* Some misc definitions */
|
||||
#define POTION_OCCUPANT_CHANCE(n) (13 + 2 * (n))
|
||||
#define WAND_BACKFIRE_CHANCE 100
|
||||
|
||||
@@ -928,7 +928,7 @@ coord *cc;
|
||||
case 1:
|
||||
You("unearth a corpse.");
|
||||
if ((otmp = mk_tt_object(CORPSE, dig_x, dig_y)) != 0)
|
||||
otmp->age -= 100; /* this is an *OLD* corpse */
|
||||
otmp->age -= (TAINT_AGE + 1); /* this is an *OLD* corpse */
|
||||
break;
|
||||
case 2:
|
||||
if (!Blind)
|
||||
|
||||
@@ -1543,7 +1543,7 @@ coord *tm;
|
||||
otmp = mkcorpstat(CORPSE, NULL, &mons[victim_mnum], m.x, m.y,
|
||||
CORPSTAT_INIT);
|
||||
if (otmp)
|
||||
otmp->age -= 51; /* died too long ago to eat */
|
||||
otmp->age -= (TAINT_AGE + 1); /* died too long ago to eat */
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1189,10 +1189,6 @@ struct obj *body;
|
||||
int rot_adjust;
|
||||
short action;
|
||||
|
||||
#define TAINT_AGE (50L) /* age when corpses go bad */
|
||||
#define TROLL_REVIVE_CHANCE 37 /* 1/37 chance for 50 turns ~ 75% chance */
|
||||
#define ROT_AGE (250L) /* age when corpses rot away */
|
||||
|
||||
/* lizards and lichen don't rot or revive */
|
||||
if (body->corpsenm == PM_LIZARD || body->corpsenm == PM_LICHEN)
|
||||
return;
|
||||
|
||||
@@ -350,7 +350,7 @@ unsigned corpseflags;
|
||||
num = undead_to_corpse(mndx);
|
||||
corpstatflags |= CORPSTAT_INIT;
|
||||
obj = mkcorpstat(CORPSE, mtmp, &mons[num], x, y, corpstatflags);
|
||||
obj->age -= 100; /* this is an *OLD* corpse */
|
||||
obj->age -= (TAINT_AGE + 1); /* this is an *OLD* corpse */
|
||||
break;
|
||||
case PM_KOBOLD_MUMMY:
|
||||
case PM_DWARF_MUMMY:
|
||||
@@ -371,7 +371,7 @@ unsigned corpseflags;
|
||||
num = undead_to_corpse(mndx);
|
||||
corpstatflags |= CORPSTAT_INIT;
|
||||
obj = mkcorpstat(CORPSE, mtmp, &mons[num], x, y, corpstatflags);
|
||||
obj->age -= 100; /* this is an *OLD* corpse */
|
||||
obj->age -= (TAINT_AGE + 1); /* this is an *OLD* corpse */
|
||||
break;
|
||||
case PM_IRON_GOLEM:
|
||||
num = d(2, 6);
|
||||
|
||||
Reference in New Issue
Block a user