mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-16 21:32:18 +02:00
Zero to Hero documentation and form reset on summon
This commit is contained in:
parent
61be88e50c
commit
7d0e7f1d55
@ -45,7 +45,7 @@ import UIPlugin from 'phaser3-rex-plugins/templates/ui/ui-plugin';
|
||||
import { addUiThemeOverrides } from './ui/ui-theme';
|
||||
import PokemonData from './system/pokemon-data';
|
||||
import { Nature } from './data/nature';
|
||||
import { SpeciesFormChangeTimeOfDayTrigger, SpeciesFormChangeTrigger, pokemonFormChanges } from './data/pokemon-forms';
|
||||
import { SpeciesFormChangeManualTrigger, SpeciesFormChangeTimeOfDayTrigger, SpeciesFormChangeTrigger, pokemonFormChanges } from './data/pokemon-forms';
|
||||
import { FormChangePhase, QuietFormChangePhase } from './form-change-phase';
|
||||
import { BattleSpec } from './enums/battle-spec';
|
||||
import { getTypeRgb } from './data/type';
|
||||
@ -931,7 +931,10 @@ export default class BattleScene extends SceneBase {
|
||||
for (let pokemon of this.getParty()) {
|
||||
if (pokemon) {
|
||||
if (resetArenaState)
|
||||
pokemon.resetBattleData();
|
||||
{
|
||||
pokemon.resetBattleData();
|
||||
this.triggerPokemonFormChange(pokemon, SpeciesFormChangeManualTrigger);
|
||||
}
|
||||
this.triggerPokemonFormChange(pokemon, SpeciesFormChangeTimeOfDayTrigger);
|
||||
}
|
||||
}
|
||||
|
@ -1703,7 +1703,9 @@ export class PreSwitchOutHealAbAttr extends PreSwitchOutAbAttr {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Attribute for form changes that occur on switching out
|
||||
* @extends PreSwitchOutAbAttr
|
||||
* @see {@linkcode applyPreSwitchOut}
|
||||
*/
|
||||
export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr {
|
||||
private formFunc: (p: Pokemon) => integer;
|
||||
@ -1716,10 +1718,10 @@ export class PreSwitchOutFormChangeAbAttr extends PreSwitchOutAbAttr {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param pokemon
|
||||
* @param passive
|
||||
* @param args
|
||||
* @returns
|
||||
* @param pokemon The pokemon switching out and changing form {@linkcode Pokemon}
|
||||
* @param passive N/A
|
||||
* @param args N/A
|
||||
* @returns true if the form change was successful
|
||||
*/
|
||||
applyPreSwitchOut(pokemon: Pokemon, passive: boolean, args: any[]): boolean | Promise<boolean> {
|
||||
const formIndex = this.formFunc(pokemon);
|
||||
|
Loading…
Reference in New Issue
Block a user