[CMR] Implemented Reyav, Master Smith

This commit is contained in:
Evan Kranzler 2020-11-07 10:53:16 -05:00
parent 5a58ea0602
commit 3585853968
3 changed files with 63 additions and 1 deletions

View file

@ -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);
}
}

View file

@ -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));

View file

@ -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;
}