[DRC] Territorial Aetherkite

This commit is contained in:
jmlundeen 2025-03-05 07:00:12 -06:00
parent 4ab2792969
commit 3d2d61eef7
2 changed files with 101 additions and 0 deletions

View file

@ -0,0 +1,99 @@
package mage.cards.t;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.Cost;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageAllEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.HasteAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.common.FilterCreaturePermanent;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.players.Player;
/**
*
* @author Jmlundeen
*/
public final class TerritorialAetherkite extends CardImpl {
public TerritorialAetherkite(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");
this.subtype.add(SubType.CAT);
this.subtype.add(SubType.DRAGON);
this.power = new MageInt(6);
this.toughness = new MageInt(5);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Haste
this.addAbility(HasteAbility.getInstance());
// When this creature enters, you get {E}{E}. Then you may pay one or more {E}. When you do, this creature deals that much damage to each other creature.
this.addAbility(new EntersBattlefieldTriggeredAbility(new TerritorialAetherkiteEffect()));
}
private TerritorialAetherkite(final TerritorialAetherkite card) {
super(card);
}
@Override
public TerritorialAetherkite copy() {
return new TerritorialAetherkite(this);
}
}
class TerritorialAetherkiteEffect extends OneShotEffect {
TerritorialAetherkiteEffect() {
super(Outcome.Benefit);
this.staticText = "you get {E}{E}. Then you may pay one or more {E}. " +
"When you do, this creature deals that much damage to each other creature";
}
TerritorialAetherkiteEffect(final TerritorialAetherkiteEffect effect) {
super(effect);
}
@Override
public TerritorialAetherkiteEffect copy() {
return new TerritorialAetherkiteEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Permanent aetherkite = game.getPermanent(source.getSourceId());
if (controller == null || aetherkite == null) {
return false;
}
new GetEnergyCountersControllerEffect(2).apply(game, source);
int energyToPay = controller.getAmount(0, controller.getCountersCount(CounterType.ENERGY),
"Pay any amount of {E}", game);
if (energyToPay == 0) {
return true;
}
Cost cost = new PayEnergyCost(energyToPay);
if (!cost.pay(source, game, source, source.getControllerId(), true)) {
return false;
}
FilterCreaturePermanent filter = new FilterCreaturePermanent("each other creature");
filter.add(AnotherPredicate.instance);
new DamageAllEffect(energyToPay, filter).apply(game, source);
return true;
}
}

View file

@ -166,6 +166,8 @@ public final class AetherdriftCommander extends ExpansionSet {
cards.add(new SetCardInfo("Temple of Epiphany", 177, Rarity.RARE, mage.cards.t.TempleOfEpiphany.class));
cards.add(new SetCardInfo("Temple of Silence", 178, Rarity.RARE, mage.cards.t.TempleOfSilence.class));
cards.add(new SetCardInfo("Terramorphic Expanse", 179, Rarity.COMMON, mage.cards.t.TerramorphicExpanse.class));
cards.add(new SetCardInfo("Territorial Aetherkite", 12, Rarity.RARE, mage.cards.t.TerritorialAetherkite.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Territorial Aetherkite", 28, Rarity.RARE, mage.cards.t.TerritorialAetherkite.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("The Scarab God", 120, Rarity.MYTHIC, mage.cards.t.TheScarabGod.class));
cards.add(new SetCardInfo("Thopter Spy Network", 83, Rarity.RARE, mage.cards.t.ThopterSpyNetwork.class));
cards.add(new SetCardInfo("Timeless Dragon", 67, Rarity.RARE, mage.cards.t.TimelessDragon.class));