hsldklahdlhalhdlahldhlah

This commit is contained in:
frutescens 2024-10-01 13:11:23 -07:00
parent 893fddcb12
commit 101e58e9ef

View File

@ -2631,7 +2631,10 @@ export class ImprisonTag extends MoveRestrictionBattlerTag {
* @returns source pokemon {@linkcode Pokemon} or undefined
*/
private retrieveSource(scene: BattleScene): Pokemon | undefined {
return scene.getPokemonById(this.sourceId);
if (this.sourceId) {
return scene.getPokemonById(this.sourceId) ?? undefined;
}
return undefined;
}
}