mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2024-11-25 00:06:18 +00:00
Fixed wild form changes messages, and form-changed Cramorant crashing the game when both sides faint at the same time (#4859)
This commit is contained in:
parent
e45cb42f7e
commit
162eea500d
@ -29,10 +29,14 @@ export class QuietFormChangePhase extends BattlePhase {
|
|||||||
|
|
||||||
const preName = getPokemonNameWithAffix(this.pokemon);
|
const preName = getPokemonNameWithAffix(this.pokemon);
|
||||||
|
|
||||||
if (!this.pokemon.isOnField() || this.pokemon.getTag(SemiInvulnerableTag)) {
|
if (!this.pokemon.isOnField() || this.pokemon.getTag(SemiInvulnerableTag) || this.pokemon.isFainted()) {
|
||||||
this.pokemon.changeForm(this.formChange).then(() => {
|
if (this.pokemon.isPlayer() || this.pokemon.isActive()) {
|
||||||
this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), 1500);
|
this.pokemon.changeForm(this.formChange).then(() => {
|
||||||
});
|
this.scene.ui.showText(getSpeciesFormChangeMessage(this.pokemon, this.formChange, preName), null, () => this.end(), 1500);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.end();
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user