Ignore fusion species generation on egg hatch

pull/81/head^2
Flashfyre 2024-04-10 20:31:52 -04:00
parent bd556e3c68
commit 81536e7e8e
2 changed files with 11 additions and 9 deletions

View File

@ -351,7 +351,7 @@ export class EggHatchPhase extends Phase {
if (speciesOverride) { if (speciesOverride) {
const pokemonSpecies = getPokemonSpecies(speciesOverride); const pokemonSpecies = getPokemonSpecies(speciesOverride);
ret = this.scene.addPlayerPokemon(pokemonSpecies, 5, undefined, undefined, undefined, false); ret = this.scene.addPlayerPokemon(pokemonSpecies, 1, undefined, undefined, undefined, false);
} else { } else {
let minStarterValue: integer; let minStarterValue: integer;
let maxStarterValue: integer; let maxStarterValue: integer;
@ -405,7 +405,7 @@ export class EggHatchPhase extends Phase {
const pokemonSpecies = getPokemonSpecies(species); const pokemonSpecies = getPokemonSpecies(species);
ret = this.scene.addPlayerPokemon(pokemonSpecies, 5, undefined, undefined, undefined, false); ret = this.scene.addPlayerPokemon(pokemonSpecies, 1, undefined, undefined, undefined, false);
} }
ret.trySetShiny(this.egg.gachaType === GachaType.SHINY ? 1024 : 512); ret.trySetShiny(this.egg.gachaType === GachaType.SHINY ? 1024 : 512);

View File

@ -165,6 +165,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1; this.metBiome = scene.currentBattle ? scene.arena.biomeType : -1;
this.pokerus = false; this.pokerus = false;
if (level > 1) {
const fused = new Utils.BooleanHolder(scene.gameMode.isSplicedOnly); const fused = new Utils.BooleanHolder(scene.gameMode.isSplicedOnly);
if (!fused.value && !this.isPlayer() && !this.hasTrainer()) if (!fused.value && !this.isPlayer() && !this.hasTrainer())
this.scene.applyModifier(EnemyFusionChanceModifier, false, fused); this.scene.applyModifier(EnemyFusionChanceModifier, false, fused);
@ -174,6 +175,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
this.generateFusionSpecies(); this.generateFusionSpecies();
} }
} }
}
this.generateName(); this.generateName();
@ -706,7 +708,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
return allAbilities[ABILITY_OVERRIDE]; return allAbilities[ABILITY_OVERRIDE];
if (OPP_ABILITY_OVERRIDE && !this.isPlayer()) if (OPP_ABILITY_OVERRIDE && !this.isPlayer())
return allAbilities[OPP_ABILITY_OVERRIDE]; return allAbilities[OPP_ABILITY_OVERRIDE];
if (this.fusionSpecies) if (this.isFusion())
return allAbilities[this.getFusionSpeciesForm().getAbility(this.fusionAbilityIndex)]; return allAbilities[this.getFusionSpeciesForm().getAbility(this.fusionAbilityIndex)];
let abilityId = this.getSpeciesForm().getAbility(this.abilityIndex); let abilityId = this.getSpeciesForm().getAbility(this.abilityIndex);
if (abilityId === Abilities.NONE) if (abilityId === Abilities.NONE)