diff --git a/Mage.Sets/src/mage/cards/m/MyojinOfBloomingDawn.java b/Mage.Sets/src/mage/cards/m/MyojinOfBloomingDawn.java new file mode 100644 index 0000000000..e4f6112e5b --- /dev/null +++ b/Mage.Sets/src/mage/cards/m/MyojinOfBloomingDawn.java @@ -0,0 +1,63 @@ +package mage.cards.m; + +import mage.MageInt; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.common.CastFromHandSourcePermanentCondition; +import mage.abilities.costs.common.RemoveCountersSourceCost; +import mage.abilities.decorator.ConditionalOneShotEffect; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.counters.CounterType; +import mage.filter.StaticFilters; +import mage.game.permanent.token.SpiritToken; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class MyojinOfBloomingDawn extends CardImpl { + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_PERMANENT); + private static final Hint hint = new ValueHint("Permanents you control", xValue); + + public MyojinOfBloomingDawn(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{W}{W}{W}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.SPIRIT); + this.power = new MageInt(4); + this.toughness = new MageInt(6); + + // Myojin of Blooming Dawn enters the battlefield with an indestructible counter on it if you cast it from your hand. + this.addAbility(new EntersBattlefieldAbility(new ConditionalOneShotEffect( + new AddCountersSourceEffect(CounterType.INDESTRUCTIBLE.createInstance()), + CastFromHandSourcePermanentCondition.instance, "" + ), "{this} enters the battlefield with an indestructible counter on it if you cast it from your hand")); + + // Remove an indestructible counter from Myojin of Blooming Dawn: Create a 1/1 colorless Spirit creature token for each permanent you control. + this.addAbility(new SimpleActivatedAbility( + new CreateTokenEffect(new SpiritToken(), xValue), + new RemoveCountersSourceCost(CounterType.INDESTRUCTIBLE.createInstance()) + ).addHint(hint)); + } + + private MyojinOfBloomingDawn(final MyojinOfBloomingDawn card) { + super(card); + } + + @Override + public MyojinOfBloomingDawn copy() { + return new MyojinOfBloomingDawn(this); + } +} diff --git a/Mage.Sets/src/mage/sets/NeonDynastyCommander.java b/Mage.Sets/src/mage/sets/NeonDynastyCommander.java index 19c9c91da7..3f6daf4e06 100644 --- a/Mage.Sets/src/mage/sets/NeonDynastyCommander.java +++ b/Mage.Sets/src/mage/sets/NeonDynastyCommander.java @@ -21,6 +21,7 @@ public final class NeonDynastyCommander extends ExpansionSet { cards.add(new SetCardInfo("Chishiro, the Shattered Blade", 1, Rarity.MYTHIC, mage.cards.c.ChishiroTheShatteredBlade.class)); cards.add(new SetCardInfo("Kotori, Pilot Prodigy", 2, Rarity.MYTHIC, mage.cards.k.KotoriPilotProdigy.class)); + cards.add(new SetCardInfo("Myojin of Blooming Dawn", 31, Rarity.RARE, mage.cards.m.MyojinOfBloomingDawn.class)); cards.add(new SetCardInfo("Myojin of Roaring Blades", 36, Rarity.RARE, mage.cards.m.MyojinOfRoaringBlades.class)); cards.add(new SetCardInfo("Myojin of Towering Might", 38, Rarity.RARE, mage.cards.m.MyojinOfToweringMight.class)); }