diff --git a/src/data/move.ts b/src/data/move.ts index 9979b24cc24..76c094cd197 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5947,11 +5947,7 @@ export class AddTypeAttr extends MoveEffectAttr { } apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { - const types = target.getTypes().slice(0, 2).filter(t => t !== Type.UNKNOWN); // TODO: Figure out some way to actually check if another version of this effect is already applied - if (this.type !== Type.UNKNOWN) { - types.push(this.type); - } - target.summonData.types = types; + target.summonData.addedType = this.type; target.updateInfo(); user.scene.queueMessage(i18next.t("moveTriggers:addType", { typeName: i18next.t(`pokemonInfo:Type.${Type[this.type]}`), pokemonName: getPokemonNameWithAffix(target) })); @@ -8983,8 +8979,7 @@ export function initMoves() { .ignoresProtect() .ignoresVirtual(), new StatusMove(Moves.TRICK_OR_TREAT, Type.GHOST, 100, 20, -1, 0, 6) - .attr(AddTypeAttr, Type.GHOST) - .edgeCase(), // Weird interaction with Forest's Curse, reflect type, burn up + .attr(AddTypeAttr, Type.GHOST), new StatusMove(Moves.NOBLE_ROAR, Type.NORMAL, 100, 30, -1, 0, 6) .attr(StatStageChangeAttr, [ Stat.ATK, Stat.SPATK ], -1) .soundBased(), @@ -8996,8 +8991,7 @@ export function initMoves() { .target(MoveTarget.ALL_NEAR_OTHERS) .triageMove(), new StatusMove(Moves.FORESTS_CURSE, Type.GRASS, 100, 20, -1, 0, 6) - .attr(AddTypeAttr, Type.GRASS) - .edgeCase(), // Weird interaction with Trick or Treat, reflect type, burn up + .attr(AddTypeAttr, Type.GRASS), new AttackMove(Moves.PETAL_BLIZZARD, Type.GRASS, MoveCategory.PHYSICAL, 90, 100, 15, -1, 0, 6) .windMove() .makesContact(false) diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index a708b2067a7..483865da144 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1244,6 +1244,11 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { } } + // the type added to Pokemon from moves like Forest's Curse or Trick Or Treat + if (this.summonData?.addedType) { + types.push(this.summonData?.addedType); + } + // this.scene potentially can be undefined for a fainted pokemon in doubles // use optional chaining to avoid runtime errors @@ -5090,6 +5095,7 @@ export class PokemonSummonData { public moveset: (PokemonMove | null)[]; // If not initialized this value will not be populated from save data. public types: Type[] = []; + public addedType: Type | null = null; } export class PokemonBattleData {