diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 753efdaf62c..f6e4cffcf1e 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -782,6 +782,14 @@ export default class BattleScene extends SceneBase { return this.getPlayerField().find(p => p.isActive()); } + /** + * Finds the first {@linkcode Pokemon.isActive() | active PlayerPokemon} that isn't also currently switching out + * @returns Either the first {@linkcode PlayerPokemon} satisfying, or undefined if no player pokemon on the field satisfy + */ + getNonSwitchedPlayerPokemon(): PlayerPokemon | undefined { + return this.getPlayerField().find(p => p.isActive() && p.switchOutStatus === false); + } + /** * Returns an array of PlayerPokemon of length 1 or 2 depending on if double battles or not * @returns array of {@linkcode PlayerPokemon} @@ -799,6 +807,14 @@ export default class BattleScene extends SceneBase { return this.getEnemyField().find(p => p.isActive()); } + /** + * Finds the first {@linkcode Pokemon.isActive() | active EnemyPokemon} pokemon from the enemy that isn't also currently switching out + * @returns Either the first {@linkcode EnemyPokemon} satisfying, or undefined if no player pokemon on the field satisfy + */ + getNonSwitchedEnemyPokemon(): EnemyPokemon | undefined { + return this.getEnemyField().find(p => p.isActive() && p.switchOutStatus === false); + } + /** * Returns an array of EnemyPokemon of length 1 or 2 depending on if double battles or not * @returns array of {@linkcode EnemyPokemon} diff --git a/src/data/battle-anims.ts b/src/data/battle-anims.ts index d972e48df7c..d7b995f748f 100644 --- a/src/data/battle-anims.ts +++ b/src/data/battle-anims.ts @@ -428,7 +428,7 @@ class AnimTimedAddBgEvent extends AnimTimedBgEvent { moveAnim.bgSprite.setScale(1.25); moveAnim.bgSprite.setAlpha(this.opacity / 255); scene.field.add(moveAnim.bgSprite); - const fieldPokemon = scene.getEnemyPokemon() || scene.getPlayerPokemon(); + const fieldPokemon = scene.getNonSwitchedEnemyPokemon() || scene.getNonSwitchedPlayerPokemon(); if (!isNullOrUndefined(priority)) { scene.field.moveTo(moveAnim.bgSprite as Phaser.GameObjects.GameObject, priority!); } else if (fieldPokemon?.isOnField()) { @@ -989,7 +989,7 @@ export abstract class BattleAnim { const setSpritePriority = (priority: integer) => { switch (priority) { case 0: - scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, scene.getEnemyPokemon() || scene.getPlayerPokemon()!); // TODO: is this bang correct? + scene.field.moveBelow(moveSprite as Phaser.GameObjects.GameObject, scene.getNonSwitchedEnemyPokemon() || scene.getNonSwitchedPlayerPokemon()!); // This bang assumes that if (the EnemyPokemon is undefined, then the PlayerPokemon function must return an object), correct assumption? break; case 1: scene.field.moveTo(moveSprite, scene.field.getAll().length - 1); diff --git a/src/data/move.ts b/src/data/move.ts index ef96ff19b07..de5176c3c84 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5221,7 +5221,6 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { switchOutTarget.leaveField(false); if (switchOutTarget.hp) { - switchOutTarget.setWildFlee(true); user.scene.queueMessage(i18next.t("moveTriggers:fled", {pokemonName: getPokemonNameWithAffix(switchOutTarget)}), null, true, 500); // in double battles redirect potential moves off fled pokemon diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 3935778296f..f7b19572038 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -99,7 +99,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { public luck: integer; public pauseEvolutions: boolean; public pokerus: boolean; - public wildFlee: boolean; + public switchOutStatus: boolean; public evoCounter: integer; public fusionSpecies: PokemonSpecies | null; @@ -145,7 +145,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.species = species; this.pokeball = dataSource?.pokeball || PokeballType.POKEBALL; this.level = level; - this.wildFlee = false; + this.switchOutStatus = false; // Determine the ability index if (abilityIndex !== undefined) { @@ -343,7 +343,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { isAllowed(): boolean { const challengeAllowed = new Utils.BooleanHolder(true); applyChallenges(this.scene.gameMode, ChallengeType.POKEMON_IN_BATTLE, this, challengeAllowed); - return !this.wildFlee && challengeAllowed.value; + return !this.isFainted() && challengeAllowed.value; } isActive(onField?: boolean): boolean { @@ -2152,11 +2152,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } /** - * sets if the pokemon has fled (implies it's a wild pokemon) + * sets if the pokemon is switching out (if it's a enemy wild implies it's going to flee) * @param status - boolean */ - setWildFlee(status: boolean): void { - this.wildFlee = status; + setSwitchOutStatus(status: boolean): void { + this.switchOutStatus = status; } updateInfo(instant?: boolean): Promise { @@ -3384,6 +3384,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.updateFusionPalette(); } this.summonData = new PokemonSummonData(); + this.setSwitchOutStatus(false); if (!this.battleData) { this.resetBattleData(); } @@ -3789,6 +3790,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { this.hideInfo(); } this.scene.field.remove(this); + this.setSwitchOutStatus(true); this.scene.triggerPokemonFormChange(this, SpeciesFormChangeActiveTrigger, true); } diff --git a/src/locales/ja/dialogue.json b/src/locales/ja/dialogue.json index 18b4677011e..ad0b00d2829 100644 --- a/src/locales/ja/dialogue.json +++ b/src/locales/ja/dialogue.json @@ -987,112 +987,112 @@ }, "stat_trainer_buck": { "encounter": { - "1": "...I'm telling you right now. I'm seriously tough. Act surprised!", - "2": "I can feel my Pokémon shivering inside their Pokéballs!" + "1": "……言っとくけど オレ 強いからな! 驚けよ!", + "2": "モンスターボールの 中で オレの ポケモン達 震えてる!\nこれ 武者震いって やつだな!" }, "victory": { - "1": "Heeheehee!\nSo hot, you!", - "2": "Heeheehee!\nSo hot, you!" + "1": "イヒヒ!\nあっちーな  おまえ!!", + "2": "イヒヒ!\nあっちーな  おまえ!!" }, "defeat": { - "1": "Whoa! You're all out of gas, I guess.", - "2": "Whoa! You're all out of gas, I guess." + "1": "おっと! 元気切れか", + "2": "おっと! 元気切れか" } }, "stat_trainer_cheryl": { "encounter": { - "1": "My Pokémon have been itching for a battle.", - "2": "I should warn you, my Pokémon can be quite rambunctious." + "1": "あたしの ポケモンたち 戦いたくて ウズウズしてるよ", + "2": "あたしの ポケモン達 結構 ヤンチャですわよ" }, "victory": { - "1": "Striking the right balance of offense and defense... It's not easy to do.", - "2": "Striking the right balance of offense and defense... It's not easy to do." + "1": "攻めること 守ること その バランスは 大変ですね…", + "2": "攻めること 守ること その バランスは 大変ですね…" }, "defeat": { - "1": "Do your Pokémon need any healing?", - "2": "Do your Pokémon need any healing?" + "1": "早く ポケモンを 回復してくださいね", + "2": "早く ポケモンを 回復してくださいね?" } }, "stat_trainer_marley": { "encounter": { - "1": "... OK.\nI'll do my best.", - "2": "... OK.\nI... won't lose...!" + "1": "……わかった\nできるだけ がんばるから", + "2": "……わかった\nあたし…… 負けないから……!" }, "victory": { - "1": "... Awww.", - "2": "... Awww." + "1": "……もう", + "2": "……もう" }, "defeat": { - "1": "... Goodbye.", - "2": "... Goodbye." + "1": "…… サヨナラ.", + "2": "…… サヨナラ" } }, "stat_trainer_mira": { "encounter": { - "1": "You will be shocked by Mira!", - "2": "Mira will show you that Mira doesn't get lost anymore!" + "1": "ミル ビックリしちゃいますよ!", + "2": "もう 迷ったりしない ってところ\nトレーナーさんに 見せるからね!" }, "victory": { - "1": "Mira wonders if she can get very far in this land.", - "2": "Mira wonders if she can get very far in this land." + "1": "これだと この地方で\nミル 活躍 できないかな…", + "2": "これだと この地方で\nミル 活躍 できないかな…" }, "defeat": { - "1": "Mira knew she would win!", - "2": "Mira knew she would win!" + "1": "やった! ミル 最強!", + "2": "やった! ミル 最強!" } }, "stat_trainer_riley": { "encounter": { - "1": "Battling is our way of greeting!", - "2": "We're pulling out all the stops to put your Pokémon down." + "1": "ポケモン勝負 こそが 私達の 挨拶さ!", + "2": "全力を出して 君の ポケモンを 倒して見せるよ" }, "victory": { - "1": "At times we battle, and sometimes we team up...$It's great how Trainers can interact.", - "2": "At times we battle, and sometimes we team up...$It's great how Trainers can interact." + "1": "戦ったり 組んでみたり……$トレーナー同士って いいよね", + "2": "戦ったり 組んでみたり……$トレーナー同士って いいよね" }, "defeat": { - "1": "You put up quite the display.\nBetter luck next time.", - "2": "You put up quite the display.\nBetter luck next time." + "1": "よく 頑張ってた…\n次が あるよ", + "2": "よく 頑張ってた…\n次が あるよ" } }, "winstrates_victor": { "encounter": { - "1": "That's the spirit! I like you!" + "1": "いい 度胸だ! 気に入ったぞ!" }, "victory": { - "1": "A-ha! You're stronger than I thought!" + "1": "たはーっ! 思っていたより 強いんだね きみは!" } }, "winstrates_victoria": { "encounter": { - "1": "My goodness! Aren't you young?$You must be quite the trainer to beat my husband, though.$Now I suppose it's my turn to battle!" + "1": "あれま! 意外に 若いのね!$うちの 主人に 勝ってしまうとは なんと 凄腕の トレーナー なの!$じゃあ こんどは 私と 勝負よ!" }, "victory": { - "1": "Uwah! Just how strong are you?!" + "1": "んまーっ! あなたって なんて 強いのかしら!" } }, "winstrates_vivi": { "encounter": { - "1": "You're stronger than Mom? Wow!$But I'm strong, too!\nReally! Honestly!" + "1": "ママより 強いなんて すごーい!$でも あたし だって 強いんだから!\nほんと なんだってば!" }, "victory": { - "1": "Huh? Did I really lose?\nSnivel... Grandmaaa!" + "1": "悔しい……\n……ぐっすん! おばあちゃーん!!" } }, "winstrates_vicky": { "encounter": { - "1": "How dare you make my precious\ngranddaughter cry!$I see I need to teach you a lesson.\nPrepare to feel the sting of defeat!" + "1": "こらーっ! わしの かわいい 孫に 何すんじゃ!$こうなったら わしが おまえさんの\nポケモンを こらしめちゃるから 覚悟せぇ!" }, "victory": { - "1": "Whoa! So strong!\nMy granddaughter wasn't lying." + "1": "フガッ! 強いのう……\n孫の いうことは 本当 じゃった" } }, "winstrates_vito": { "encounter": { - "1": "I trained together with my whole family,\nevery one of us!$I'm not losing to anyone!" + "1": "家族 全員で\nポケモンの 修行を してたんだ!$誰にも 負けないぜ!" }, "victory": { - "1": "I was better than everyone in my family.\nI've never lost before..." + "1": "家族の 誰よりも つよかった おれ……\n今まで 誰にも 負けなかった おれ……" } }, "brock": { diff --git a/src/locales/ja/mystery-encounter-messages.json b/src/locales/ja/mystery-encounter-messages.json index 5aad2d84297..f67a8764d49 100644 --- a/src/locales/ja/mystery-encounter-messages.json +++ b/src/locales/ja/mystery-encounter-messages.json @@ -1,7 +1,7 @@ { "paid_money": "{{amount, number}}円 払った", "receive_money": "{{amount, number}}円 もらった!", - "affects_pokedex": "ポケモン図鑑の データを 変える", + "affects_pokedex": "ポケモン図鑑の データに 影響する", "cancel_option": "遭遇の 選択肢に 戻る", "view_party_button": "手持ちを確認" } diff --git a/src/locales/ko/mystery-encounters/the-expert-pokemon-breeder-dialogue.json b/src/locales/ko/mystery-encounters/the-expert-pokemon-breeder-dialogue.json index b0127e02f84..09058f15c35 100644 --- a/src/locales/ko/mystery-encounters/the-expert-pokemon-breeder-dialogue.json +++ b/src/locales/ko/mystery-encounters/the-expert-pokemon-breeder-dialogue.json @@ -1,30 +1,31 @@ { - "intro": "It's a trainer carrying tons of Pokémon Eggs!", - "intro_dialogue": "Hey there, trainer!$It looks like some of your\npartner Pokémon are feeling a little down.$Why not have a battle with me to cheer them up?", - "title": "The Expert Breeder", - "description": "You've been challenged to a battle where @[TOOLTIP_TITLE]{you can only use a single Pokémon}. It might be tough, but it would surely deepen the bond you have with the Pokémon you choose!\nThe breeder will also give you some @[TOOLTIP_TITLE]{Pokémon Eggs} if you win!", - "query": "Who will you battle with?", - "cleffa_1_nickname": "Ace", - "cleffa_2_nickname": "Clefablest", - "cleffa_3_nickname": "{{speciesName}} the Great", + "intro": "포켓몬 알을 잔뜩 가진 트레이너가 나타났다!", + "intro_dialogue": "안녕하세요, 트레이너!$당신의 몇몇 파트너 포켓몬이\n조금 기운 없어 보이네요.$저와 배틀을 해서\n기운이 나게끔 해주는 건 어떨까요?", + "title": "전문 브리더", + "description": "브리더를 상대로 @[TOOLTIP_TITLE]{포켓몬 1마리만} 사용해서 승부해야 합니다. 조금 힘들겠지만, 선택한 포켓몬과 유대감이 더욱 깊어질 기회입니다!\n게다가 승리하면 @[TOOLTIP_TITLE]{포켓몬 알}까지 준다고 합니다!", + + "query": "어떤 포켓몬으로 싸우겠습니까?", + "cleffa_1_nickname": "에이스", + "cleffa_2_nickname": "픽시짱", + "cleffa_3_nickname": "{{speciesName}} 대왕", "option": { "1": { "label": "{{pokemon1Name}}", - "tooltip_base": "(-) Tough Battle\n(+) Gain Friendship with {{pokemon1Name}}" + "tooltip_base": "(-) 힘든 배틀\n(+) {{pokemon1Name}} 친밀도 상승" }, "2": { "label": "{{pokemon2Name}}", - "tooltip_base": "(-) Tough Battle\n(+) Gain Friendship with {{pokemon2Name}}" + "tooltip_base": "(-) 힘든 배틀\n(+) {{pokemon2Name}} 친밀도 상승" }, "3": { "label": "{{pokemon3Name}}", - "tooltip_base": "(-) Tough Battle\n(+) Gain Friendship with {{pokemon3Name}}" + "tooltip_base": "(-) 힘든 배틀\n(+) {{pokemon3Name}} 친밀도 상승" }, - "selected": "Let's do this!" + "selected": "그럼 갑니다!" }, - "outro": "Look how happy your {{chosenPokemon}} is now!$Here, you can have these as well.", - "gained_eggs": "@s{item_fanfare}You received {{numEggs}}!", - "eggs_tooltip": "\n(+) Earn {{eggs}}", - "numEggs_one": "{{count}} {{rarity}} Egg", - "numEggs_other": "{{count}} {{rarity}} Eggs" + "outro": "{{chosenPokemon}}[[가]] 정말 행복해 보이네요!$여기, 이것도 드릴게요.", + "gained_eggs": "@s{item_fanfare}{{numEggs}}[[를]] 받았습니다!", + "eggs_tooltip": "\n(+) {{eggs}} 획득", + "numEggs_one": "{{rarity}}알 {{count}}개", + "numEggs_other": "{{rarity}}알 {{count}}개" } diff --git a/src/locales/ko/trainer-names.json b/src/locales/ko/trainer-names.json index d41398867e1..926d9fb3677 100644 --- a/src/locales/ko/trainer-names.json +++ b/src/locales/ko/trainer-names.json @@ -173,5 +173,5 @@ "vicky": "영아", "vito": "철준", "bug_type_superfan": "벌레타입 마니아", - "expert_pokemon_breeder": "Expert Pokémon Breeder" + "expert_pokemon_breeder": "포켓몬 전문 브리더" } diff --git a/src/phases/egg-lapse-phase.ts b/src/phases/egg-lapse-phase.ts index 65426846bb3..c251819f331 100644 --- a/src/phases/egg-lapse-phase.ts +++ b/src/phases/egg-lapse-phase.ts @@ -40,7 +40,7 @@ export class EggLapsePhase extends Phase { this.showSummary(); }, () => { this.hatchEggsRegular(eggsToHatch); - this.showSummary(); + this.end(); } ); }, 100, true); diff --git a/src/test/moves/dragon_tail.test.ts b/src/test/moves/dragon_tail.test.ts index e1af29b2db1..75b2c9ba73e 100644 --- a/src/test/moves/dragon_tail.test.ts +++ b/src/test/moves/dragon_tail.test.ts @@ -50,7 +50,7 @@ describe("Moves - Dragon Tail", () => { await game.phaseInterceptor.to(BerryPhase); const isVisible = enemyPokemon.visible; - const hasFled = enemyPokemon.wildFlee; + const hasFled = enemyPokemon.switchOutStatus; expect(!isVisible && hasFled).toBe(true); // simply want to test that the game makes it this far without crashing @@ -72,7 +72,7 @@ describe("Moves - Dragon Tail", () => { await game.phaseInterceptor.to(BerryPhase); const isVisible = enemyPokemon.visible; - const hasFled = enemyPokemon.wildFlee; + const hasFled = enemyPokemon.switchOutStatus; expect(!isVisible && hasFled).toBe(true); expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); }, TIMEOUT @@ -97,9 +97,9 @@ describe("Moves - Dragon Tail", () => { await game.phaseInterceptor.to(TurnEndPhase); const isVisibleLead = enemyLeadPokemon.visible; - const hasFledLead = enemyLeadPokemon.wildFlee; + const hasFledLead = enemyLeadPokemon.switchOutStatus; const isVisibleSec = enemySecPokemon.visible; - const hasFledSec = enemySecPokemon.wildFlee; + const hasFledSec = enemySecPokemon.switchOutStatus; expect(!isVisibleLead && hasFledLead && isVisibleSec && !hasFledSec).toBe(true); expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); @@ -133,9 +133,9 @@ describe("Moves - Dragon Tail", () => { await game.phaseInterceptor.to(BerryPhase); const isVisibleLead = enemyLeadPokemon.visible; - const hasFledLead = enemyLeadPokemon.wildFlee; + const hasFledLead = enemyLeadPokemon.switchOutStatus; const isVisibleSec = enemySecPokemon.visible; - const hasFledSec = enemySecPokemon.wildFlee; + const hasFledSec = enemySecPokemon.switchOutStatus; expect(!isVisibleLead && hasFledLead && !isVisibleSec && hasFledSec).toBe(true); expect(leadPokemon.hp).toBeLessThan(leadPokemon.getMaxHp()); expect(secPokemon.hp).toBeLessThan(secPokemon.getMaxHp()); diff --git a/src/ui/run-history-ui-handler.ts b/src/ui/run-history-ui-handler.ts index 220e386c1b4..d983fb0b0b8 100644 --- a/src/ui/run-history-ui-handler.ts +++ b/src/ui/run-history-ui-handler.ts @@ -13,7 +13,7 @@ import { RunEntry } from "../system/game-data"; import { PlayerGender } from "#enums/player-gender"; import { TrainerVariant } from "../field/trainer"; -export type RunSelectCallback = (cursor: integer) => void; +export type RunSelectCallback = (cursor: number) => void; export const RUN_HISTORY_LIMIT: number = 25; @@ -25,15 +25,15 @@ export const RUN_HISTORY_LIMIT: number = 25; */ export default class RunHistoryUiHandler extends MessageUiHandler { + private readonly maxRows = 3; + private runSelectContainer: Phaser.GameObjects.Container; private runsContainer: Phaser.GameObjects.Container; - private runSelectMessageBox: Phaser.GameObjects.NineSlice; - private runSelectMessageBoxContainer: Phaser.GameObjects.Container; private runs: RunEntryContainer[]; private runSelectCallback: RunSelectCallback | null; - private scrollCursor: integer = 0; + private scrollCursor: number = 0; private cursorObj: Phaser.GameObjects.NineSlice | null; @@ -74,15 +74,15 @@ export default class RunHistoryUiHandler extends MessageUiHandler { this.getUi().bringToTop(this.runSelectContainer); this.runSelectContainer.setVisible(true); - this.populateRuns(this.scene); + this.populateRuns(this.scene).then(() => { + this.setScrollCursor(0); + this.setCursor(0); - this.setScrollCursor(0); - this.setCursor(0); - - //Destroys the cursor if there are no runs saved so far. - if (this.runs.length === 0) { - this.clearCursor(); - } + //Destroys the cursor if there are no runs saved so far. + if (this.runs.length === 0) { + this.clearCursor(); + } + }); return true; } @@ -122,13 +122,21 @@ export default class RunHistoryUiHandler extends MessageUiHandler { success = this.setCursor(this.cursor - 1); } else if (this.scrollCursor) { success = this.setScrollCursor(this.scrollCursor - 1); + } else if (this.runs.length > 1) { + // wrap around to the bottom + success = this.setCursor(Math.min(this.runs.length - 1, this.maxRows - 1)); + success = this.setScrollCursor(Math.max(0, this.runs.length - this.maxRows)) || success; } break; case Button.DOWN: - if (this.cursor < 2) { + if (this.cursor < Math.min(this.maxRows - 1, this.runs.length - this.scrollCursor - 1)) { success = this.setCursor(this.cursor + 1); - } else if (this.scrollCursor < this.runs.length - 3) { + } else if (this.scrollCursor < this.runs.length - this.maxRows) { success = this.setScrollCursor(this.scrollCursor + 1); + } else if (this.runs.length > 1) { + // wrap around to the top + success = this.setCursor(0); + success = this.setScrollCursor(0) || success; } break; } @@ -218,6 +226,7 @@ export default class RunHistoryUiHandler extends MessageUiHandler { override clear() { super.clear(); this.runSelectContainer.setVisible(false); + this.setScrollCursor(0); this.clearCursor(); this.runSelectCallback = null; this.clearRuns(); @@ -360,7 +369,7 @@ class RunEntryContainer extends Phaser.GameObjects.Container { // The code here does not account for icon weirdness. const pokemonIconsContainer = this.scene.add.container(140, 17); - data.party.forEach((p: PokemonData, i: integer) => { + data.party.forEach((p: PokemonData, i: number) => { const iconContainer = this.scene.add.container(26 * i, 0); iconContainer.setScale(0.75); const pokemon = p.toPokemon(this.scene); diff --git a/src/ui/run-info-ui-handler.ts b/src/ui/run-info-ui-handler.ts index 8b06e68b112..119b7bc9c4a 100644 --- a/src/ui/run-info-ui-handler.ts +++ b/src/ui/run-info-ui-handler.ts @@ -49,15 +49,11 @@ export default class RunInfoUiHandler extends UiHandler { private runResultContainer: Phaser.GameObjects.Container; private runInfoContainer: Phaser.GameObjects.Container; private partyContainer: Phaser.GameObjects.Container; - private partyHeldItemsContainer: Phaser.GameObjects.Container; private statsBgWidth: integer; - private partyContainerHeight: integer; - private partyContainerWidth: integer; private hallofFameContainer: Phaser.GameObjects.Container; private endCardContainer: Phaser.GameObjects.Container; - private partyInfo: Phaser.GameObjects.Container[]; private partyVisibility: Boolean; private modifiersModule: any; @@ -863,7 +859,7 @@ export default class RunInfoUiHandler extends UiHandler { private buttonCycleOption(button: Button) { switch (button) { case Button.CYCLE_FORM: - if (this.isVictory) { + if (this.isVictory && this.pageMode !== RunInfoUiMode.HALL_OF_FAME) { if (!this.endCardContainer || !this.endCardContainer.visible) { this.createVictorySplash(); this.endCardContainer.setVisible(true); @@ -877,7 +873,7 @@ export default class RunInfoUiHandler extends UiHandler { } break; case Button.CYCLE_SHINY: - if (this.isVictory) { + if (this.isVictory && this.pageMode !== RunInfoUiMode.ENDING_ART) { if (!this.hallofFameContainer.visible) { this.hallofFameContainer.setVisible(true); this.pageMode = RunInfoUiMode.HALL_OF_FAME; @@ -888,7 +884,7 @@ export default class RunInfoUiHandler extends UiHandler { } break; case Button.CYCLE_ABILITY: - if (this.runInfo.modifiers.length !== 0) { + if (this.runInfo.modifiers.length !== 0 && this.pageMode === RunInfoUiMode.MAIN) { if (this.partyVisibility) { this.showParty(false); } else { diff --git a/src/ui/ui.ts b/src/ui/ui.ts index 0f4fa52e41e..7e00c87cc5f 100644 --- a/src/ui/ui.ts +++ b/src/ui/ui.ts @@ -139,7 +139,8 @@ const noTransitionModes = [ Mode.TEST_DIALOGUE, Mode.AUTO_COMPLETE, Mode.ADMIN, - Mode.MYSTERY_ENCOUNTER + Mode.MYSTERY_ENCOUNTER, + Mode.RUN_INFO ]; export default class UI extends Phaser.GameObjects.Container {