Corrected opponent check

Now checking game.getOpponents()
This commit is contained in:
acabaca24 2020-08-18 15:31:48 +01:00 committed by GitHub
parent 20646da985
commit 805e3f8e6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -85,7 +85,7 @@ class GhostlyPilfererTriggeredAbility extends TriggeredAbilityImpl {
@Override
public boolean checkTrigger(GameEvent event, Game game) {
Spell spell = game.getStack().getSpell(event.getTargetId());
return (this.controllerId != spell.getControllerId()
return (game.getOpponents(getControllerId()).contains(spell.getControllerId())
&& event.getZone() != Zone.HAND);
}
@ -93,4 +93,4 @@ class GhostlyPilfererTriggeredAbility extends TriggeredAbilityImpl {
public String getRule() {
return "Whenever an opponent casts a spell from anywhere other than their hand, draw a card.";
}
}
}