From ebe848ec99fa5c65030a0cfad0a248f764b3186d Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Thu, 11 Apr 2024 02:16:41 -0600 Subject: [PATCH] Fix trap timing on Lynx CC2's goofy `on_stand` on arrival behavior made them extra extra fast, which is too fast. --- js/game.js | 3 ++- js/tiletypes.js | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/game.js b/js/game.js index 09f7498..c5b0963 100644 --- a/js/game.js +++ b/js/game.js @@ -2030,8 +2030,9 @@ export class Level extends LevelInterface { // XXX this does seem to be correct by CC2 rules, but it's very weird -- this will // usually happen anyway during the actor's idle phase. it also requires random force // floors to have a clumsy check that you aren't already about to slide + // TODO maybe don't do this for lynx? i don't really grok the implications if (tile.type.on_stand && !actor.slide_ignores(tile.type.name)) { - tile.type.on_stand(tile, this, actor); + tile.type.on_stand(tile, this, actor, true); } } } diff --git a/js/tiletypes.js b/js/tiletypes.js index 89e02a1..441a74d 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -1541,9 +1541,9 @@ const TILE_TYPES = { level._set_tile_prop(me, 'presses', 0); } }, - on_stand(me, level, other) { + on_stand(me, level, other, just_arrived) { // Lynx: open traps eject their contents at the end of each tic - if (level.compat.traps_like_lynx) { + if (level.compat.traps_like_lynx && ! just_arrived) { level.attempt_out_of_turn_step(other, other.direction); } },