mirror of
https://github.com/correl/mage.git
synced 2025-01-12 19:25:44 +00:00
Implemeted Lord Windgrace
This commit is contained in:
parent
91244c09dc
commit
2a6181b67a
3 changed files with 114 additions and 0 deletions
112
Mage.Sets/src/mage/cards/l/LordWindgrace.java
Normal file
112
Mage.Sets/src/mage/cards/l/LordWindgrace.java
Normal file
|
@ -0,0 +1,112 @@
|
|||
package mage.cards.l;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.common.CanBeYourCommanderAbility;
|
||||
import mage.abilities.common.PlanswalkerEntersWithLoyalityCountersAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
import mage.abilities.effects.common.DestroyTargetEffect;
|
||||
import mage.abilities.effects.common.ReturnFromGraveyardToBattlefieldTargetEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.common.FilterLandCard;
|
||||
import mage.filter.predicate.other.OwnerPredicate;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.CatWarriorToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInASingleGraveyard;
|
||||
import mage.target.common.TargetNonlandPermanent;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class LordWindgrace extends CardImpl {
|
||||
|
||||
private static final FilterLandCard filter = new FilterLandCard("land cards from your graveyard");
|
||||
|
||||
static {
|
||||
filter.add(new OwnerPredicate(TargetController.YOU));
|
||||
}
|
||||
|
||||
public LordWindgrace(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.PLANESWALKER}, "{2}{B}{R}{G}");
|
||||
|
||||
this.addSuperType(SuperType.LEGENDARY);
|
||||
this.subtype.add(SubType.WINDGRACE);
|
||||
this.addAbility(new PlanswalkerEntersWithLoyalityCountersAbility(5));
|
||||
|
||||
// +2: Discard a card, then draw a card. If a land card is discarded this way, draw an additional card.
|
||||
this.addAbility(new LoyaltyAbility(new LordWindgraceEffect(), 2));
|
||||
|
||||
// -3: Return up to two target land cards from your graveyard to the battlefield.
|
||||
Ability ability = new LoyaltyAbility(
|
||||
new ReturnFromGraveyardToBattlefieldTargetEffect(), -3
|
||||
);
|
||||
ability.addTarget(new TargetCardInASingleGraveyard(0, 2, filter));
|
||||
this.addAbility(ability);
|
||||
|
||||
// -11: Destroy up to six target nonland permanents, then create six 2/2 green Cat Warrior creature tokens with forestwalk.
|
||||
ability = new LoyaltyAbility(new DestroyTargetEffect(), -11);
|
||||
ability.addEffect(
|
||||
new CreateTokenEffect(new CatWarriorToken(), 6)
|
||||
.setText(", then create six 2/2 green Cat Warrior "
|
||||
+ "creature tokens with forestwalk")
|
||||
);
|
||||
ability.addTarget(new TargetNonlandPermanent(0, 6, false));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Lord Windgrace can be your commander.
|
||||
this.addAbility(CanBeYourCommanderAbility.getInstance());
|
||||
}
|
||||
|
||||
public LordWindgrace(final LordWindgrace card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LordWindgrace copy() {
|
||||
return new LordWindgrace(this);
|
||||
}
|
||||
}
|
||||
|
||||
class LordWindgraceEffect extends OneShotEffect {
|
||||
|
||||
public LordWindgraceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
this.staticText = "discard a card, then draw a card. "
|
||||
+ "If a land card is discarded this way, draw an additional card";
|
||||
}
|
||||
|
||||
public LordWindgraceEffect(final LordWindgraceEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LordWindgraceEffect copy() {
|
||||
return new LordWindgraceEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
Card card = player.discardOne(false, source, game);
|
||||
if (card == null || !card.isLand()) {
|
||||
player.drawCards(1, game);
|
||||
} else {
|
||||
player.drawCards(2, game);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -43,6 +43,7 @@ public final class Commander2018 extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Fury Storm", 22, Rarity.RARE, mage.cards.f.FuryStorm.class));
|
||||
cards.add(new SetCardInfo("Hydra Omnivore", 153, Rarity.MYTHIC, mage.cards.h.HydraOmnivore.class));
|
||||
cards.add(new SetCardInfo("Kestia, the Cultivator", 42, Rarity.MYTHIC, mage.cards.k.KestiaTheCultivator.class));
|
||||
cards.add(new SetCardInfo("Lord Windgrace", 43, Rarity.MYTHIC, mage.cards.l.LordWindgrace.class));
|
||||
cards.add(new SetCardInfo("Loyal Apprentice", 23, Rarity.UNCOMMON, mage.cards.l.LoyalApprentice.class));
|
||||
cards.add(new SetCardInfo("Loyal Drake", 10, Rarity.UNCOMMON, mage.cards.l.LoyalDrake.class));
|
||||
cards.add(new SetCardInfo("Loyal Guardian", 31, Rarity.UNCOMMON, mage.cards.l.LoyalGuardian.class));
|
||||
|
|
|
@ -406,6 +406,7 @@ public enum SubType {
|
|||
VIVIEN("Vivien", SubTypeSet.PlaneswalkerType),
|
||||
VRASKA("Vraska", SubTypeSet.PlaneswalkerType),
|
||||
WILL("Will", SubTypeSet.PlaneswalkerType),
|
||||
WINDGRACE("Windgrace", SubTypeSet.PlaneswalkerType),
|
||||
XENAGOS("Xenagos", SubTypeSet.PlaneswalkerType),
|
||||
YANGGU("Yanggu", SubTypeSet.PlaneswalkerType),
|
||||
YANLING("Yanling", SubTypeSet.PlaneswalkerType),
|
||||
|
|
Loading…
Reference in a new issue