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) {
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 {
let minStarterValue: integer;
let maxStarterValue: integer;
@ -405,7 +405,7 @@ export class EggHatchPhase extends Phase {
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);

View File

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