mirror of
https://github.com/correl/mage.git
synced 2024-12-28 19:19:20 +00:00
[MOM] Implement Halo-Charged Skaab
This commit is contained in:
parent
7a9a627d49
commit
7d901c46eb
2 changed files with 92 additions and 0 deletions
91
Mage.Sets/src/mage/cards/h/HaloChargedSkaab.java
Normal file
91
Mage.Sets/src/mage/cards/h/HaloChargedSkaab.java
Normal file
|
@ -0,0 +1,91 @@
|
|||
package mage.cards.h;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.MillCardsEachPlayerEffect;
|
||||
import mage.cards.Card;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.predicate.Predicates;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetCard;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class HaloChargedSkaab extends CardImpl {
|
||||
|
||||
public HaloChargedSkaab(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
|
||||
|
||||
this.subtype.add(SubType.ZOMBIE);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Halo-Charged Skaab enters the battlefield, each player mills two cards. Then you may put an instant, sorcery, or battle card from your graveyard on top of your library.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new MillCardsEachPlayerEffect(2, TargetController.EACH_PLAYER)
|
||||
);
|
||||
ability.addEffect(new HaloChargedSkaabEffect());
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
private HaloChargedSkaab(final HaloChargedSkaab card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HaloChargedSkaab copy() {
|
||||
return new HaloChargedSkaab(this);
|
||||
}
|
||||
}
|
||||
|
||||
class HaloChargedSkaabEffect extends OneShotEffect {
|
||||
|
||||
private static final FilterCard filter = new FilterCard("instant, sorcery, or battle card from your graveyard");
|
||||
|
||||
static {
|
||||
filter.add(Predicates.or(
|
||||
CardType.INSTANT.getPredicate(),
|
||||
CardType.SORCERY.getPredicate(),
|
||||
CardType.BATTLE.getPredicate()
|
||||
));
|
||||
}
|
||||
|
||||
HaloChargedSkaabEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "then you may put an instant, sorcery, or battle card from your graveyard on top of your library";
|
||||
}
|
||||
|
||||
private HaloChargedSkaabEffect(final HaloChargedSkaabEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HaloChargedSkaabEffect copy() {
|
||||
return new HaloChargedSkaabEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
TargetCard target = new TargetCardInYourGraveyard(0, 1, filter, true);
|
||||
player.choose(outcome, target, source, game);
|
||||
Card card = game.getCard(target.getFirstTarget());
|
||||
return card != null && player.putCardsOnTopOfLibrary(card, game, source, false);
|
||||
}
|
||||
}
|
|
@ -106,6 +106,7 @@ public final class MarchOfTheMachine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Golden-Scale Aeronaut", 15, Rarity.COMMON, mage.cards.g.GoldenScaleAeronaut.class));
|
||||
cards.add(new SetCardInfo("Grafted Butcher", 109, Rarity.RARE, mage.cards.g.GraftedButcher.class));
|
||||
cards.add(new SetCardInfo("Halo Hopper", 260, Rarity.COMMON, mage.cards.h.HaloHopper.class));
|
||||
cards.add(new SetCardInfo("Halo-Charged Skaab", 60, Rarity.COMMON, mage.cards.h.HaloChargedSkaab.class));
|
||||
cards.add(new SetCardInfo("Hangar Scrounger", 142, Rarity.COMMON, mage.cards.h.HangarScrounger.class));
|
||||
cards.add(new SetCardInfo("Harried Artisan", 143, Rarity.UNCOMMON, mage.cards.h.HarriedArtisan.class));
|
||||
cards.add(new SetCardInfo("Heliod, the Radiant Dawn", 17, Rarity.RARE, mage.cards.h.HeliodTheRadiantDawn.class));
|
||||
|
|
Loading…
Reference in a new issue