Essence Capture - fixes that it counts any spells

This commit is contained in:
Oleg Agafonov 2019-01-14 10:15:27 +04:00
parent 25b799755e
commit f05bf739e8

View file

@ -6,6 +6,7 @@ import mage.cards.CardImpl;
import mage.cards.CardSetInfo; import mage.cards.CardSetInfo;
import mage.constants.CardType; import mage.constants.CardType;
import mage.counters.CounterType; import mage.counters.CounterType;
import mage.filter.common.FilterCreatureSpell;
import mage.target.TargetSpell; import mage.target.TargetSpell;
import mage.target.common.TargetControlledCreaturePermanent; import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.SecondTargetPointer; import mage.target.targetpointer.SecondTargetPointer;
@ -22,12 +23,12 @@ public final class EssenceCapture extends CardImpl {
// Counter target creature spell. // Counter target creature spell.
this.getSpellAbility().addEffect(new CounterTargetEffect()); this.getSpellAbility().addEffect(new CounterTargetEffect());
this.getSpellAbility().addTarget(new TargetSpell()); this.getSpellAbility().addTarget(new TargetSpell(new FilterCreatureSpell()));
// Put a +1/+1 counter on up to one target creature you control. // Put a +1/+1 counter on up to one target creature you control.
this.getSpellAbility().addEffect(new AddCountersTargetEffect( this.getSpellAbility().addEffect(new AddCountersTargetEffect(
CounterType.P1P1.createInstance() CounterType.P1P1.createInstance()
).setTargetPointer(new SecondTargetPointer())); ).setTargetPointer(new SecondTargetPointer()).setText("Put a +1/+1 counter on up to one target creature you control"));
this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 1)); this.getSpellAbility().addTarget(new TargetControlledCreaturePermanent(0, 1));
} }