Don't boost enemy trainer shiny odds with shiny charm
This commit is contained in:
1 parent
1a488d421c
commit
ae6d4d0ea0
6 files changed
+44
-25
No files matched your search
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user