mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-18 10:17:56 +00:00
Add starters for evolved Pokemon
This commit is contained in:
parent
4e253862fc
commit
4b61e50d72
@ -2837,8 +2837,7 @@ export function initMoves() {
|
|||||||
.attr(StatChangeAttr, BattleStat.SPATK, -1),
|
.attr(StatChangeAttr, BattleStat.SPATK, -1),
|
||||||
new StatusMove(Moves.FEATHER_DANCE, "Feather Dance", Type.FLYING, 100, 15, -1, "Sharply lowers opponent's Attack.", -1, 0, 3)
|
new StatusMove(Moves.FEATHER_DANCE, "Feather Dance", Type.FLYING, 100, 15, -1, "Sharply lowers opponent's Attack.", -1, 0, 3)
|
||||||
.attr(StatChangeAttr, BattleStat.ATK, -2),
|
.attr(StatChangeAttr, BattleStat.ATK, -2),
|
||||||
new StatusMove(Moves.TEETER_DANCE, "Teeter Dance", Type.NORMAL, 100, 20, -1, "Confuses all Pokémon.", -1, 0, 3)
|
new StatusMove(Moves.TEETER_DANCE, "Teeter Dance", Type.NORMAL, 100, 20, -1, "Confuses all other nearby Pokémon.", -1, 0, 3)
|
||||||
.attr(ConfuseAttr, true)
|
|
||||||
.attr(ConfuseAttr)
|
.attr(ConfuseAttr)
|
||||||
.target(MoveTarget.ALL_NEAR_OTHERS),
|
.target(MoveTarget.ALL_NEAR_OTHERS),
|
||||||
new AttackMove(Moves.BLAZE_KICK, "Blaze Kick", Type.FIRE, MoveCategory.PHYSICAL, 85, 90, 10, -1, "High critical hit ratio. May burn opponent.", 10, 0, 3)
|
new AttackMove(Moves.BLAZE_KICK, "Blaze Kick", Type.FIRE, MoveCategory.PHYSICAL, 85, 90, 10, -1, "High critical hit ratio. May burn opponent.", 10, 0, 3)
|
||||||
|
@ -302,22 +302,31 @@ export class GameData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setPokemonCaught(pokemon: Pokemon): Promise<void> {
|
setPokemonCaught(pokemon: Pokemon): Promise<void> {
|
||||||
return new Promise(resolve => {
|
return this.setPokemonSpeciesCaught(pokemon, pokemon.species);
|
||||||
const dexEntry = this.getPokemonDexEntry(pokemon);
|
}
|
||||||
|
|
||||||
|
setPokemonSpeciesCaught(pokemon: Pokemon, species: PokemonSpecies): Promise<void> {
|
||||||
|
return new Promise<void>((resolve) => {
|
||||||
|
const dexEntry = this.getDexEntry(species, pokemon.shiny, pokemon.formIndex, pokemon.gender === Gender.FEMALE, pokemon.abilityIndex);
|
||||||
|
const hasPrevolution = pokemonPrevolutions.hasOwnProperty(species.speciesId);
|
||||||
if (!dexEntry.caught) {
|
if (!dexEntry.caught) {
|
||||||
const newCatch = !this.getDefaultDexEntry(pokemon.species);
|
const newCatch = !this.getDefaultDexEntry(species);
|
||||||
|
|
||||||
dexEntry.caught = true;
|
dexEntry.caught = true;
|
||||||
this.saveSystem();
|
this.saveSystem();
|
||||||
|
|
||||||
if (newCatch && !pokemonPrevolutions.hasOwnProperty(pokemon.species.speciesId)) {
|
if (newCatch && !hasPrevolution) {
|
||||||
this.scene.playSoundWithoutBgm('level_up_fanfare', 1500);
|
this.scene.playSoundWithoutBgm('level_up_fanfare', 1500);
|
||||||
this.scene.ui.showText(`${pokemon.name} has been\nadded as a starter!`, null, () => resolve(), null, true);
|
this.scene.ui.showText(`${species.name} has been\nadded as a starter!`, null, () => resolve(), null, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve();
|
if (hasPrevolution) {
|
||||||
|
const prevolutionSpecies = pokemonPrevolutions[species.speciesId];
|
||||||
|
this.setPokemonSpeciesCaught(pokemon, getPokemonSpecies(prevolutionSpecies)).then(() => resolve());
|
||||||
|
} else
|
||||||
|
resolve();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user