mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-08 08:29:37 +02:00
fixed wish condition
This commit is contained in:
parent
fb19b2eea7
commit
cd7ef557d9
@ -163,11 +163,11 @@ export class WishTag extends PositionalTag implements WishArgs {
|
||||
globalScene.phaseManager.unshiftNew("PokemonHealPhase", this.targetIndex, this.healHp, null, true, false);
|
||||
}
|
||||
|
||||
public shouldTrigger(): boolean {
|
||||
override shouldTrigger(): boolean {
|
||||
// Disappear if no target or target is fainted.
|
||||
// The source need not exist at the time of activation (since all we need is a simple message)
|
||||
// TODO: Verify whether Wish shows a message if the Pokemon it would affect is KO'd on the turn of activation
|
||||
const target = this.getTarget();
|
||||
return !target || target.isFainted();
|
||||
return !!target && !target.isFainted();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user