From 0cb3a28dfa757b6d2e5b758923728ce006ef4335 Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Tue, 25 Feb 2025 04:33:39 +1100 Subject: [PATCH] Fix tera type access (#5364) --- src/field/pokemon.ts | 4 ++-- src/phases/tera-phase.ts | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index ed27dd41f6a..61815ec649c 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -2848,7 +2848,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { stabMultiplier.value += 0.5; } - if (source.isTerastallized && source.teraType === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { + if (source.isTerastallized && source.getTeraType() === Type.STELLAR && (!source.stellarTypesBoosted.includes(moveType) || source.hasSpecies(Species.TERAPAGOS))) { if (matchesSourceType) { stabMultiplier.value += 0.5; } else { @@ -4632,7 +4632,7 @@ export class PlayerPokemon extends Pokemon { newPokemon.fusionVariant = this.fusionVariant; newPokemon.fusionGender = this.fusionGender; newPokemon.fusionLuck = this.fusionLuck; - newPokemon.fusionTeraType = this.teraType; + newPokemon.fusionTeraType = this.fusionTeraType; newPokemon.usedTMs = this.usedTMs; globalScene.getPlayerParty().push(newPokemon); diff --git a/src/phases/tera-phase.ts b/src/phases/tera-phase.ts index f4b72d39192..462a4e1882e 100644 --- a/src/phases/tera-phase.ts +++ b/src/phases/tera-phase.ts @@ -20,9 +20,7 @@ export class TeraPhase extends BattlePhase { start() { super.start(); - console.log(this.pokemon.name, "terastallized to", Type[this.pokemon.teraType].toString()); - - globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.teraType]}`) })); + globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.getTeraType()]}`) })); new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => { this.end(); }); @@ -41,7 +39,7 @@ export class TeraPhase extends BattlePhase { if (this.pokemon.isPlayer()) { globalScene.validateAchv(achvs.TERASTALLIZE); - if (this.pokemon.teraType === Type.STELLAR) { + if (this.pokemon.getTeraType() === Type.STELLAR) { globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE); } }