Don't boost enemy trainer shiny odds with shiny charm

This commit is contained in:
Flashfyre committed 2023-10-28 10:51:34 -04:00
1 parent 1a488d421c
commit ae6d4d0ea0
6 files changed
+44 -25

No files matched your search

+1 -1
View File
@@ -253,7 +253,7 @@ export class GameData {
scene.newArena(sessionData.arena.biome, true);
sessionData.enemyParty.forEach((enemyData, e) => {
const enemyPokemon = enemyData.toPokemon(scene) as EnemyPokemon;
const enemyPokemon = enemyData.toPokemon(scene, battleType) as EnemyPokemon;
battle.enemyParty[e] = enemyPokemon;
if (battleType === BattleType.WILD)
battle.seenEnemyPartyMemberIds.add(enemyPokemon.id);
+3 -2
View File
@@ -1,3 +1,4 @@
import { BattleType } from "../battle";
import BattleScene from "../battle-scene";
import { Gender } from "../data/gender";
import { PokeballType } from "../data/pokeball";
@@ -69,10 +70,10 @@ export default class PokemonData {
}
}
toPokemon(scene: BattleScene): Pokemon {
toPokemon(scene: BattleScene, battleType?: BattleType): Pokemon {
const species = getPokemonSpecies(this.species);
if (this.player)
return new PlayerPokemon(scene, species, this.level, this.abilityIndex, this.formIndex, this.gender, this.shiny, this);
return new EnemyPokemon(scene, species, this.level, this);
return new EnemyPokemon(scene, species, this.level, battleType === BattleType.TRAINER, this);
}
}