[LTC] Implement Gandalf, Westward Voyager (#10727)

* refactor and cleanup SpellCastControllerTriggeredAbility

* [LTC] Implement Gandalf, Westward Voyager

* throw on unexpected setTargetPointer
This commit is contained in:
Susucre 2023-08-05 04:26:25 +02:00 committed by GitHub
parent 4ac9293821
commit 0e5069ccc2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
82 changed files with 567 additions and 361 deletions

View file

@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.effects.common.counter.AddPoisonCounterTargetEffect;
import mage.constants.CardType;
import mage.constants.SetTargetPointer;
import mage.constants.Zone;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
@ -21,7 +22,10 @@ public final class AjaniSleeperAgentEmblem extends Emblem {
// You get an emblem with "Whenever you cast a creature or planeswalker spell, target opponent gets two poison counters."
public AjaniSleeperAgentEmblem() {
super("Emblem Ajani");
Ability ability = new SpellCastControllerTriggeredAbility(Zone.COMMAND, new AddPoisonCounterTargetEffect(2), filter, false, false);
Ability ability = new SpellCastControllerTriggeredAbility(
Zone.COMMAND, new AddPoisonCounterTargetEffect(2),
filter, false, SetTargetPointer.NONE
);
ability.addTarget(new TargetOpponent());
this.getAbilities().add(ability);
}