From 3c00e0ba362769218ed77cf1a03ba147662efbeb Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Tue, 11 May 2021 17:09:25 -0600 Subject: [PATCH] Fix rolling a second RFF direction under Lynx --- js/game.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/js/game.js b/js/game.js index 8901554..1c1797f 100644 --- a/js/game.js +++ b/js/game.js @@ -1081,15 +1081,16 @@ export class Level extends LevelInterface { // function, as a bonking monster will notice the item now and take it. this.step_on_cell(actor, actor.cell); - // Note that ghosts bonk even on ice corners, which they can otherwise pass through! - let forced_move = this.get_forced_move(actor, terrain); - if (actor.type.name === 'ghost') { - forced_move = actor.direction; - } - // If we got a new direction, try moving again - // FIXME in compat case, i guess we just set direction? - if (forced_move && direction !== forced_move && ! this.compat.bonking_isnt_instant) { - success = this.attempt_step(actor, forced_move); + if (! this.compat.bonking_isnt_instant) { + // Note that ghosts bonk even on ice corners, which they can otherwise pass through! + let forced_move = this.get_forced_move(actor, terrain); + if (actor.type.name === 'ghost') { + forced_move = actor.direction; + } + // If we got a new direction, try moving again + if (forced_move && direction !== forced_move) { + success = this.attempt_step(actor, forced_move); + } } } else if (terrain.type.name === 'teleport_red' && ! terrain.is_active) {