[AER] fixed Quicksmith Spy ability (fixes #8794)

This commit is contained in:
Evan Kranzler 2022-03-28 18:18:36 -04:00
parent f6306630b3
commit 8f2a9433e2

View file

@ -5,7 +5,7 @@ import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
@ -14,7 +14,6 @@ import mage.constants.Duration;
import mage.constants.SubType;
import mage.filter.StaticFilters;
import mage.target.TargetPermanent;
import mage.target.common.TargetAnyTarget;
import java.util.UUID;
@ -32,9 +31,9 @@ public final class QuicksmithSpy extends CardImpl {
this.toughness = new MageInt(3);
// When Quicksmith Spy enters the battlefield, target artifact you control gains "{T}: Draw a card" for as long as you control Quicksmith Spy.
Ability artifactAbility = new SimpleActivatedAbility(new DamageTargetEffect(2), new TapSourceCost());
artifactAbility.addTarget(new TargetAnyTarget());
Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(artifactAbility, Duration.WhileControlled).setText("target artifact you control gains \"{T}: Draw a card\" for as long as you control {this}"));
Ability ability = new EntersBattlefieldTriggeredAbility(new GainAbilityTargetEffect(
new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new TapSourceCost()), Duration.WhileControlled
).setText("target artifact you control gains \"{T}: Draw a card\" for as long as you control {this}"));
ability.addTarget(new TargetPermanent(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT));
this.addAbility(ability);
}