mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
[40K] Implemented The Swarmlord
This commit is contained in:
parent
39191a4bd8
commit
0d4cf5a20a
5 changed files with 74 additions and 8 deletions
|
@ -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) {
|
||||
|
|
|
@ -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(
|
||||
|
|
64
Mage.Sets/src/mage/cards/t/TheSwarmlord.java
Normal file
64
Mage.Sets/src/mage/cards/t/TheSwarmlord.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue