From 459120313ece28a9fc10027f418832ccf21bc6b2 Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Wed, 23 Sep 2020 22:55:12 -0600 Subject: [PATCH] Eject actors from open traps immediately --- js/tiletypes.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/tiletypes.js b/js/tiletypes.js index fa3458a..77ac9b9 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -622,7 +622,11 @@ const TILE_TYPES = { trap: { draw_layer: LAYER_TERRAIN, on_arrive(me, level, other) { - if (! me.open) { + if (me.open) { + // Traps immediately eject their contents, if possible + level.attempt_step(other, other.direction); + } + else { level.set_actor_stuck(other, true); } },