Nothing is awake and watching when the party arrives
Room 0 is left empty so that arriving is not an ambush, but that only ever covered room 0. An enemy in a neighbouring room within aggro range and in sight of the entrance woke the moment you arrived -- in one run in eight before the tunnels were widened, and in three runs in eight after, because wider tunnels mean more open ground and more lines of sight. Measured over 200 runs: 25 before, 75 after. A screenshot of an arrival with enemies visibly in range is what prompted counting. Room enemies that would be awake on arrival -- within their aggro range of the entrance with nothing in the way, the same two questions aggro asks -- are now skipped. That is about one enemy in sixteen. Clearing everything within aggro range regardless of sight would have removed nearly a third, which is a different dungeon rather than a fixed one. The skipped enemy's dice have already been rolled, so every other enemy stands exactly where that seed always put it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
19d2295bec
commit
99f0d2a783
2 files changed
+44
No files matched your search
@@ -211,3 +211,26 @@ func test_boss_rush_leaves_the_tunnels_empty_too() -> void:
|
||||
var run := Instance.make_dungeon(2, 4242, 3)
|
||||
GameOpts.boss_rush = false
|
||||
assert_eq(_tunnel_enemies(run).size(), 0)
|
||||
|
||||
|
||||
func test_nothing_is_awake_and_watching_when_the_party_arrives() -> void:
|
||||
# Room 0 is left empty so that arriving is not an ambush, but that only ever
|
||||
# covered room 0. With tunnels widened, three runs in eight had an enemy in
|
||||
# a neighbouring room within aggro range and in sight of the entrance.
|
||||
var watching := 0
|
||||
for s in range(1, 120):
|
||||
var run := Instance.make_dungeon(2, s * 7919, 1 + (s % 3))
|
||||
for e in run.world.enemies.values():
|
||||
if e.pos.distance_to(run.world.spawn_point) <= e.def.aggro_range \
|
||||
and run.world.map.has_line_of_sight(e.pos, run.world.spawn_point):
|
||||
watching += 1
|
||||
assert_eq(watching, 0, "%d enemies could see the entrance at the moment of arrival" % watching)
|
||||
|
||||
|
||||
func test_clearing_the_entrance_leaves_the_rest_of_the_dungeon_alone() -> void:
|
||||
# It skips the few enemies that would be awake on arrival and nothing else:
|
||||
# the dungeon keeps nearly all of its population.
|
||||
var total := 0
|
||||
for s in range(1, 40):
|
||||
total += Instance.make_dungeon(2, s * 7919, 1).world.enemies.size()
|
||||
assert_gt(float(total) / 39.0, 9.0, "a depth-1 dungeon still has a dungeon's worth of enemies")
|
||||
Reference in new issue
Block a user