Skip to content

Commit

Permalink
fixed wild form changes messages, cram error
Browse files Browse the repository at this point in the history
  • Loading branch information
muscode13 committed Nov 13, 2024
1 parent b6b756a commit 1399e80
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/phases/quiet-form-change-phase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ export class QuietFormChangePhase extends BattlePhase {

const preName = getPokemonNameWithAffix(this.pokemon);

if (!this.pokemon.isOnField() || this.pokemon.getTag(SemiInvulnerableTag)) {
this.pokemon.changeForm(this.formChange).then(() => {
this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), 1500);
});
if (!this.pokemon.isOnField() || this.pokemon.getTag(SemiInvulnerableTag) || this.pokemon.isFainted()) {
if (this.pokemon.isPlayer() || this.pokemon.isActive()) {
this.pokemon.changeForm(this.formChange).then(() => {
this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), 1500);
});
} else {
this.end();
}
return;
}

Expand Down

0 comments on commit 1399e80

Please sign in to comment.