Merge branch 'pagefaultgames:main' into main

This commit is contained in:
ARSOD-Z 2024-04-10 22:10:50 -03:00 committed by GitHub
commit f8cf3834b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 17 deletions

View File

@ -3562,9 +3562,9 @@ export function initMoves() {
.attr(AddBattlerTagAttr, BattlerTagType.ENCORE, false, true) .attr(AddBattlerTagAttr, BattlerTagType.ENCORE, false, true)
.condition((user, target, move) => new EncoreTag(user.id).canAdd(target)), .condition((user, target, move) => new EncoreTag(user.id).canAdd(target)),
new AttackMove(Moves.PURSUIT, "Pursuit (P)", Type.DARK, MoveCategory.PHYSICAL, 40, 100, 20, "The power of this attack move is doubled if it's used on a target that's switching out of battle.", -1, 0, 2), new AttackMove(Moves.PURSUIT, "Pursuit (P)", Type.DARK, MoveCategory.PHYSICAL, 40, 100, 20, "The power of this attack move is doubled if it's used on a target that's switching out of battle.", -1, 0, 2),
new AttackMove(Moves.RAPID_SPIN, "Rapid Spin", Type.NORMAL, MoveCategory.PHYSICAL, 50, 100, 40, "A spin attack that can also eliminate such moves as Bind, Wrap, and Leech Seed. This also raises the user's Speed stat.", 100, 0, 2) new AttackMove(Moves.RAPID_SPIN, "Rapid Spin (P)", Type.NORMAL, MoveCategory.PHYSICAL, 50, 100, 40, "A spin attack that can also eliminate such moves as Bind, Wrap, and Leech Seed. This also raises the user's Speed stat.", 100, 0, 2)
.attr(StatChangeAttr, BattleStat.SPD, 1, true) .attr(StatChangeAttr, BattleStat.SPD, 1, true)
.attr(LapseBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, BattlerTagType.FIRE_SPIN, BattlerTagType.WHIRLPOOL, BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED ], true), .attr(RemoveBattlerTagAttr, [ BattlerTagType.BIND, BattlerTagType.WRAP, BattlerTagType.FIRE_SPIN, BattlerTagType.WHIRLPOOL, BattlerTagType.CLAMP, BattlerTagType.SAND_TOMB, BattlerTagType.MAGMA_STORM, BattlerTagType.THUNDER_CAGE, BattlerTagType.SEEDED ], true),
new StatusMove(Moves.SWEET_SCENT, "Sweet Scent", Type.NORMAL, 100, 20, "A sweet scent that harshly lowers opposing Pokémon's evasiveness.", -1, 0, 2) new StatusMove(Moves.SWEET_SCENT, "Sweet Scent", Type.NORMAL, 100, 20, "A sweet scent that harshly lowers opposing Pokémon's evasiveness.", -1, 0, 2)
.attr(StatChangeAttr, BattleStat.EVA, -1) .attr(StatChangeAttr, BattleStat.EVA, -1)
.target(MoveTarget.ALL_NEAR_ENEMIES), .target(MoveTarget.ALL_NEAR_ENEMIES),

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)

View File

@ -326,9 +326,9 @@ export class TitlePhase extends Phase {
if (this.loaded) { if (this.loaded) {
const availablePartyMembers = this.scene.getParty().filter(p => !p.isFainted()).length; const availablePartyMembers = this.scene.getParty().filter(p => !p.isFainted()).length;
this.scene.pushPhase(new SummonPhase(this.scene, 0)); this.scene.pushPhase(new SummonPhase(this.scene, 0, true, true));
if (this.scene.currentBattle.double && availablePartyMembers > 1) if (this.scene.currentBattle.double && availablePartyMembers > 1)
this.scene.pushPhase(new SummonPhase(this.scene, 1)); this.scene.pushPhase(new SummonPhase(this.scene, 1, true, true));
if (this.scene.currentBattle.waveIndex > 1 && this.scene.currentBattle.battleType !== BattleType.TRAINER) { if (this.scene.currentBattle.waveIndex > 1 && this.scene.currentBattle.battleType !== BattleType.TRAINER) {
this.scene.pushPhase(new CheckSwitchPhase(this.scene, 0, this.scene.currentBattle.double)); this.scene.pushPhase(new CheckSwitchPhase(this.scene, 0, this.scene.currentBattle.double));
if (this.scene.currentBattle.double && availablePartyMembers > 1) if (this.scene.currentBattle.double && availablePartyMembers > 1)
@ -1074,8 +1074,12 @@ export class SwitchBiomePhase extends BattlePhase {
} }
export class SummonPhase extends PartyMemberPokemonPhase { export class SummonPhase extends PartyMemberPokemonPhase {
constructor(scene: BattleScene, fieldIndex: integer, player?: boolean) { private loaded: boolean;
super(scene, fieldIndex, player !== undefined ? player : true);
constructor(scene: BattleScene, fieldIndex: integer, player: boolean = true, loaded: boolean = false) {
super(scene, fieldIndex, player);
this.loaded = loaded;
} }
start() { start() {
@ -1203,10 +1207,12 @@ export class SummonPhase extends PartyMemberPokemonPhase {
pokemon.resetTurnData(); pokemon.resetTurnData();
if (!this.loaded) {
this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true); this.scene.triggerPokemonFormChange(pokemon, SpeciesFormChangeActiveTrigger, true);
this.queuePostSummon(); this.queuePostSummon();
} }
}
queuePostSummon(): void { queuePostSummon(): void {
this.scene.pushPhase(new PostSummonPhase(this.scene, this.getPokemon().getBattlerIndex())); this.scene.pushPhase(new PostSummonPhase(this.scene, this.getPokemon().getBattlerIndex()));