Add starters for evolved Pokemon
parent
4e253862fc
commit
4b61e50d72
|
@ -2837,8 +2837,7 @@ export function initMoves() {
|
|||
.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)
|
||||
.attr(StatChangeAttr, BattleStat.ATK, -2),
|
||||
new StatusMove(Moves.TEETER_DANCE, "Teeter Dance", Type.NORMAL, 100, 20, -1, "Confuses all Pokémon.", -1, 0, 3)
|
||||
.attr(ConfuseAttr, true)
|
||||
new StatusMove(Moves.TEETER_DANCE, "Teeter Dance", Type.NORMAL, 100, 20, -1, "Confuses all other nearby Pokémon.", -1, 0, 3)
|
||||
.attr(ConfuseAttr)
|
||||
.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)
|
||||
|
|
|
@ -302,21 +302,30 @@ export class GameData {
|
|||
}
|
||||
|
||||
setPokemonCaught(pokemon: Pokemon): Promise<void> {
|
||||
return new Promise(resolve => {
|
||||
const dexEntry = this.getPokemonDexEntry(pokemon);
|
||||
return this.setPokemonSpeciesCaught(pokemon, pokemon.species);
|
||||
}
|
||||
|
||||
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) {
|
||||
const newCatch = !this.getDefaultDexEntry(pokemon.species);
|
||||
const newCatch = !this.getDefaultDexEntry(species);
|
||||
|
||||
dexEntry.caught = true;
|
||||
this.saveSystem();
|
||||
|
||||
if (newCatch && !pokemonPrevolutions.hasOwnProperty(pokemon.species.speciesId)) {
|
||||
if (newCatch && !hasPrevolution) {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasPrevolution) {
|
||||
const prevolutionSpecies = pokemonPrevolutions[species.speciesId];
|
||||
this.setPokemonSpeciesCaught(pokemon, getPokemonSpecies(prevolutionSpecies)).then(() => resolve());
|
||||
} else
|
||||
resolve();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue