From 99141b32424c2b1a1d6656a4f649ba592fcdb1fc Mon Sep 17 00:00:00 2001 From: Alex Smith Date: Thu, 23 Nov 2023 16:34:47 +0000 Subject: [PATCH] Add magic traps to the list of traps marked with victims early These can generate on dlvl1 and be immediately fatal, so should be marked to prevent near-unavoidable early game instadeaths. --- src/mklev.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/mklev.c b/src/mklev.c index 15df1dc1a..25fa0be04 100644 --- a/src/mklev.c +++ b/src/mklev.c @@ -1724,9 +1724,11 @@ mktrap( nonlethal, even indirectly. We also exclude all of the later/fancier traps because they tend to have special considerations (e.g. webs, portals), often are indirectly - lethal, and tend not to generate on shallower levels anyway. - Finally, pits are excluded because it's weird to see an item - in a pit and yet not be able to identify that the pit is there. */ + lethal, and tend not to generate on shallower levels anyway + (exception: magic traps can generate on dlvl 1 and be + immediately lethal). Finally, pits are excluded because it's + weird to see an item in a pit and yet not be able to identify + that the pit is there. */ if (kind != NO_TRAP && !(mktrapflags & MKTRAP_NOVICTIM) && lvl <= (unsigned) rnd(4) && kind != SQKY_BOARD && kind != RUST_TRAP @@ -1735,7 +1737,7 @@ mktrap( which case tx,ty==launch.x,y; no boulder => no dead predecessor */ && !(kind == ROLLING_BOULDER_TRAP && t->launch.x == t->tx && t->launch.y == t->ty) - && !is_pit(kind) && kind < HOLE) { + && !is_pit(kind) && (kind < HOLE || kind == MAGIC_TRAP)) { mktrap_victim(t); } }