Fix sticky hold applying to transfers

This commit is contained in:
Flashfyre 2024-03-14 13:31:13 -04:00
parent 66b306de9e
commit 52e891a2a8
1 changed files with 1 additions and 1 deletions

View File

@ -1624,7 +1624,7 @@ export default class BattleScene extends Phaser.Scene {
return new Promise(resolve => {
const source = itemModifier.pokemonId ? itemModifier.getPokemon(target.scene) : null;
const cancelled = new Utils.BooleanHolder(false);
Utils.executeIf(!!source, () => applyAbAttrs(BlockItemTheftAbAttr, source, cancelled)).then(() => {
Utils.executeIf(source && source.isPlayer() !== target.isPlayer(), () => applyAbAttrs(BlockItemTheftAbAttr, source, cancelled)).then(() => {
if (cancelled.value)
return resolve(false);
const newItemModifier = itemModifier.clone() as PokemonHeldItemModifier;