mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 07:52:17 +02:00
Apply suggestions from code review
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
0a7ecb94ff
commit
e0f75cb38d
@ -549,7 +549,8 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
for (let p = 0; p < globalScene.getPlayerParty().length; p++) {
|
||||
// this for look goes through each of the party pokemon
|
||||
const newPokemon = globalScene.getPlayerParty()[p];
|
||||
// this next bit checks to see if the the selected item from the original transfer pokemon exists on the new pokemon [p]; this returns undefined if the new pokemon doesn't have the item at all, otherwise it returns the pokemonHeldItemModifier for that item
|
||||
// this next bit checks to see if the the selected item from the original transfer pokemon exists on the new pokemon `p`
|
||||
// this returns `undefined` if the new pokemon doesn't have the item at all, otherwise it returns the `pokemonHeldItemModifier` for that item
|
||||
const matchingModifier = globalScene.findModifier(
|
||||
m =>
|
||||
m instanceof PokemonHeldItemModifier &&
|
||||
@ -1165,7 +1166,7 @@ export default class PartyUiHandler extends MessageUiHandler {
|
||||
globalScene.findModifier(
|
||||
m =>
|
||||
m instanceof SwitchEffectTransferModifier &&
|
||||
(m as SwitchEffectTransferModifier).pokemonId === globalScene.getPlayerField()[this.fieldIndex].id,
|
||||
m.pokemonId === globalScene.getPlayerField()[this.fieldIndex].id,
|
||||
)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user