From 235cc79e8bef39b688b1af622b2d352f1d76b99a Mon Sep 17 00:00:00 2001 From: "Eevee (Evelyn Woods)" Date: Wed, 9 Dec 2020 20:22:35 -0700 Subject: [PATCH] Add LL-specific exit poses for Lexy and Cerise --- js/game.js | 1 + js/tileset.js | 12 +++++++++++- js/tiletypes.js | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/js/game.js b/js/game.js index 9e64d56..eae3ae7 100644 --- a/js/game.js +++ b/js/game.js @@ -1531,6 +1531,7 @@ export class Level { win() { this.sfx.play_once('win'); this.state = 'success'; + this._set_tile_prop(this.player, 'exited', true); throw new GameEnded; } diff --git a/js/tileset.js b/js/tileset.js index 96d6eda..4ca68aa 100644 --- a/js/tileset.js +++ b/js/tileset.js @@ -454,6 +454,7 @@ export const CC2_TILESET_LAYOUT = { south: [2, 23], west: [10, 23], }, + exited: 'normal', // These are frames from the splash/explosion animations drowned: [5, 5], slimed: [5, 5], @@ -577,6 +578,7 @@ export const CC2_TILESET_LAYOUT = { south: [2, 28], west: [10, 28], }, + exited: 'normal', // These are frames from the splash/explosion animations drowned: [5, 5], slimed: [5, 5], @@ -817,6 +819,7 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, { west: [3, 33], }, forced: 'skating', + exited: [14, 32], burned: { north: [4, 33], east: [5, 33], @@ -825,8 +828,15 @@ export const LL_TILESET_LAYOUT = Object.assign({}, CC2_TILESET_LAYOUT, { }, slimed: [1, 38], }), - // TODO player2 equivalents player2: Object.assign({}, CC2_TILESET_LAYOUT.player2, { + // TODO skating + exited: [15, 32], + burned: { + north: [12, 33], + east: [13, 33], + south: [14, 33], + west: [15, 33], + }, slimed: [1, 38], }), bogus_player_burned_fire: { diff --git a/js/tiletypes.js b/js/tiletypes.js index 15c23f1..a9acaee 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -63,6 +63,9 @@ function player_visual_state(me) { else if (me.fail_reason) { return 'failed'; } + else if (me.exited) { + return 'exited'; + } else if (me.cell && (me.previous_cell || me.cell).some(t => t.type.name === 'water')) { // CC2 shows a swimming pose while still in water, or moving away from water return 'swimming';