diff --git a/Mage.Sets/src/mage/cards/b/BanonTheReturnersLeader.java b/Mage.Sets/src/mage/cards/b/BanonTheReturnersLeader.java new file mode 100644 index 00000000000..e078c590826 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BanonTheReturnersLeader.java @@ -0,0 +1,78 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.AttacksWithCreaturesTriggeredAbility; +import mage.abilities.common.CastFromGraveyardOnceEachTurnAbility; +import mage.abilities.costs.CompositeCost; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.abilities.effects.common.DrawCardSourceControllerEffect; +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.filter.common.FilterCreatureCard; +import mage.filter.predicate.Predicate; +import mage.game.Game; +import mage.watchers.common.CardsPutIntoGraveyardWatcher; + +/** + * @author balazskristof + */ +public final class BanonTheReturnersLeader extends CardImpl { + + private static final FilterCreatureCard filter = new FilterCreatureCard( + "a creature spell from among cards in your graveyard that were put there from anywhere other than the battlefield this turn" + ); + + static { + filter.add(BanonTheReturnersLeaderPredicate.instance); + } + + public BanonTheReturnersLeader(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{R}{W}"); + + this.supertype.add(SuperType.LEGENDARY); + this.subtype.add(SubType.HUMAN); + this.subtype.add(SubType.CLERIC); + this.subtype.add(SubType.REBEL); + this.power = new MageInt(1); + this.toughness = new MageInt(3); + + // Pray -- Once during each of your turns, you may cast a creature spell from among cards in your graveyard that were put there from anywhere other than the battlefield this turn. + Ability ability = new CastFromGraveyardOnceEachTurnAbility(filter).withFlavorWord("Pray"); + ability.addWatcher(new CardsPutIntoGraveyardWatcher()); + this.addAbility(ability); + // Whenever you attack, you may pay {1} and discard a card. If you do, draw a card. + this.addAbility(new AttacksWithCreaturesTriggeredAbility( + new DoIfCostPaid( + new DrawCardSourceControllerEffect(1), + new CompositeCost(new ManaCostsImpl<>("{1}"), new DiscardCardCost(), "pay {1} and discard a card") + ), 1 + )); + } + + private BanonTheReturnersLeader(final BanonTheReturnersLeader card) { + super(card); + } + + @Override + public BanonTheReturnersLeader copy() { + return new BanonTheReturnersLeader(this); + } +} + +enum BanonTheReturnersLeaderPredicate implements Predicate { + instance; + + @Override + public boolean apply(Card input, Game game) { + CardsPutIntoGraveyardWatcher watcher = game.getState().getWatcher(CardsPutIntoGraveyardWatcher.class); + return watcher != null && watcher.checkCardNotFromBattlefield(input, game); + } +} diff --git a/Mage.Sets/src/mage/sets/FinalFantasyCommander.java b/Mage.Sets/src/mage/sets/FinalFantasyCommander.java index b13ea9739ed..fbc3c40a14d 100644 --- a/Mage.Sets/src/mage/sets/FinalFantasyCommander.java +++ b/Mage.Sets/src/mage/sets/FinalFantasyCommander.java @@ -49,6 +49,8 @@ public final class FinalFantasyCommander extends ExpansionSet { cards.add(new SetCardInfo("Avalanche of Sector 7", 53, Rarity.RARE, mage.cards.a.AvalancheOfSector7.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Baleful Strix", 318, Rarity.RARE, mage.cards.b.BalefulStrix.class)); cards.add(new SetCardInfo("Bane of Progress", 299, Rarity.RARE, mage.cards.b.BaneOfProgress.class)); + cards.add(new SetCardInfo("Banon, the Returners' Leader", 78, Rarity.RARE, mage.cards.b.BanonTheReturnersLeader.class, NON_FULL_USE_VARIOUS)); + cards.add(new SetCardInfo("Banon, the Returners' Leader", 165, Rarity.RARE, mage.cards.b.BanonTheReturnersLeader.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Barret, Avalanche Leader", 166, Rarity.RARE, mage.cards.b.BarretAvalancheLeader.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Barret, Avalanche Leader", 79, Rarity.RARE, mage.cards.b.BarretAvalancheLeader.class, NON_FULL_USE_VARIOUS)); cards.add(new SetCardInfo("Bastion Protector", 233, Rarity.RARE, mage.cards.b.BastionProtector.class));