From 7990198206cecb50df5198f2232aa09f8c73161c Mon Sep 17 00:00:00 2001 From: frutescens Date: Tue, 29 Oct 2024 17:53:55 -0700 Subject: [PATCH] the fix... will maybe write a test later --- src/data/move.ts | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index c5b14304fb2..23e6e4511f5 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5921,9 +5921,28 @@ export class CopyBiomeTypeAttr extends MoveEffectAttr { return false; } - const biomeType = user.scene.arena.getTypeForBiome(); + const terrainType = user.scene.arena.getTerrainType(); + let typeChange: Type; + switch (terrainType) { + case TerrainType.ELECTRIC: + typeChange = Type.ELECTRIC; + break; + case TerrainType.MISTY: + typeChange = Type.FAIRY; + break; + case TerrainType.GRASSY: + typeChange = Type.GRASS; + break; + case TerrainType.PSYCHIC: + typeChange = Type.PSYCHIC; + break; + case TerrainType.NONE: + default: + typeChange = user.scene.arena.getTypeForBiome(); + break; + } - user.summonData.types = [ biomeType ]; + user.summonData.types = [ typeChange ]; user.updateInfo(); user.scene.queueMessage(i18next.t("moveTriggers:transformedIntoType", { pokemonName: getPokemonNameWithAffix(user), typeName: i18next.t(`pokemonInfo:Type.${Type[biomeType]}`) }));