Implemented Cryptic Caves

This commit is contained in:
Evan Kranzler 2019-06-17 12:49:35 -04:00
parent 1ce71a511a
commit 1fc177e3d1
3 changed files with 69 additions and 9 deletions

View file

@ -0,0 +1,56 @@
package mage.cards.c;
import mage.abilities.Ability;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.SacrificeSourceCost;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.mana.ColorlessManaAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Zone;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledLandPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class CrypticCaves extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledLandPermanent("you control five or more lands");
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4);
public CrypticCaves(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {T}: Add {C}.
this.addAbility(new ColorlessManaAbility());
// {1}, {T}, Sacrifice Cryptic Caves: Draw a card. Activate this ability only if you control five or more lands.
Ability ability = new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1),
new GenericManaCost(1), condition
);
ability.addCost(new TapSourceCost());
ability.addCost(new SacrificeSourceCost());
this.addAbility(ability);
}
private CrypticCaves(final CrypticCaves card) {
super(card);
}
@Override
public CrypticCaves copy() {
return new CrypticCaves(this);
}
}

View file

@ -1,8 +1,8 @@
package mage.cards.t;
import java.util.UUID;
import mage.Mana;
import mage.abilities.condition.Condition;
import mage.abilities.condition.common.PermanentsOnTheBattlefieldCondition;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.effects.mana.BasicManaEffect;
@ -12,25 +12,28 @@ import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.ComparisonType;
import mage.constants.Zone;
import mage.filter.common.FilterLandPermanent;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledLandPermanent;
import java.util.UUID;
/**
*
* @author LevelX2
*/
public final class TempleOfTheFalseGod extends CardImpl {
private static final FilterLandPermanent filter = new FilterLandPermanent("you control five or more lands");
private static final FilterPermanent filter
= new FilterControlledLandPermanent("you control five or more lands");
private static final Condition condition
= new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4);
public TempleOfTheFalseGod(UUID ownerId, CardSetInfo setInfo) {
super(ownerId,setInfo,new CardType[]{CardType.LAND},"");
super(ownerId, setInfo, new CardType[]{CardType.LAND}, "");
// {tap}: Add {C}{C}. Activate this ability only if you control five or more lands.
this.addAbility(new ActivateIfConditionManaAbility(
Zone.BATTLEFIELD,
new BasicManaEffect(Mana.ColorlessMana(2)),
new TapSourceCost(),
new PermanentsOnTheBattlefieldCondition(filter, ComparisonType.MORE_THAN, 4)));
Zone.BATTLEFIELD, new BasicManaEffect(Mana.ColorlessMana(2)), new TapSourceCost(), condition
));
}
public TempleOfTheFalseGod(final TempleOfTheFalseGod card) {

View file

@ -30,5 +30,6 @@ public final class CoreSet2020 extends ExpansionSet {
cards.add(new SetCardInfo("Chandra, Acolyte of Flame", 126, Rarity.RARE, mage.cards.c.ChandraAcolyteOfFlame.class));
cards.add(new SetCardInfo("Chandra, Awakened Inferno", 127, Rarity.MYTHIC, mage.cards.c.ChandraAwakenedInferno.class));
cards.add(new SetCardInfo("Chandra, Novice Pyromancer", 128, Rarity.UNCOMMON, mage.cards.c.ChandraNovicePyromancer.class));
cards.add(new SetCardInfo("Cryptic Caves", 244, Rarity.UNCOMMON, mage.cards.c.CrypticCaves.class));
}
}