mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-17 22:02:18 +02:00
Added a message to indicate items were transferred to new Pokemon
This commit is contained in:
parent
1a6d337aa5
commit
b843d95ebc
@ -4326,12 +4326,23 @@ export class AttemptCapturePhase extends PokemonPhase {
|
|||||||
this.scene.ui.showText(`Your party is full.\nRelease a Pokémon to make room for ${pokemon.name}?`, null, () => {
|
this.scene.ui.showText(`Your party is full.\nRelease a Pokémon to make room for ${pokemon.name}?`, null, () => {
|
||||||
this.scene.ui.setMode(Mode.CONFIRM, () => {
|
this.scene.ui.setMode(Mode.CONFIRM, () => {
|
||||||
this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (releasedPokemonSlotIndex: integer, _option: PartyOption) => {
|
this.scene.ui.setMode(Mode.PARTY, PartyUiMode.RELEASE, this.fieldIndex, (releasedPokemonSlotIndex: integer, _option: PartyOption) => {
|
||||||
const releasedItems = releasedPokemonSlotIndex < 6 ? this.scene.getParty()[releasedPokemonSlotIndex].getTransferrableHeldItems() : [];
|
const releasedPokemon = releasedPokemonSlotIndex < 6 ? this.scene.getParty()[releasedPokemonSlotIndex] : null;
|
||||||
|
const releasedItems = releasedPokemon?.getTransferrableHeldItems();
|
||||||
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
|
this.scene.ui.setMode(Mode.MESSAGE).then(() => {
|
||||||
if (releasedPokemonSlotIndex < 6)
|
if (releasedPokemonSlotIndex < 6) {
|
||||||
addToParty(releasedItems);
|
if (releasedItems != null && releasedItems.length > 0) {
|
||||||
else
|
this.scene.ui.showText(`You transferred all items held by ${releasedPokemon.name} to ${pokemon.name}.`, null, () => {
|
||||||
|
addToParty(releasedItems);
|
||||||
|
}, 0, true);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.scene.ui.clearText();
|
||||||
|
addToParty();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
promptRelease();
|
promptRelease();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}, () => {
|
}, () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user