Add fusion options to overrides
This commit is contained in:
parent
fe69bd2b55
commit
21bafb4eb2
|
@ -884,6 +884,9 @@ export default class BattleScene extends SceneBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
|
const pokemon = new EnemyPokemon(this, species, level, trainerSlot, boss, dataSource);
|
||||||
|
if (Overrides.OPP_FUSION_OVERRIDE) {
|
||||||
|
pokemon.generateFusionSpecies();
|
||||||
|
}
|
||||||
|
|
||||||
overrideModifiers(this, false);
|
overrideModifiers(this, false);
|
||||||
overrideHeldItems(this, pokemon, false);
|
overrideHeldItems(this, pokemon, false);
|
||||||
|
|
|
@ -1897,7 +1897,15 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
&& species.speciesId !== this.species.speciesId;
|
&& species.speciesId !== this.species.speciesId;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.fusionSpecies = this.scene.randomSpecies(this.scene.currentBattle?.waveIndex || 0, this.level, false, filter, true);
|
let fusionOverride: PokemonSpecies | undefined = undefined;
|
||||||
|
|
||||||
|
if (forStarter && this instanceof PlayerPokemon && Overrides.STARTER_FUSION_SPECIES_OVERRIDE) {
|
||||||
|
fusionOverride = getPokemonSpecies(Overrides.STARTER_FUSION_SPECIES_OVERRIDE);
|
||||||
|
} else if (this instanceof EnemyPokemon && Overrides.OPP_FUSION_SPECIES_OVERRIDE) {
|
||||||
|
fusionOverride = getPokemonSpecies(Overrides.OPP_FUSION_SPECIES_OVERRIDE);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.fusionSpecies = fusionOverride ?? this.scene.randomSpecies(this.scene.currentBattle?.waveIndex || 0, this.level, false, filter, true);
|
||||||
this.fusionAbilityIndex = (this.fusionSpecies.abilityHidden && hasHiddenAbility ? 2 : this.fusionSpecies.ability2 !== this.fusionSpecies.ability1 ? randAbilityIndex : 0);
|
this.fusionAbilityIndex = (this.fusionSpecies.abilityHidden && hasHiddenAbility ? 2 : this.fusionSpecies.ability2 !== this.fusionSpecies.ability1 ? randAbilityIndex : 0);
|
||||||
this.fusionShiny = this.shiny;
|
this.fusionShiny = this.shiny;
|
||||||
this.fusionVariant = this.variant;
|
this.fusionVariant = this.variant;
|
||||||
|
|
|
@ -97,6 +97,14 @@ class DefaultOverrides {
|
||||||
* @example SPECIES_OVERRIDE = Species.Bulbasaur;
|
* @example SPECIES_OVERRIDE = Species.Bulbasaur;
|
||||||
*/
|
*/
|
||||||
readonly STARTER_SPECIES_OVERRIDE: Species | number = 0;
|
readonly STARTER_SPECIES_OVERRIDE: Species | number = 0;
|
||||||
|
/**
|
||||||
|
* This will force your starter to be a random fusion
|
||||||
|
*/
|
||||||
|
readonly STARTER_FUSION_OVERRIDE: boolean = false;
|
||||||
|
/**
|
||||||
|
* This will override the species of the fusion
|
||||||
|
*/
|
||||||
|
readonly STARTER_FUSION_SPECIES_OVERRIDE: Species | integer = 0;
|
||||||
readonly ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
readonly STATUS_OVERRIDE: StatusEffect = StatusEffect.NONE;
|
||||||
|
@ -109,6 +117,14 @@ class DefaultOverrides {
|
||||||
// OPPONENT / ENEMY OVERRIDES
|
// OPPONENT / ENEMY OVERRIDES
|
||||||
// --------------------------
|
// --------------------------
|
||||||
readonly OPP_SPECIES_OVERRIDE: Species | number = 0;
|
readonly OPP_SPECIES_OVERRIDE: Species | number = 0;
|
||||||
|
/**
|
||||||
|
* This will make all opponents fused Pokemon
|
||||||
|
*/
|
||||||
|
readonly OPP_FUSION_OVERRIDE: boolean = false;
|
||||||
|
/**
|
||||||
|
* This will override the species of the fusion only when the opponent is already a fusion
|
||||||
|
*/
|
||||||
|
readonly OPP_FUSION_SPECIES_OVERRIDE: Species | integer = 0;
|
||||||
readonly OPP_LEVEL_OVERRIDE: number = 0;
|
readonly OPP_LEVEL_OVERRIDE: number = 0;
|
||||||
readonly OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly OPP_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
readonly OPP_PASSIVE_ABILITY_OVERRIDE: Abilities = Abilities.NONE;
|
||||||
|
|
|
@ -80,7 +80,7 @@ export class SelectStarterPhase extends Phase {
|
||||||
starterPokemon.nickname = starter.nickname;
|
starterPokemon.nickname = starter.nickname;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.scene.gameMode.isSplicedOnly) {
|
if (this.scene.gameMode.isSplicedOnly || Overrides.STARTER_FUSION_OVERRIDE) {
|
||||||
starterPokemon.generateFusionSpecies(true);
|
starterPokemon.generateFusionSpecies(true);
|
||||||
}
|
}
|
||||||
starterPokemon.setVisible(false);
|
starterPokemon.setVisible(false);
|
||||||
|
|
Loading…
Reference in New Issue