mirror of
https://github.com/correl/mage.git
synced 2025-01-12 03:00:13 +00:00
Implemented Barishi
This commit is contained in:
parent
45243378cf
commit
e0cb6a0583
3 changed files with 103 additions and 26 deletions
76
Mage.Sets/src/mage/cards/b/Barishi.java
Normal file
76
Mage.Sets/src/mage/cards/b/Barishi.java
Normal file
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue