From 26b1bb5f030f9c00ec0e7e3e97f2a74499a43326 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 22 Apr 2024 11:28:13 -0400 Subject: [PATCH] Don't increment seen shiny count for trainers --- src/phases.ts | 2 +- src/system/game-data.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index 91741bacd..038907d94 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -702,7 +702,7 @@ export class EncounterPhase extends BattlePhase { } if (!this.loaded) - this.scene.gameData.setPokemonSeen(enemyPokemon); + this.scene.gameData.setPokemonSeen(enemyPokemon, true, battle.battleType === BattleType.TRAINER); if (enemyPokemon.species.speciesId === Species.ETERNATUS) { if (this.scene.gameMode.isClassic && (battle.battleSpec === BattleSpec.FINAL_BOSS || this.scene.gameMode.isWaveFinal(battle.waveIndex))) { diff --git a/src/system/game-data.ts b/src/system/game-data.ts index c5b9f32cf..0c176e446 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -993,13 +993,13 @@ export class GameData { this.starterData = starterData; } - setPokemonSeen(pokemon: Pokemon, incrementCount: boolean = true): void { + setPokemonSeen(pokemon: Pokemon, incrementCount: boolean = true, trainer: boolean = false): void { const dexEntry = this.dexData[pokemon.species.speciesId]; dexEntry.seenAttr |= pokemon.getDexAttr(); if (incrementCount) { dexEntry.seenCount++; this.gameStats.pokemonSeen++; - if (pokemon.isShiny()) + if (!trainer && pokemon.isShiny()) this.gameStats.shinyPokemonSeen++; } }