forked from External/mage
Implemented Anje Falkenrath
This commit is contained in:
parent
2fab876d05
commit
e966444cd1
2 changed files with 94 additions and 0 deletions
93
Mage.Sets/src/mage/cards/a/AnjeFalkenrath.java
Normal file
93
Mage.Sets/src/mage/cards/a/AnjeFalkenrath.java
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
package mage.cards.a;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.TriggeredAbilityImpl;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardCardCost;
|
||||
import mage.abilities.costs.common.TapSourceCost;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.UntapSourceEffect;
|
||||
import mage.abilities.keyword.HasteAbility;
|
||||
import mage.abilities.keyword.MadnessAbility;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.events.GameEvent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class AnjeFalkenrath extends CardImpl {
|
||||
|
||||
public AnjeFalkenrath(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{R}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.VAMPIRE);
|
||||
this.power = new MageInt(1);
|
||||
this.toughness = new MageInt(3);
|
||||
|
||||
// Haste
|
||||
this.addAbility(HasteAbility.getInstance());
|
||||
|
||||
// {T}, Discard a card: Draw a card.
|
||||
Ability ability = new SimpleActivatedAbility(new DrawCardSourceControllerEffect(1), new TapSourceCost());
|
||||
ability.addCost(new DiscardCardCost());
|
||||
this.addAbility(ability);
|
||||
|
||||
// Whenever you discard a card, if it has madness, untap Anje Falkenrath.
|
||||
this.addAbility(new AnjeFalkenrathTriggeredAbility());
|
||||
}
|
||||
|
||||
private AnjeFalkenrath(final AnjeFalkenrath card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnjeFalkenrath copy() {
|
||||
return new AnjeFalkenrath(this);
|
||||
}
|
||||
}
|
||||
|
||||
class AnjeFalkenrathTriggeredAbility extends TriggeredAbilityImpl {
|
||||
|
||||
AnjeFalkenrathTriggeredAbility() {
|
||||
super(Zone.BATTLEFIELD, new UntapSourceEffect(), false);
|
||||
}
|
||||
|
||||
private AnjeFalkenrathTriggeredAbility(final AnjeFalkenrathTriggeredAbility ability) {
|
||||
super(ability);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AnjeFalkenrathTriggeredAbility copy() {
|
||||
return new AnjeFalkenrathTriggeredAbility(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkEventType(GameEvent event, Game game) {
|
||||
return event.getType() == GameEvent.EventType.DISCARDED_CARD;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean checkTrigger(GameEvent event, Game game) {
|
||||
Card card = game.getCard(event.getTargetId());
|
||||
if (card == null) {
|
||||
return false;
|
||||
}
|
||||
return card.getAbilities(game).stream().anyMatch(ability -> ability instanceof MadnessAbility);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getRule() {
|
||||
return "Whenever you discard a card, if it has madness, untap {this}.";
|
||||
}
|
||||
}
|
||||
|
|
@ -20,6 +20,7 @@ public final class Commander2019Edition extends ExpansionSet {
|
|||
this.blockName = "Command Zone";
|
||||
this.hasBasicLands = false; // temporary fix for tests
|
||||
|
||||
cards.add(new SetCardInfo("Anje Falkenrath", 37, Rarity.MYTHIC, mage.cards.a.AnjeFalkenrath.class));
|
||||
cards.add(new SetCardInfo("Anje's Ravager", 22, Rarity.RARE, mage.cards.a.AnjesRavager.class));
|
||||
cards.add(new SetCardInfo("Ghired's Belligerence", 25, Rarity.RARE, mage.cards.g.GhiredsBelligerence.class));
|
||||
cards.add(new SetCardInfo("Ghired, Conclave Exile", 42, Rarity.MYTHIC, mage.cards.g.GhiredConclaveExile.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue