diff --git a/Mage.Sets/src/mage/cards/r/ReyavMasterSmith.java b/Mage.Sets/src/mage/cards/r/ReyavMasterSmith.java new file mode 100644 index 0000000000..e65546f633 --- /dev/null +++ b/Mage.Sets/src/mage/cards/r/ReyavMasterSmith.java @@ -0,0 +1,61 @@ +package mage.cards.r; + +import mage.MageInt; +import mage.abilities.common.AttacksCreatureYouControlTriggeredAbility; +import mage.abilities.effects.common.continuous.GainAbilityTargetEffect; +import mage.abilities.keyword.DoubleStrikeAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.Predicates; +import mage.filter.predicate.permanent.EnchantedPredicate; +import mage.filter.predicate.permanent.EquippedPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class ReyavMasterSmith extends CardImpl { + + private static final FilterControlledCreaturePermanent filter + = new FilterControlledCreaturePermanent("enchanted or equipped creature you control"); + + static { + filter.add(Predicates.or( + EnchantedPredicate.instance, + EquippedPredicate.instance + )); + } + + public ReyavMasterSmith(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.DWARF); + this.subtype.add(SubType.ARTIFICER); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Whenever an enchanted or equipped creature you control attacks, that creature gains double strike until end of turn + this.addAbility(new AttacksCreatureYouControlTriggeredAbility( + new GainAbilityTargetEffect( + DoubleStrikeAbility.getInstance(), Duration.EndOfTurn, + "that creature gains double strike until end of turn" + ), false, filter, true + )); + } + + private ReyavMasterSmith(final ReyavMasterSmith card) { + super(card); + } + + @Override + public ReyavMasterSmith copy() { + return new ReyavMasterSmith(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CommanderLegends.java b/Mage.Sets/src/mage/sets/CommanderLegends.java index 731ec4702a..c7f6f46439 100644 --- a/Mage.Sets/src/mage/sets/CommanderLegends.java +++ b/Mage.Sets/src/mage/sets/CommanderLegends.java @@ -366,6 +366,7 @@ public final class CommanderLegends extends ExpansionSet { cards.add(new SetCardInfo("Retreat to Kazandu", 435, Rarity.UNCOMMON, mage.cards.r.RetreatToKazandu.class)); cards.add(new SetCardInfo("Return to Dust", 43, Rarity.UNCOMMON, mage.cards.r.ReturnToDust.class)); cards.add(new SetCardInfo("Revenant", 147, Rarity.UNCOMMON, mage.cards.r.Revenant.class)); + cards.add(new SetCardInfo("Reyav, Master Smith", 290, Rarity.UNCOMMON, mage.cards.r.ReyavMasterSmith.class)); cards.add(new SetCardInfo("Reyhan, Last of the Abzan", 534, Rarity.MYTHIC, mage.cards.r.ReyhanLastOfTheAbzan.class)); cards.add(new SetCardInfo("Ring of Thune", 468, Rarity.UNCOMMON, mage.cards.r.RingOfThune.class)); cards.add(new SetCardInfo("Ring of Valkas", 469, Rarity.UNCOMMON, mage.cards.r.RingOfValkas.class)); diff --git a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java index 1a5e985641..8de2fcbd02 100644 --- a/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java +++ b/Mage/src/main/java/mage/abilities/common/AttacksCreatureYouControlTriggeredAbility.java @@ -61,7 +61,7 @@ public class AttacksCreatureYouControlTriggeredAbility extends TriggeredAbilityI Permanent sourcePermanent = game.getPermanent(event.getSourceId()); if (sourcePermanent != null && filter.match(sourcePermanent, sourceId, controllerId, game)) { if (setTargetPointer) { - this.getEffects().setTargetPointer(new FixedTarget(event.getSourceId())); + this.getEffects().setTargetPointer(new FixedTarget(event.getSourceId(), game)); } return true; }