Fix rolling a second RFF direction under Lynx

This commit is contained in:
Eevee (Evelyn Woods) 2021-05-11 17:09:25 -06:00
parent c9a2897bc2
commit 3c00e0ba36

View File

@ -1081,15 +1081,16 @@ export class Level extends LevelInterface {
// function, as a bonking monster will notice the item now and take it. // function, as a bonking monster will notice the item now and take it.
this.step_on_cell(actor, actor.cell); this.step_on_cell(actor, actor.cell);
// Note that ghosts bonk even on ice corners, which they can otherwise pass through! if (! this.compat.bonking_isnt_instant) {
let forced_move = this.get_forced_move(actor, terrain); // Note that ghosts bonk even on ice corners, which they can otherwise pass through!
if (actor.type.name === 'ghost') { let forced_move = this.get_forced_move(actor, terrain);
forced_move = actor.direction; 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 we got a new direction, try moving again
if (forced_move && direction !== forced_move && ! this.compat.bonking_isnt_instant) { if (forced_move && direction !== forced_move) {
success = this.attempt_step(actor, forced_move); success = this.attempt_step(actor, forced_move);
}
} }
} }
else if (terrain.type.name === 'teleport_red' && ! terrain.is_active) { else if (terrain.type.name === 'teleport_red' && ! terrain.is_active) {