diff --git a/js/defs.js b/js/defs.js index 464d276..e1b0bef 100644 --- a/js/defs.js +++ b/js/defs.js @@ -152,7 +152,12 @@ export const COMPAT_FLAGS = [ rulesets: new Set(['lynx', 'ms']), }, { key: 'player_protected_by_items', - label: "Players can't get trampled when standing on items", + label: "Players can't be trampled when standing on items", + rulesets: new Set(['lynx']), +}, { + // Note that this requires no_early_push as well + key: 'player_safe_at_decision_time', + label: "Players can't be trampled at decision time", rulesets: new Set(['lynx']), }, { key: 'emulate_60fps', diff --git a/js/game.js b/js/game.js index 1c1797f..c99c620 100644 --- a/js/game.js +++ b/js/game.js @@ -1654,7 +1654,11 @@ export class Level extends LevelInterface { // a player thinks about moving into a monster, the player dies. A player standing on a // wall is only saved by the wall being checked first. This is also why standing on an // item won't save you: actors are checked before items! - if (layer === LAYERS.actor) { + if (layer === LAYERS.actor && + // Lynx: Touching a monster at decision time doesn't kill you, and pushing doesn't + // happen at decision time thanks to no_early_push + (! this.compat.player_safe_at_decision_time || push_mode === 'push')) + { this._check_for_player_death(actor, tile); }