diff --git a/Mage.Sets/src/mage/cards/f/FontOfMagic.java b/Mage.Sets/src/mage/cards/f/FontOfMagic.java index 94f0c5931e5..ea13be7c467 100644 --- a/Mage.Sets/src/mage/cards/f/FontOfMagic.java +++ b/Mage.Sets/src/mage/cards/f/FontOfMagic.java @@ -5,8 +5,6 @@ import mage.abilities.SpellAbility; import mage.abilities.common.SimpleStaticAbility; import mage.abilities.dynamicvalue.common.CommanderCastCountValue; import mage.abilities.effects.common.cost.CostModificationEffectImpl; -import mage.abilities.hint.Hint; -import mage.abilities.hint.ValueHint; import mage.cards.CardImpl; import mage.cards.CardSetInfo; import mage.constants.CardType; @@ -23,15 +21,11 @@ import java.util.UUID; */ public final class FontOfMagic extends CardImpl { - private static final Hint hint = new ValueHint( - "Commanders cast from command zone", CommanderCastCountValue.instance - ); - public FontOfMagic(UUID ownerId, CardSetInfo setInfo) { super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{U}"); // Instant and sorcery spells you cast cost {1} less to cast for each time you've cast a commander from the command zone this game. - this.addAbility(new SimpleStaticAbility(new FontOfMagicEffect()).addHint(hint)); + this.addAbility(new SimpleStaticAbility(new FontOfMagicEffect()).addHint(CommanderCastCountValue.getHint())); } private FontOfMagic(final FontOfMagic card) { diff --git a/Mage.Sets/src/mage/cards/j/JirinaKudro.java b/Mage.Sets/src/mage/cards/j/JirinaKudro.java index 2869c9b253b..8043a683c87 100644 --- a/Mage.Sets/src/mage/cards/j/JirinaKudro.java +++ b/Mage.Sets/src/mage/cards/j/JirinaKudro.java @@ -36,7 +36,7 @@ public final class JirinaKudro extends CardImpl { // When Jirina Kudro enters the battlefield, create a 1/1 white Human Soldier creature token for each time you've cast a commander from the command zone this game. this.addAbility(new EntersBattlefieldTriggeredAbility(new CreateTokenEffect( new HumanSoldierToken(), CommanderCastCountValue.instance - ).setText("create a 1/1 white Human Soldier creature token for each time you've cast a commander from the command zone this game"))); + ).setText("create a 1/1 white Human Soldier creature token for each time you've cast a commander from the command zone this game")).addHint(CommanderCastCountValue.getHint())); // Other Humans you control get +2/+0. this.addAbility(new SimpleStaticAbility(new BoostControlledEffect( diff --git a/Mage.Sets/src/mage/cards/t/TheSwarmlord.java b/Mage.Sets/src/mage/cards/t/TheSwarmlord.java new file mode 100644 index 00000000000..acf08909fd6 --- /dev/null +++ b/Mage.Sets/src/mage/cards/t/TheSwarmlord.java @@ -0,0 +1,64 @@ +package mage.cards.t; + +import mage.MageInt; +import mage.abilities.common.DiesCreatureTriggeredAbility; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.MultipliedValue; +import mage.abilities.dynamicvalue.common.CommanderCastCountValue; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +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.FilterPermanent; +import mage.filter.common.FilterControlledCreaturePermanent; +import mage.filter.predicate.permanent.CounterAnyPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class TheSwarmlord extends CardImpl { + + private static final DynamicValue xValue = new MultipliedValue(CommanderCastCountValue.instance, 2); + private static final FilterPermanent filter + = new FilterControlledCreaturePermanent("a creature you control with a counter on it"); + + static { + filter.add(CounterAnyPredicate.instance); + } + + public TheSwarmlord(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{G}{U}{R}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.TYRANID); + this.power = new MageInt(5); + this.toughness = new MageInt(5); + + // Rapid Regeneration -- The Swarmlord enters the battlefield with two +1/+1 counters on it for each time you've cast your commander from the command zone this game. + this.addAbility(new EntersBattlefieldAbility( + new AddCountersSourceEffect(CounterType.P1P1.createInstance(0), xValue, true), + "with two +1/+1 counters on it for each time you've cast your commander from the command zone this game" + ).addHint(CommanderCastCountValue.getHint()).withFlavorWord("Rapid Regeneration")); + + // Xenos Cunning -- Whenever a creature you control with a counter on it dies, draw a card. + this.addAbility(new DiesCreatureTriggeredAbility( + new DrawCardSourceControllerEffect(1), false, filter + ).withFlavorWord("Xenos Cunning")); + } + + private TheSwarmlord(final TheSwarmlord card) { + super(card); + } + + @Override + public TheSwarmlord copy() { + return new TheSwarmlord(this); + } +} diff --git a/Mage.Sets/src/mage/sets/Warhammer40000.java b/Mage.Sets/src/mage/sets/Warhammer40000.java index a80f1af13fe..9d8bdb2eacc 100644 --- a/Mage.Sets/src/mage/sets/Warhammer40000.java +++ b/Mage.Sets/src/mage/sets/Warhammer40000.java @@ -34,5 +34,6 @@ public final class Warhammer40000 extends ExpansionSet { cards.add(new SetCardInfo("Old One Eye", 96, Rarity.RARE, mage.cards.o.OldOneEye.class)); cards.add(new SetCardInfo("Sol Ring", 249, Rarity.UNCOMMON, mage.cards.s.SolRing.class)); cards.add(new SetCardInfo("Szarekh, the Silent King", 1, Rarity.MYTHIC, mage.cards.s.SzarekhTheSilentKing.class)); + cards.add(new SetCardInfo("The Swarmlord", 4, Rarity.MYTHIC, mage.cards.t.TheSwarmlord.class)); } } diff --git a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CommanderCastCountValue.java b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CommanderCastCountValue.java index d70027509bf..5b8000e30a0 100644 --- a/Mage/src/main/java/mage/abilities/dynamicvalue/common/CommanderCastCountValue.java +++ b/Mage/src/main/java/mage/abilities/dynamicvalue/common/CommanderCastCountValue.java @@ -3,6 +3,8 @@ package mage.abilities.dynamicvalue.common; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.Effect; +import mage.abilities.hint.Hint; +import mage.abilities.hint.ValueHint; import mage.game.Game; import mage.watchers.common.CommanderPlaysCountWatcher; @@ -11,6 +13,7 @@ import mage.watchers.common.CommanderPlaysCountWatcher; */ public enum CommanderCastCountValue implements DynamicValue { instance; + private static final Hint hint = new ValueHint("Commanders cast from command zone", instance); @Override public int calculate(Game game, Ability sourceAbility, Effect effect) { @@ -32,4 +35,8 @@ public enum CommanderCastCountValue implements DynamicValue { public String getMessage() { return "time you've cast a commander from the command zone this game"; } + + public static Hint getHint() { + return hint; + } }