From b147cf8f372c7ca8824ea70485451f7432220903 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 8 Mar 2024 13:14:08 -0500 Subject: [PATCH] Fix Fake Out implementation not working properly --- src/battle-scene.ts | 1 - src/data/move.ts | 2 +- src/data/pokemon-species.ts | 4 ++-- src/phases.ts | 3 +++ src/ui/starter-select-ui-handler.ts | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 433d34829..af42d74db 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -52,7 +52,6 @@ import { getTypeRgb } from './data/type'; import PokemonSpriteSparkleHandler from './field/pokemon-sprite-sparkle-handler'; import CharSprite from './ui/char-sprite'; import DamageNumberHandler from './field/damage-number-handler'; -import { StatsContainer } from './ui/stats-container'; import PokemonInfoContainer from './ui/pokemon-info-container'; export const bypassLogin = false; diff --git a/src/data/move.ts b/src/data/move.ts index ac095bd64..0c96e7c28 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2206,7 +2206,7 @@ export class MoveCondition { export class FirstMoveCondition extends MoveCondition { constructor() { - super((user, target, move) => !user.getMoveHistory().length); + super((user, target, move) => user.battleSummonData?.turnCount === 1); } getUserBenefitScore(user: Pokemon, target: Pokemon, move: Move): integer { diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 9aaab4802..31d85e872 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -1532,7 +1532,7 @@ export function initSpecies() { new PokemonForm("Ordinary Form", "ordinary", Type.WATER, Type.FIGHTING, 1.4, 48.5, Abilities.JUSTIFIED, Abilities.NONE, Abilities.NONE, 580, 91, 72, 90, 129, 90, 108, 3, 35, 290), new PokemonForm("Resolute", "resolute", Type.WATER, Type.FIGHTING, 1.4, 48.5, Abilities.JUSTIFIED, Abilities.NONE, Abilities.NONE, 580, 91, 72, 90, 129, 90, 108, 3, 35, 290), ), - new PokemonSpecies(Species.MELOETTA, "Meloetta", 5, false, false, true, "Melody Pokémon", Type.NORMAL, Type.PSYCHIC, 0.6, 6.5, Abilities.SERENE_GRACE, Abilities.NONE, Abilities.NONE, 600, 100, 77, 77, 128, 128, 90, 3, 100, 270, GrowthRate.SLOW, null, false, true, + new PokemonSpecies(Species.MELOETTA, "Meloetta", 5, false, false, true, "Melody Pokémon", Type.NORMAL, Type.PSYCHIC, 0.6, 6.5, Abilities.SERENE_GRACE, Abilities.NONE, Abilities.NONE, 600, 100, 77, 77, 128, 128, 90, 3, 100, 270, GrowthRate.SLOW, 0, false, true, new PokemonForm("Aria Forme", "aria", Type.NORMAL, Type.PSYCHIC, 0.6, 6.5, Abilities.SERENE_GRACE, Abilities.NONE, Abilities.NONE, 600, 100, 77, 77, 128, 128, 90, 3, 100, 270), new PokemonForm("Pirouette Forme", "pirouette", Type.NORMAL, Type.FIGHTING, 0.6, 6.5, Abilities.SERENE_GRACE, Abilities.NONE, Abilities.NONE, 600, 100, 128, 90, 77, 77, 128, 3, 100, 270), ), @@ -1733,7 +1733,7 @@ export function initSpecies() { new PokemonForm("10% Forme Power Construct", "10-pc", Type.DRAGON, Type.GROUND, 1.2, 33.5, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 486, 54, 100, 71, 61, 85, 115, 3, 0, 300, false, "10"), new PokemonForm("Complete Forme", "complete", Type.DRAGON, Type.GROUND, 4.5, 610, Abilities.POWER_CONSTRUCT, Abilities.NONE, Abilities.NONE, 708, 216, 100, 121, 91, 95, 85, 3, 0, 300), ), - new PokemonSpecies(Species.DIANCIE, "Diancie", 6, false, false, true, "Jewel Pokémon", Type.ROCK, Type.FAIRY, 0.7, 8.8, Abilities.CLEAR_BODY, Abilities.NONE, Abilities.NONE, 600, 50, 100, 150, 100, 150, 50, 3, 50, 300, GrowthRate.SLOW, null, false, true, + new PokemonSpecies(Species.DIANCIE, "Diancie", 6, false, false, true, "Jewel Pokémon", Type.ROCK, Type.FAIRY, 0.7, 8.8, Abilities.CLEAR_BODY, Abilities.NONE, Abilities.NONE, 600, 50, 100, 150, 100, 150, 50, 3, 50, 300, GrowthRate.SLOW, 0, false, true, new PokemonForm("Normal", "", Type.ROCK, Type.FAIRY, 0.7, 8.8, Abilities.CLEAR_BODY, Abilities.NONE, Abilities.NONE, 600, 50, 100, 150, 100, 150, 50, 3, 50, 300), new PokemonForm("Mega", SpeciesFormKey.MEGA, Type.ROCK, Type.FAIRY, 1.1, 27.8, Abilities.MAGIC_BOUNCE, Abilities.NONE, Abilities.NONE, 700, 50, 160, 110, 160, 110, 110, 3, 50, 300), ), diff --git a/src/phases.ts b/src/phases.ts index 94c12d4c6..fe863ce78 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1150,6 +1150,9 @@ export class SwitchSummonPhase extends SummonPhase { const pokemon = this.getPokemon(); + // Compensate for turn spent summoning + pokemon.battleSummonData.turnCount--; + if (this.batonPass && pokemon) pokemon.transferSummon(this.lastPokemon); diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 885c3d62c..029d333b6 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -335,7 +335,7 @@ export default class StarterSelectUiHandler extends MessageUiHandler { moveContainer.add(moveLabel); this.pokemonMoveContainers.push(moveContainer); - this.pokemonMovesContainer.add(moveContainer); + this.pokemonMovesContainer.add(moveContainer); } this.pokemonAdditionalMoveCountLabel = addTextObject(this.scene, -this.pokemonMoveBgs[0].width / 2, 56, '(+0)', TextStyle.PARTY);