forked from External/mage
[LCI] Implement Didact Echo
This commit is contained in:
parent
2fa51c5a20
commit
40f3573cca
4 changed files with 96 additions and 0 deletions
|
|
@ -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