Merge branch 'beta' into tsconfig

This commit is contained in:
Bertie690 2025-06-11 08:06:52 -04:00 committed by GitHub
commit 51c956860e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 29 additions and 13 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -174,19 +174,7 @@ export class SwitchSummonPhase extends SummonPhase {
party[this.slotIndex] = this.lastPokemon; party[this.slotIndex] = this.lastPokemon;
party[this.fieldIndex] = switchedInPokemon; party[this.fieldIndex] = switchedInPokemon;
const showTextAndSummon = () => { const showTextAndSummon = () => {
globalScene.ui.showText( globalScene.ui.showText(this.getSendOutText(switchedInPokemon));
this.player
? i18next.t("battle:playerGo", {
pokemonName: getPokemonNameWithAffix(switchedInPokemon),
})
: i18next.t("battle:trainerGo", {
trainerName: globalScene.currentBattle.trainer?.getName(
!(this.fieldIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER,
),
pokemonName: this.getPokemon().getNameToRender(),
}),
);
/** /**
* If this switch is passing a Substitute, make the switched Pokemon matches the returned Pokemon's state as it left. * If this switch is passing a Substitute, make the switched Pokemon matches the returned Pokemon's state as it left.
* Otherwise, clear any persisting tags on the returned Pokemon. * Otherwise, clear any persisting tags on the returned Pokemon.
@ -265,4 +253,32 @@ export class SwitchSummonPhase extends SummonPhase {
queuePostSummon(): void { queuePostSummon(): void {
globalScene.phaseManager.unshiftNew("PostSummonPhase", this.getPokemon().getBattlerIndex()); globalScene.phaseManager.unshiftNew("PostSummonPhase", this.getPokemon().getBattlerIndex());
} }
/**
* Get the text to be displayed when a pokemon is forced to switch and leave the field.
* @param switchedInPokemon - The Pokemon having newly been sent in.
* @returns The text to display.
*/
private getSendOutText(switchedInPokemon: Pokemon): string {
if (this.switchType === SwitchType.FORCE_SWITCH) {
// "XYZ was dragged out!"
return i18next.t("battle:pokemonDraggedOut", {
pokemonName: getPokemonNameWithAffix(switchedInPokemon),
});
}
if (this.player) {
// "Go! XYZ!"
return i18next.t("battle:playerGo", {
pokemonName: getPokemonNameWithAffix(switchedInPokemon),
});
}
// "Trainer sent out XYZ!"
return i18next.t("battle:trainerGo", {
trainerName: globalScene.currentBattle.trainer?.getName(
!(this.fieldIndex % 2) ? TrainerSlot.TRAINER : TrainerSlot.TRAINER_PARTNER,
),
pokemonName: this.getPokemon().getNameToRender(),
});
}
} }