From b2e510c5e4b1b24ffb7e79e67b8ff218e9282999 Mon Sep 17 00:00:00 2001 From: Daniel Bomar Date: Tue, 29 Jun 2021 20:37:06 -0500 Subject: [PATCH] [AFR] Implemented Cave of the Frost Dragon --- .../mage/cards/c/CaveOfTheFrostDragon.java | 63 +++++++++++++++++++ .../sets/AdventuresInTheForgottenRealms.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/c/CaveOfTheFrostDragon.java diff --git a/Mage.Sets/src/mage/cards/c/CaveOfTheFrostDragon.java b/Mage.Sets/src/mage/cards/c/CaveOfTheFrostDragon.java new file mode 100644 index 00000000000..4d921684fc5 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/CaveOfTheFrostDragon.java @@ -0,0 +1,63 @@ +package mage.cards.c; + +import java.util.UUID; + +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.condition.Condition; +import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.TapSourceEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.mana.WhiteManaAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.*; +import mage.filter.common.FilterLandPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.permanent.token.custom.CreatureToken; + +/** + * + * @author weirddan455 + */ +public final class CaveOfTheFrostDragon extends CardImpl { + + private static final FilterLandPermanent filter = new FilterLandPermanent(); + + static { + filter.add(AnotherPredicate.instance); + } + + private static final Condition condition = new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 1, true); + + public CaveOfTheFrostDragon(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.LAND}, ""); + + // If you control two or more other lands, Cave of the Frost Dragon enters the battlefield tapped. + this.addAbility(new EntersBattlefieldAbility( + new TapSourceEffect(), condition, "If you control two or more other lands, {this} enters the battlefield tapped.", null + )); + + // {T}: Add {W}. + this.addAbility(new WhiteManaAbility()); + + // {4}{W}: Cave of the Frost Dragon becomes a 3/4 white Dragon creature with flying until end of turn. It's still a land. + this.addAbility(new SimpleActivatedAbility(Zone.BATTLEFIELD, new BecomesCreatureSourceEffect( + new CreatureToken(3, 4, "3/4 white Dragon creature with flying") + .withColor("W") + .withSubType(SubType.DRAGON) + .withAbility(FlyingAbility.getInstance()), + "land", Duration.EndOfTurn), new ManaCostsImpl("{4}{W}"))); + } + + private CaveOfTheFrostDragon(final CaveOfTheFrostDragon card) { + super(card); + } + + @Override + public CaveOfTheFrostDragon copy() { + return new CaveOfTheFrostDragon(this); + } +} diff --git a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java index 59ec08ee9cf..c000ad81a27 100644 --- a/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java +++ b/Mage.Sets/src/mage/sets/AdventuresInTheForgottenRealms.java @@ -28,6 +28,7 @@ public final class AdventuresInTheForgottenRealms extends ExpansionSet { cards.add(new SetCardInfo("Adult Gold Dragon", 216, Rarity.RARE, mage.cards.a.AdultGoldDragon.class)); cards.add(new SetCardInfo("Bruenor Battlehammer", 219, Rarity.UNCOMMON, mage.cards.b.BruenorBattlehammer.class)); cards.add(new SetCardInfo("Bull's Strength", 174, Rarity.COMMON, mage.cards.b.BullsStrength.class)); + cards.add(new SetCardInfo("Cave of the Frost Dragon", 253, Rarity.RARE, mage.cards.c.CaveOfTheFrostDragon.class)); cards.add(new SetCardInfo("Charmed Sleep", 50, Rarity.COMMON, mage.cards.c.CharmedSleep.class)); cards.add(new SetCardInfo("Cloister Gargoyle", 7, Rarity.UNCOMMON, mage.cards.c.CloisterGargoyle.class)); cards.add(new SetCardInfo("Dawnbringer Cleric", 9, Rarity.COMMON, mage.cards.d.DawnbringerCleric.class));