mirror of
https://github.com/correl/mage.git
synced 2025-03-13 01:09:53 -09:00
[BRO] Implement Disciples of Gix
This commit is contained in:
parent
006e48e000
commit
edda235273
3 changed files with 100 additions and 14 deletions
Mage.Sets/src/mage
|
@ -1,10 +1,10 @@
|
|||
package mage.cards.b;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.effects.SearchEffect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.cards.Cards;
|
||||
import mage.cards.CardsImpl;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
|
@ -14,8 +14,9 @@ import mage.game.Game;
|
|||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author cbt33, plopman (Entomb)
|
||||
*/
|
||||
public final class BuriedAlive extends CardImpl {
|
||||
|
@ -25,7 +26,6 @@ public final class BuriedAlive extends CardImpl {
|
|||
|
||||
// Search your library for up to three creature cards and put them into your graveyard. Then shuffle your library.
|
||||
this.getSpellAbility().addEffect(new BuriedAliveEffect());
|
||||
|
||||
}
|
||||
|
||||
private BuriedAlive(final BuriedAlive card) {
|
||||
|
@ -38,10 +38,10 @@ public final class BuriedAlive extends CardImpl {
|
|||
}
|
||||
}
|
||||
|
||||
class BuriedAliveEffect extends SearchEffect {
|
||||
class BuriedAliveEffect extends OneShotEffect {
|
||||
|
||||
public BuriedAliveEffect() {
|
||||
super(new TargetCardInLibrary(0, 3, StaticFilters.FILTER_CARD_CREATURE), Outcome.Detriment);
|
||||
super(Outcome.Detriment);
|
||||
staticText = "search your library for up to three creature cards, put them into your graveyard, then shuffle";
|
||||
}
|
||||
|
||||
|
@ -57,14 +57,17 @@ class BuriedAliveEffect extends SearchEffect {
|
|||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller != null) {
|
||||
if (controller.searchLibrary(target, source, game)) {
|
||||
controller.moveCards(new CardsImpl(target.getTargets()), Zone.GRAVEYARD, source, game);
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(
|
||||
0, 3, StaticFilters.FILTER_CARD_CREATURE
|
||||
);
|
||||
controller.searchLibrary(target, source, game);
|
||||
Cards cards = new CardsImpl(target.getTargets());
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
82
Mage.Sets/src/mage/cards/d/DisciplesOfGix.java
Normal file
82
Mage.Sets/src/mage/cards/d/DisciplesOfGix.java
Normal file
|
@ -0,0 +1,82 @@
|
|||
package mage.cards.d;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
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.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCardInLibrary;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class DisciplesOfGix extends CardImpl {
|
||||
|
||||
public DisciplesOfGix(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{B}{B}");
|
||||
|
||||
this.subtype.add(SubType.PHYREXIAN);
|
||||
this.subtype.add(SubType.HUMAN);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Disciples of Gix enters the battlefield, search your library for up to three artifact cards, put them into your graveyard, then shuffle.
|
||||
this.addAbility(new EntersBattlefieldTriggeredAbility(new DisciplesOfGixEffect()));
|
||||
}
|
||||
|
||||
private DisciplesOfGix(final DisciplesOfGix card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DisciplesOfGix copy() {
|
||||
return new DisciplesOfGix(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class DisciplesOfGixEffect extends OneShotEffect {
|
||||
|
||||
public DisciplesOfGixEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "search your library for up to three artifact cards, put them into your graveyard, then shuffle";
|
||||
}
|
||||
|
||||
public DisciplesOfGixEffect(final DisciplesOfGixEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DisciplesOfGixEffect copy() {
|
||||
return new DisciplesOfGixEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
if (controller == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCardInLibrary target = new TargetCardInLibrary(
|
||||
0, 3, StaticFilters.FILTER_CARD_ARTIFACT
|
||||
);
|
||||
controller.searchLibrary(target, source, game);
|
||||
Cards cards = new CardsImpl(target.getTargets());
|
||||
cards.retainZone(Zone.LIBRARY, game);
|
||||
controller.moveCards(cards, Zone.GRAVEYARD, source, game);
|
||||
controller.shuffleLibrary(source, game);
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -42,6 +42,7 @@ public final class TheBrothersWar extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Corrupt", 88, Rarity.UNCOMMON, mage.cards.c.Corrupt.class));
|
||||
cards.add(new SetCardInfo("Depth Charge Colossus", 78, Rarity.COMMON, mage.cards.d.DepthChargeColossus.class));
|
||||
cards.add(new SetCardInfo("Diabolic Intent", 89, Rarity.RARE, mage.cards.d.DiabolicIntent.class));
|
||||
cards.add(new SetCardInfo("Disciples of Gix", 90, Rarity.UNCOMMON, mage.cards.d.DisciplesOfGix.class));
|
||||
cards.add(new SetCardInfo("Disenchant", 6, Rarity.COMMON, mage.cards.d.Disenchant.class));
|
||||
cards.add(new SetCardInfo("Disfigure", 91, Rarity.COMMON, mage.cards.d.Disfigure.class));
|
||||
cards.add(new SetCardInfo("Drafna, Founder of Lat-Nam", 47, Rarity.RARE, mage.cards.d.DrafnaFounderOfLatNam.class));
|
||||
|
|
Loading…
Add table
Reference in a new issue