diff --git a/Mage.Sets/src/mage/cards/b/Barishi.java b/Mage.Sets/src/mage/cards/b/Barishi.java new file mode 100644 index 00000000000..41500213b91 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/Barishi.java @@ -0,0 +1,76 @@ +package mage.cards.b; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.DiesTriggeredAbility; +import mage.abilities.effects.OneShotEffect; +import mage.abilities.effects.common.ExileSourceEffect; +import mage.constants.SubType; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.cards.Cards; +import mage.cards.CardsImpl; +import mage.constants.CardType; +import mage.constants.Outcome; +import mage.filter.StaticFilters; +import mage.game.Game; +import mage.players.Player; + +/** + * + * @author TheElk801 + */ +public final class Barishi extends CardImpl { + + public Barishi(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); + + this.subtype.add(SubType.ELEMENTAL); + this.power = new MageInt(4); + this.toughness = new MageInt(3); + + // When Barishi dies, exile Barishi, then shuffle all creature cards from your graveyard into your library. + this.addAbility(new DiesTriggeredAbility(new BarishiEffect(), false)); + } + + public Barishi(final Barishi card) { + super(card); + } + + @Override + public Barishi copy() { + return new Barishi(this); + } +} + +class BarishiEffect extends OneShotEffect { + + public BarishiEffect() { + super(Outcome.Benefit); + this.staticText = "exile {this}, then shuffle all creature cards from your graveyard into your library"; + } + + public BarishiEffect(final BarishiEffect effect) { + super(effect); + } + + @Override + public BarishiEffect copy() { + return new BarishiEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + new ExileSourceEffect().apply(game, source); + Player controller = game.getPlayer(source.getControllerId()); + if (controller == null) { + return false; + } + Cards cards = new CardsImpl(); + cards.addAll(controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)); + controller.putCardsOnTopOfLibrary(cards, game, source, false); + controller.shuffleLibrary(source, game); + return true; + } +} diff --git a/Mage.Sets/src/mage/cards/r/RootingKavu.java b/Mage.Sets/src/mage/cards/r/RootingKavu.java index 75a5bd2d071..b70328f3584 100644 --- a/Mage.Sets/src/mage/cards/r/RootingKavu.java +++ b/Mage.Sets/src/mage/cards/r/RootingKavu.java @@ -1,4 +1,3 @@ - package mage.cards.r; import java.util.UUID; @@ -15,7 +14,7 @@ import mage.cards.CardsImpl; import mage.constants.CardType; import mage.constants.SubType; import mage.constants.Outcome; -import mage.filter.common.FilterCreatureCard; +import mage.filter.StaticFilters; import mage.game.Game; import mage.players.Player; @@ -26,7 +25,7 @@ import mage.players.Player; public final class RootingKavu extends CardImpl { public RootingKavu(UUID ownerId, CardSetInfo setInfo) { - super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{2}{G}{G}"); + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}"); this.subtype.add(SubType.KAVU); this.power = new MageInt(4); this.toughness = new MageInt(3); @@ -44,33 +43,34 @@ public final class RootingKavu extends CardImpl { return new RootingKavu(this); } - static class RootingKavuEffect extends OneShotEffect { +} - public RootingKavuEffect() { - super(Outcome.Benefit); - this.staticText = "shuffle all creature cards from your graveyard into your library."; - } +class RootingKavuEffect extends OneShotEffect { - public RootingKavuEffect(final RootingKavuEffect effect) { - super(effect); - } + public RootingKavuEffect() { + super(Outcome.Benefit); + this.staticText = "shuffle all creature cards from your graveyard into your library."; + } - @Override - public RootingKavuEffect copy() { - return new RootingKavuEffect(this); - } + public RootingKavuEffect(final RootingKavuEffect effect) { + super(effect); + } - @Override - public boolean apply(Game game, Ability source) { - Player controller = game.getPlayer(source.getControllerId()); - if (controller != null) { - Cards cards = new CardsImpl(); - cards.addAll(controller.getGraveyard().getCards(new FilterCreatureCard(), game)); - controller.putCardsOnTopOfLibrary(cards, game, source, false); - controller.shuffleLibrary(source, game); - return true; - } - return false; + @Override + public RootingKavuEffect copy() { + return new RootingKavuEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Player controller = game.getPlayer(source.getControllerId()); + if (controller != null) { + Cards cards = new CardsImpl(); + cards.addAll(controller.getGraveyard().getCards(StaticFilters.FILTER_CARD_CREATURE, game)); + controller.putCardsOnTopOfLibrary(cards, game, source, false); + controller.shuffleLibrary(source, game); + return true; } + return false; } } diff --git a/Mage.Sets/src/mage/sets/Weatherlight.java b/Mage.Sets/src/mage/sets/Weatherlight.java index f8194ad77ba..765c569828e 100644 --- a/Mage.Sets/src/mage/sets/Weatherlight.java +++ b/Mage.Sets/src/mage/sets/Weatherlight.java @@ -44,6 +44,7 @@ public final class Weatherlight extends ExpansionSet { cards.add(new SetCardInfo("Argivian Restoration", 34, Rarity.UNCOMMON, mage.cards.a.ArgivianRestoration.class)); cards.add(new SetCardInfo("Aura of Silence", 7, Rarity.UNCOMMON, mage.cards.a.AuraOfSilence.class)); cards.add(new SetCardInfo("Avizoa", 35, Rarity.RARE, mage.cards.a.Avizoa.class)); + cards.add(new SetCardInfo("Barishi", 61, Rarity.UNCOMMON, mage.cards.b.Barishi.class)); cards.add(new SetCardInfo("Barrow Ghoul", 61, Rarity.COMMON, mage.cards.b.BarrowGhoul.class)); cards.add(new SetCardInfo("Benalish Infantry", 8, Rarity.COMMON, mage.cards.b.BenalishInfantry.class)); cards.add(new SetCardInfo("Benalish Knight", 9, Rarity.COMMON, mage.cards.b.BenalishKnight.class));