Implemented Ironroot Warlord

This commit is contained in:
Evan Kranzler 2019-06-17 21:32:19 -04:00
parent a1255bccfb
commit 1c7d4e22fa
3 changed files with 63 additions and 36 deletions

View file

@ -1,28 +1,22 @@
package mage.cards.c;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.InstantSorceryExileGraveyardCount;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.Game;
import mage.players.Player;
import java.util.UUID;
/**
*
* @author TheElk801
*/
public final class CracklingDrake extends CardImpl {
@ -53,7 +47,7 @@ public final class CracklingDrake extends CardImpl {
));
}
public CracklingDrake(final CracklingDrake card) {
private CracklingDrake(final CracklingDrake card) {
super(card);
}
@ -62,29 +56,3 @@ public final class CracklingDrake extends CardImpl {
return new CracklingDrake(this);
}
}
class CracklingDrakeCount implements DynamicValue {
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
Player player = game.getPlayer(sourceAbility.getControllerId());
if (player != null) {
return player.getGraveyard().count(
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game
) + game.getExile().getExileZone(player.getId()).count(
StaticFilters.FILTER_CARD_INSTANT_OR_SORCERY, game
);
}
return 0;
}
@Override
public CracklingDrakeCount copy() {
return new CracklingDrakeCount();
}
@Override
public String getMessage() {
return "";
}
}

View file

@ -0,0 +1,58 @@
package mage.cards.i;
import mage.MageInt;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.continuous.SetPowerSourceEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.StaticFilters;
import mage.game.permanent.token.SoldierToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class IronrootWarlord extends CardImpl {
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(StaticFilters.FILTER_CONTROLLED_CREATURE);
public IronrootWarlord(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{G}{W}");
this.subtype.add(SubType.TREEFOLK);
this.subtype.add(SubType.SOLDIER);
this.power = new MageInt(0);
this.toughness = new MageInt(5);
// Ironroot Warlord's power is equal to the number of creatures you control.
this.addAbility(new SimpleStaticAbility(
Zone.ALL,
new SetPowerSourceEffect(xValue, Duration.EndOfGame)
.setText("{this}'s power is equal to the number of creatures you control")
));
// {3}{G}{W}: Create a 1/1 white Soldier creature token.
this.addAbility(new SimpleActivatedAbility(
new CreateTokenEffect(new SoldierToken()), new ManaCostsImpl("{3}{G}{W}")
));
}
private IronrootWarlord(final IronrootWarlord card) {
super(card);
}
@Override
public IronrootWarlord copy() {
return new IronrootWarlord(this);
}
}

View file

@ -44,6 +44,7 @@ public final class CoreSet2020 extends ExpansionSet {
cards.add(new SetCardInfo("Flame Sweep", 139, Rarity.UNCOMMON, mage.cards.f.FlameSweep.class));
cards.add(new SetCardInfo("Goblin Ringleader", 141, Rarity.UNCOMMON, mage.cards.g.GoblinRingleader.class));
cards.add(new SetCardInfo("Infuriate", 145, Rarity.COMMON, mage.cards.i.Infuriate.class));
cards.add(new SetCardInfo("Ironroot Warlord", 209, Rarity.UNCOMMON, mage.cards.i.IronrootWarlord.class));
cards.add(new SetCardInfo("Kykar, Wind's Fury", 212, Rarity.MYTHIC, mage.cards.k.KykarWindsFury.class));
cards.add(new SetCardInfo("Leyline of Sanctity", 26, Rarity.RARE, mage.cards.l.LeylineOfSanctity.class));
cards.add(new SetCardInfo("Negate", 69, Rarity.COMMON, mage.cards.n.Negate.class));