From 7935f280896bb938aae4eea3bc95434be730d8cc Mon Sep 17 00:00:00 2001 From: Alessandro Bruzzese <69127023+Bruzzii@users.noreply.github.com> Date: Fri, 17 May 2024 19:18:03 +0200 Subject: [PATCH 1/4] Update Italian battle.ts (#1042) --- src/locales/it/battle.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/locales/it/battle.ts b/src/locales/it/battle.ts index 3eff2493ed6..c9cf46554c0 100644 --- a/src/locales/it/battle.ts +++ b/src/locales/it/battle.ts @@ -23,16 +23,16 @@ export const battle: SimpleTranslationEntries = { "attackFailed": "Ma ha fallito!", "attackHitsCount": `Colpito {{count}} volta/e!`, "expGain": "{{pokemonName}} ha guadagnato\n{{exp}} Punti Esperienza!", - "levelUp": "{{pokemonName}} è salito al \nlivello {{level}}!", - "learnMove": "{{pokemonName}} impara \n{{moveName}}!", + "levelUp": "{{pokemonName}} è salito al\nlivello {{level}}!", + "learnMove": "{{pokemonName}} impara\n{{moveName}}!", "learnMovePrompt": "{{pokemonName}} vorrebbe imparare\n{{moveName}}.", - "learnMoveLimitReached": "Tuttavia, {{pokemonName}} \nconosce già quattro mosse.", - "learnMoveReplaceQuestion": "Vuoi che ne dimentichi una e al suo \nposto la sostituisca con {{moveName}}?", - "learnMoveStopTeaching": "Vuoi smettere di fargli imparare \n{{moveName}}?", + "learnMoveLimitReached": "Tuttavia, {{pokemonName}}\nconosce già quattro mosse.", + "learnMoveReplaceQuestion": "Vuoi che ne dimentichi una e al suo\nposto apprenda {{moveName}}?", + "learnMoveStopTeaching": "Vuoi smettere di fargli imparare\n{{moveName}}?", "learnMoveNotLearned": "{{pokemonName}} non ha imparato\n{{moveName}}.", "learnMoveForgetQuestion": "Quale mossa deve dimenticare?", "learnMoveForgetSuccess": "{{pokemonName}} ha dimenticato la mossa\n{{moveName}}.", - "countdownPoof": "@d{32}1, @d{15}2, @d{15}e@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}Puff!", + "countdownPoof": "@d{32}1, @d{15}2, @d{15}e@d{15}… @d{15}… @d{15}… @d{15}@s{pb_bounce_1}ta-daaaa!", "learnMoveAnd": "E…", "levelCapUp": "Il livello massimo\nè aumentato a {{levelCap}}!", "moveNotImplemented": "{{moveName}} non è ancora implementata e non può essere selezionata.", @@ -51,6 +51,6 @@ export const battle: SimpleTranslationEntries = { "escapeVerbFlee": "fuggendo", "notDisabled": "{{pokemonName}}'s {{moveName}} non è più\ndisabilitata!", "skipItemQuestion": "Sei sicuro di non voler prendere nessun oggetto?", - "eggHatching": "Oh?", + "eggHatching": "Oh!", "ivScannerUseQuestion": "Vuoi usare lo scanner di IV su {{pokemonName}}?" } as const; \ No newline at end of file From 04a345a6cc927c4d8857ab8a36279f623a50c96b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Ricardo=20Fleury=20Oliveira?= Date: Fri, 17 May 2024 14:19:38 -0300 Subject: [PATCH 2/4] fixed master ball (#1043) --- src/locales/pt_BR/pokeball.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/pt_BR/pokeball.ts b/src/locales/pt_BR/pokeball.ts index c93af437ba2..75d81ebde03 100644 --- a/src/locales/pt_BR/pokeball.ts +++ b/src/locales/pt_BR/pokeball.ts @@ -5,6 +5,6 @@ export const pokeball: SimpleTranslationEntries = { "greatBall": "Grande Bola", "ultraBall": "Ultra Bola", "rogueBall": "Bola Rogue", - "masterBall": "Bole Mestra", + "masterBall": "Bola Mestra", "luxuryBall": "Bola Luxo", } as const; \ No newline at end of file From 6880c7afe01a724b4bb231f366862ff008051164 Mon Sep 17 00:00:00 2001 From: Benjamin Odom Date: Fri, 17 May 2024 12:37:38 -0500 Subject: [PATCH 3/4] Updated Logic when Animating Trainer Sprites (#1016) Updated the check in place when attempting to play a trainer sprite. Separated it into a separate function to reduce reusing code and to make it easier to exit early when failures occur. --- src/field/trainer.ts | 45 ++++++++++++++++++++++++++++++-------------- 1 file changed, 31 insertions(+), 14 deletions(-) diff --git a/src/field/trainer.ts b/src/field/trainer.ts index faa691406b9..60497239488 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -370,6 +370,34 @@ export default class Trainer extends Phaser.GameObjects.Container { this.getTintSprites().map((tintSprite, i) => tintSprite.setTexture(this.getKey(!!i)).setFrame(0)); } + /** + * Attempts to animate a given set of {@linkcode Phaser.GameObjects.Sprite} + * @see {@linkcode Phaser.GameObjects.Sprite.play} + * @param sprite {@linkcode Phaser.GameObjects.Sprite} to animate + * @param tintSprite {@linkcode Phaser.GameObjects.Sprite} placed on top of the sprite to add a color tint + * @param animConfig {@linkcode Phaser.Types.Animations.PlayAnimationConfig} to pass to {@linkcode Phaser.GameObjects.Sprite.play} + * @returns true if the sprite was able to be animated + */ + tryPlaySprite(sprite: Phaser.GameObjects.Sprite, tintSprite: Phaser.GameObjects.Sprite, animConfig: Phaser.Types.Animations.PlayAnimationConfig): boolean { + // Show an error in the console if there isn't a texture loaded + if (sprite.texture.key === '__MISSING') { + console.error(`No texture found for '${animConfig.key}'!`); + + return false; + } + // Don't try to play an animation when there isn't one + if (sprite.texture.frameTotal <= 1) { + console.warn(`No animation found for '${animConfig.key}'. Is this intentional?`); + + return false; + } + + sprite.play(animConfig); + tintSprite.play(animConfig); + + return true; + } + playAnim(): void { const trainerAnimConfig = { key: this.getKey(), @@ -379,14 +407,9 @@ export default class Trainer extends Phaser.GameObjects.Container { const sprites = this.getSprites(); const tintSprites = this.getTintSprites(); - // Don't try to play an animation when there isn't one - if (sprites.length > 1) { - sprites[0].play(trainerAnimConfig); - tintSprites[0].play(trainerAnimConfig); - } - else - console.warn(`No animation found for '${this.getKey()}'. Is this intentional?`); + this.tryPlaySprite(sprites[0], tintSprites[0], trainerAnimConfig); + // Queue an animation for the second trainer if this is a double battle against two separate trainers if (this.variant === TrainerVariant.DOUBLE && !this.config.doubleOnly) { const partnerTrainerAnimConfig = { key: this.getKey(true), @@ -394,13 +417,7 @@ export default class Trainer extends Phaser.GameObjects.Container { startFrame: 0 }; - // Don't try to play an animation when there isn't one - if (sprites.length > 1) { - sprites[1].play(partnerTrainerAnimConfig); - tintSprites[1].play(partnerTrainerAnimConfig); - } - else - console.warn(`No animation found for '${this.getKey()}'. Is this intentional?`); + this.tryPlaySprite(sprites[1], tintSprites[1], partnerTrainerAnimConfig); } } From 0a871fb0d05c156a08926d5d74cc9fb2d2795619 Mon Sep 17 00:00:00 2001 From: Madmadness65 Date: Fri, 17 May 2024 12:41:16 -0500 Subject: [PATCH 4/4] Fix cut off dialogue for Morty --- src/data/dialogue.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/data/dialogue.ts b/src/data/dialogue.ts index e54196d9e25..8d1be662f73 100644 --- a/src/data/dialogue.ts +++ b/src/data/dialogue.ts @@ -909,7 +909,8 @@ export const trainerTypeDialogue = { }, [TrainerType.MORTY]: { encounter: [ - `With a little more, I could see a future in which I meet the legendary Pokémon. You're going to help me reach that level!`, + `With a little more, I could see a future in which I meet the legendary Pokémon. + $You're going to help me reach that level!`, `It's said that a rainbow-hued Pokémon will come down to appear before a truly powerful Trainer. $I believed that tale, so I have secretly trained here all my life. As a result, I can now see what others cannot. $I see a shadow of the person who will make the Pokémon appear. @@ -924,7 +925,8 @@ export const trainerTypeDialogue = { `I see… Your journey has taken you to far-away places and you have witnessed much more than I. $I envy you for that…`, `How is this possible…`, - `I don't think our potentials are so different. But you seem to have something more than that… So be it.`, + `I don't think our potentials are so different. + $But you seem to have something more than that… So be it.`, `Guess I need more training.`, `That's a shame.` ],