Skip to content

Commit ec4691a

Browse files
author
PatR
committed
fewer human corpses
When a low-level trap is created with a dead pseudo-adventurer, usually make a player monster when the human case gets picked. They have default level and no inventory. They should probably be given montraits that force low level but this doesn't do that.
1 parent fa672fa commit ec4691a

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

src/mklev.c

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ mktrap_victim(struct trap *ttmp)
16931693
we're on dlvl 2 (1 is impossible) and b) we pass a coin
16941694
flip */
16951695
if (kind == SLP_GAS_TRAP && !(lvl <= 2 && rn2(2)))
1696-
victim_mnum = PM_HUMAN;
1696+
goto human;
16971697
break;
16981698
case 1: case 2:
16991699
victim_mnum = PM_DWARF;
@@ -1706,31 +1706,28 @@ mktrap_victim(struct trap *ttmp)
17061706
victim_mnum = PM_GNOME;
17071707
/* 10% chance of a candle too */
17081708
if (!rn2(10)) {
1709-
otmp = mksobj(rn2(4) ? TALLOW_CANDLE : WAX_CANDLE,
1710-
TRUE, FALSE);
1709+
otmp = mksobj(rn2(4) ? TALLOW_CANDLE : WAX_CANDLE, TRUE, FALSE);
17111710
otmp->quan = 1;
17121711
curse(otmp);
17131712
otmp->owt = weight(otmp);
17141713
place_object(otmp, x, y);
17151714
}
17161715
break;
17171716
default:
1718-
/* the most common race */
1719-
victim_mnum = PM_HUMAN;
1720-
/*
1721-
* FIXME:
1722-
* If resurrected, this corpse will produce a plain human.
1723-
* PM_HUMAN is used as a placeholder for zombie/mummy/vampire
1724-
* corpses and doesn't ordinarily occur as a living monster.
1725-
* Maybe we should generate and attach montraits for a very low
1726-
* level fake player?
1727-
*/
1717+
human:
1718+
/* human, can be any role; all fake player monsters are human;
1719+
we probably ought to generate and attach montraits for fake
1720+
players that force them to be low level in case they get
1721+
resurrected; PM_HUMAN is a placeholder monster primarily
1722+
used for zombie, mummy, and vampire corpses */
1723+
victim_mnum = !rn2(25) ? PM_HUMAN : rn1(PM_WIZARD - PM_ARCHEOLOGIST,
1724+
PM_ARCHEOLOGIST);
1725+
/* no role-specific equipment provided */
17281726
break;
17291727
}
1730-
otmp = mkcorpstat(CORPSE, NULL, &mons[victim_mnum], x, y,
1731-
CORPSTAT_INIT);
1728+
otmp = mkcorpstat(CORPSE, NULL, &mons[victim_mnum], x, y, CORPSTAT_INIT);
17321729
if (otmp)
1733-
otmp->age -= (TAINT_AGE + 1); /* died too long ago to eat */
1730+
otmp->age -= (TAINT_AGE + 1); /* died too long ago to safely eat */
17341731
}
17351732

17361733
/* mktrap(): select trap type and location, then use maketrap() to create it;

0 commit comments

Comments
 (0)