[ZNR] Implemented Myriad Construct

This commit is contained in:
Evan Kranzler 2020-09-09 09:54:46 -04:00
parent 0bf6949328
commit e6c1d502fc
4 changed files with 86 additions and 19 deletions

View file

@ -1,7 +1,5 @@
package mage.cards.f;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
@ -18,12 +16,13 @@ import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.AbilityPredicate;
import mage.game.permanent.token.ConstructToken;
import mage.target.common.TargetControlledPermanent;
import mage.game.permanent.token.DarettiConstructToken;
import mage.target.common.TargetAnyTarget;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
*
* @author fireshoes
*/
public final class Flamewright extends CardImpl {
@ -43,7 +42,7 @@ public final class Flamewright extends CardImpl {
this.toughness = new MageInt(1);
// {1}, {tap}: Create a 1/1 colorless Construct artifact creature token with defender.
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new ConstructToken()), new ManaCostsImpl("{1}"));
Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CreateTokenEffect(new DarettiConstructToken()), new ManaCostsImpl("{1}"));
ability.addCost(new TapSourceCost());
this.addAbility(ability);

View file

@ -0,0 +1,77 @@
package mage.cards.m;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.BecomesTargetTriggeredAbility;
import mage.abilities.common.EntersBattlefieldAbility;
import mage.abilities.condition.common.KickedCondition;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.dynamicvalue.common.SourcePermanentPowerCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.SacrificeSourceEffect;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.abilities.keyword.KickerAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.TargetController;
import mage.counters.CounterType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterLandPermanent;
import mage.filter.predicate.Predicates;
import mage.game.permanent.token.ConstructToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MyriadConstruct extends CardImpl {
private static final FilterPermanent filter = new FilterLandPermanent();
static {
filter.add(TargetController.OPPONENT.getControllerPredicate());
filter.add(Predicates.not(SuperType.BASIC.getPredicate()));
}
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter);
private static final DynamicValue xValue2 = new SourcePermanentPowerCount(false);
public MyriadConstruct(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{4}");
this.subtype.add(SubType.CONSTRUCT);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Kicker {3}
this.addAbility(new KickerAbility(new ManaCostsImpl<>("{3}")));
// If Myriad Construct was kicked, it enters the battlefield with a +1/+1 counter on it for each nonbasic land your opponents control.
this.addAbility(new EntersBattlefieldAbility(
new AddCountersSourceEffect(CounterType.P1P1.createInstance(), xValue, false),
KickedCondition.instance, "If {this} was kicked, it enters the battlefield " +
"with a +1/+1 counter on it for each nonbasic land your opponents control.", ""
));
// When Myriad Construct becomes the target of a spell, sacrifice it and create a number of 1/1 colourless Construct artifact creature tokens equal to its power.
Ability ability = new BecomesTargetTriggeredAbility(new SacrificeSourceEffect().setText("sacrifice it"));
ability.addEffect(new CreateTokenEffect(new ConstructToken(), xValue2)
.setText("and create a number of 1/1 colourless Construct artifact creature tokens equal to its power"));
this.addAbility(ability);
}
private MyriadConstruct(final MyriadConstruct card) {
super(card);
}
@Override
public MyriadConstruct copy() {
return new MyriadConstruct(this);
}
}

View file

@ -235,6 +235,7 @@ public final class ZendikarRising extends ExpansionSet {
cards.add(new SetCardInfo("Murasa Rootgrazer", 229, Rarity.UNCOMMON, mage.cards.m.MurasaRootgrazer.class));
cards.add(new SetCardInfo("Murasa Sproutling", 196, Rarity.UNCOMMON, mage.cards.m.MurasaSproutling.class));
cards.add(new SetCardInfo("Murkwater Pathway", 260, Rarity.RARE, mage.cards.m.MurkwaterPathway.class));
cards.add(new SetCardInfo("Myriad Construct", 246, Rarity.RARE, mage.cards.m.MyriadConstruct.class));
cards.add(new SetCardInfo("Nahiri's Binding", 29, Rarity.COMMON, mage.cards.n.NahirisBinding.class));
cards.add(new SetCardInfo("Nahiri's Lithoforming", 151, Rarity.RARE, mage.cards.n.NahirisLithoforming.class));
cards.add(new SetCardInfo("Nahiri, Heir of the Ancients", 230, Rarity.MYTHIC, mage.cards.n.NahiriHeirOfTheAncients.class));

View file

@ -1,31 +1,21 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.MageInt;
import mage.abilities.keyword.DefenderAbility;
/**
*
* @author spjspj
*/
public final class ConstructToken extends TokenImpl {
public ConstructToken() {
this("CNS");
}
public ConstructToken(String setCode) {
super("Construct", "1/1 colorless Construct artifact creature token with defender");
this.setOriginalExpansionSetCode(setCode);
super("Construct", "1/1 colorless Construct artifact creature token");
cardType.add(CardType.ARTIFACT);
cardType.add(CardType.CREATURE);
subtype.add(SubType.CONSTRUCT);
power = new MageInt(1);
toughness = new MageInt(1);
addAbility(DefenderAbility.getInstance());
}
public ConstructToken(final ConstructToken token) {