[CLB] Implemented Heap Gate

This commit is contained in:
Evan Kranzler 2022-05-26 08:17:55 -04:00
parent 0f1e827d9f
commit c6947aa425
2 changed files with 63 additions and 0 deletions

View file

@ -0,0 +1,62 @@
package mage.cards.h;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.mana.AnyColorManaAbility;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.game.permanent.token.TreasureToken;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class HeapGate extends CardImpl {
private static final FilterControlledPermanent filter
= new FilterControlledPermanent(SubType.GATE, "untapped Gate you control");
static {
filter.add(TappedPredicate.UNTAPPED);
}
public HeapGate(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
this.subtype.add(SubType.GATE);
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {1}, {T}: Add one mana of any color.
Ability ability = new AnyColorManaAbility(new GenericManaCost(1));
ability.addCost(new TapSourceCost());
this.addAbility(ability);
// {1}, {T}, Tap an untapped Gate you control: Create a Treasure token.
ability = new SimpleActivatedAbility(new CreateTokenEffect(new TreasureToken()), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addCost(new TapTargetCost(new TargetControlledPermanent(filter)));
this.addAbility(ability);
}
private HeapGate(final HeapGate card) {
super(card);
}
@Override
public HeapGate copy() {
return new HeapGate(this);
}
}

View file

@ -99,6 +99,7 @@ public final class CommanderLegendsBattleForBaldursGate extends ExpansionSet {
cards.add(new SetCardInfo("Halsin, Emerald Archdruid", 234, Rarity.UNCOMMON, mage.cards.h.HalsinEmeraldArchdruid.class));
cards.add(new SetCardInfo("Hammers of Moradin", 25, Rarity.UNCOMMON, mage.cards.h.HammersOfMoradin.class));
cards.add(new SetCardInfo("Hardy Outlander", 235, Rarity.UNCOMMON, mage.cards.h.HardyOutlander.class));
cards.add(new SetCardInfo("Heap Gate", 354, Rarity.COMMON, mage.cards.h.HeapGate.class));
cards.add(new SetCardInfo("Horn of Valhalla", 26, Rarity.RARE, mage.cards.h.HornOfValhalla.class));
cards.add(new SetCardInfo("Icewind Stalwart", 27, Rarity.COMMON, mage.cards.i.IcewindStalwart.class));
cards.add(new SetCardInfo("Imoen, Mystic Trickster", 77, Rarity.UNCOMMON, mage.cards.i.ImoenMysticTrickster.class));