add trainer party override
This commit is contained in:
parent
e325af1f0b
commit
d6ec174715
|
@ -263,6 +263,17 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
|||
let ret: EnemyPokemon;
|
||||
|
||||
this.scene.executeWithSeedOffset(() => {
|
||||
if (Overrides.TRAINER_PARTY_OVERRIDE?.length) {
|
||||
ret = this.scene.addEnemyPokemon(
|
||||
getPokemonSpecies(Overrides.TRAINER_PARTY_OVERRIDE[index % Overrides.TRAINER_PARTY_OVERRIDE.length]),
|
||||
level,
|
||||
!this.isDouble() || !(index % 2)
|
||||
? TrainerSlot.TRAINER
|
||||
: TrainerSlot.TRAINER_PARTNER
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
const template = this.getPartyTemplate();
|
||||
const strength: PartyMemberStrength = template.getStrength(index);
|
||||
|
||||
|
|
|
@ -123,6 +123,17 @@ class DefaultOverrides {
|
|||
* Force enemy AI to always switch pkmn
|
||||
*/
|
||||
readonly TRAINER_ALWAYS_SWITCHES_OVERRIDE: boolean = false;
|
||||
/**
|
||||
* Force enemy trainer battles to always pick pkmn in this order. If the
|
||||
* trainer would have more Pokemon than in the array, it will wrap around to
|
||||
* the beginning. If the trainer would have less Pokemon than in the array,
|
||||
* it will ignore the extras.
|
||||
*
|
||||
* Has no effect on wild battles. Only affects newly generated trainers (eg,
|
||||
* won't work on a saved trainer wave). OPP_SPECIES_OVERRIDE and other OPP_
|
||||
* overrides will supercede this value.
|
||||
*/
|
||||
readonly TRAINER_PARTY_OVERRIDE: Species[] = [];
|
||||
|
||||
// -------------
|
||||
// EGG OVERRIDES
|
||||
|
|
Loading…
Reference in New Issue