mirror of
https://github.com/magefree/mage.git
synced 2026-01-10 12:52:06 -08:00
[LCI] Implement Didact Echo
This commit is contained in:
parent
2fa51c5a20
commit
40f3573cca
4 changed files with 96 additions and 0 deletions
50
Mage.Sets/src/mage/cards/d/DidactEcho.java
Normal file
50
Mage.Sets/src/mage/cards/d/DidactEcho.java
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.common.SimpleStaticAbility;
|
||||
import mage.abilities.condition.common.DescendCondition;
|
||||
import mage.abilities.decorator.ConditionalContinuousEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.continuous.GainAbilitySourceEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.AbilityWord;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DidactEcho extends CardImpl {
|
||||
|
||||
public DidactEcho(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
||||
this.subtype.add(SubType.SPIRIT);
|
||||
this.subtype.add(SubType.CLERIC);
|
||||
this.power = new MageInt(3);
|
||||
this.toughness = new MageInt(2);
|
||||
|
||||
// When Didact Echo enters the battlefield, draw a card.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(1)));
|
||||
|
||||
// Descend 4 -- Didact Echo has flying as long as there are four or more permanent cards in your graveyard.
|
||||
this.addAbility(new SimpleStaticAbility(new ConditionalContinuousEffect(
|
||||
new GainAbilitySourceEffect(FlyingAbility.getInstance()), DescendCondition.FOUR,
|
||||
"{this} has flying as long as there are four or more permanent cards in your graveyard"
|
||||
)).setAbilityWord(AbilityWord.DESCEND_4).addHint(DescendCondition.getHint()));
|
||||
}
|
||||
|
||||
private DidactEcho(final DidactEcho card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DidactEcho copy() {
|
||||
return new DidactEcho(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -24,6 +24,7 @@ public final class TheLostCavernsOfIxalan extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Cavern of Souls", 269, Rarity.MYTHIC, mage.cards.c.CavernOfSouls.class));
|
||||
cards.add(new SetCardInfo("Cenote Scout", 178, Rarity.UNCOMMON, mage.cards.c.CenoteScout.class));
|
||||
cards.add(new SetCardInfo("Chart a Course", 48, Rarity.COMMON, mage.cards.c.ChartACourse.class));
|
||||
cards.add(new SetCardInfo("Didact Echo", 53, Rarity.COMMON, mage.cards.d.DidactEcho.class));
|
||||
cards.add(new SetCardInfo("Forest", 291, Rarity.LAND, mage.cards.basiclands.Forest.class, FULL_ART_BFZ_VARIOUS));
|
||||
cards.add(new SetCardInfo("Ghalta, Stampede Tyrant", 185, Rarity.MYTHIC, mage.cards.g.GhaltaStampedeTyrant.class));
|
||||
cards.add(new SetCardInfo("Gishath, Sun's Avatar", 330, Rarity.MYTHIC, mage.cards.g.GishathSunsAvatar.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,44 @@
|
|||
package mage.abilities.condition.common;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||
import mage.abilities.hint.Hint;
|
||||
import mage.abilities.hint.ValueHint;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public enum DescendCondition implements Condition {
|
||||
FOUR(4),
|
||||
EIGHT(8);
|
||||
private static final Hint hint = new ValueHint(
|
||||
"Permanent cards in you graveyard",
|
||||
new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_PERMANENT)
|
||||
);
|
||||
|
||||
public static Hint getHint() {
|
||||
return hint;
|
||||
}
|
||||
|
||||
private final int amount;
|
||||
|
||||
DescendCondition(int amount) {
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
return player != null && player.getGraveyard().count(StaticFilters.FILTER_CARD_PERMANENT, game) >= amount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "there are " + CardUtil.numberToText(amount) + " or more permanent cards in your graveyard";
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ public enum AbilityWord {
|
|||
COUNCILS_DILEMMA("Council's dilemma"),
|
||||
COVEN("Coven"),
|
||||
DELIRIUM("Delirium"),
|
||||
DESCEND_4("Descent 4"),
|
||||
DOMAIN("Domain"),
|
||||
EMINENCE("Eminence"),
|
||||
ENRAGE("Enrage"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue