Fix tera type access (#5364)

This commit is contained in:
Xavion3 2025-02-25 04:33:39 +11:00 committed by GitHub
parent 5996f8c6eb
commit 0cb3a28dfa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 6 deletions

View File

@ -2848,7 +2848,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
stabMultiplier.value += 0.5; 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) { if (matchesSourceType) {
stabMultiplier.value += 0.5; stabMultiplier.value += 0.5;
} else { } else {
@ -4632,7 +4632,7 @@ export class PlayerPokemon extends Pokemon {
newPokemon.fusionVariant = this.fusionVariant; newPokemon.fusionVariant = this.fusionVariant;
newPokemon.fusionGender = this.fusionGender; newPokemon.fusionGender = this.fusionGender;
newPokemon.fusionLuck = this.fusionLuck; newPokemon.fusionLuck = this.fusionLuck;
newPokemon.fusionTeraType = this.teraType; newPokemon.fusionTeraType = this.fusionTeraType;
newPokemon.usedTMs = this.usedTMs; newPokemon.usedTMs = this.usedTMs;
globalScene.getPlayerParty().push(newPokemon); globalScene.getPlayerParty().push(newPokemon);

View File

@ -20,9 +20,7 @@ export class TeraPhase extends BattlePhase {
start() { start() {
super.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.getTeraType()]}`) }));
globalScene.queueMessage(i18next.t("battle:pokemonTerastallized", { pokemonNameWithAffix: getPokemonNameWithAffix(this.pokemon), type: i18next.t(`pokemonInfo:Type.${Type[this.pokemon.teraType]}`) }));
new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => { new CommonBattleAnim(CommonAnim.TERASTALLIZE, this.pokemon).play(false, () => {
this.end(); this.end();
}); });
@ -41,7 +39,7 @@ export class TeraPhase extends BattlePhase {
if (this.pokemon.isPlayer()) { if (this.pokemon.isPlayer()) {
globalScene.validateAchv(achvs.TERASTALLIZE); globalScene.validateAchv(achvs.TERASTALLIZE);
if (this.pokemon.teraType === Type.STELLAR) { if (this.pokemon.getTeraType() === Type.STELLAR) {
globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE); globalScene.validateAchv(achvs.STELLAR_TERASTALLIZE);
} }
} }