diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt b/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt index 9497cd220a..8bd1d184d8 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/pokemon/Pokemon.kt @@ -942,8 +942,16 @@ open class Pokemon : ShowdownIdentifiable { this.experience = other.experience this.setFriendship(other.friendship) // Applied before current health for calcs to take place - this.ivs = other.ivs - this.evs = other.evs + other.ivs.doWithoutEmitting { + this.ivs.forEach { + other.ivs[it.key] = it.value + } + } + other.evs.doWithoutEmitting { + this.evs.forEach { + other.evs[it.key] = it.value + } + } this.currentHealth = other.currentHealth this.gender = other.gender this.moveSet.copyFrom(other.moveSet) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/ClientPokemonP1.kt b/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/ClientPokemonP1.kt index 6eb589a983..fd58ca746d 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/ClientPokemonP1.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/ClientPokemonP1.kt @@ -59,8 +59,16 @@ internal class ClientPokemonP1( other.experience = this.experience other.setFriendship(this.friendship) // Applied before current health for calcs to take place - other.ivs = this.ivs - other.evs = this.evs + other.ivs.doWithoutEmitting { + this.ivs.forEach { + other.ivs[it.key] = it.value + } + } + other.evs.doWithoutEmitting { + this.evs.forEach { + other.evs[it.key] = it.value + } + } other.currentHealth = this.currentHealth other.gender = this.gender other.moveSet.copyFrom(this.moveSet) diff --git a/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/PokemonP1.kt b/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/PokemonP1.kt index 72c39dbda9..b7f084e5ff 100644 --- a/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/PokemonP1.kt +++ b/common/src/main/kotlin/com/cobblemon/mod/common/util/codec/internal/PokemonP1.kt @@ -53,8 +53,16 @@ internal class PokemonP1( other.experience = this.experience other.setFriendship(this.friendship) // Applied before current health for calcs to take place - other.ivs = this.ivs - other.evs = this.evs + other.ivs.doWithoutEmitting { + this.ivs.forEach { + other.ivs[it.key] = it.value + } + } + other.evs.doWithoutEmitting { + this.evs.forEach { + other.evs[it.key] = it.value + } + } other.currentHealth = this.currentHealth other.gender = this.gender other.moveSet.copyFrom(this.moveSet)