mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 03:51:58 -08:00
[DSK] Implement Overlord of the Balemurk
This commit is contained in:
parent
3fa27c36c7
commit
f70ec4df45
2 changed files with 97 additions and 0 deletions
96
Mage.Sets/src/mage/cards/o/OverlordOfTheBalemurk.java
Normal file
96
Mage.Sets/src/mage/cards/o/OverlordOfTheBalemurk.java
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
package mage.cards.o;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldOrAttacksSourceTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||||
|
import mage.abilities.keyword.ImpendingAbility;
|
||||||
|
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.Zone;
|
||||||
|
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 OverlordOfTheBalemurk extends CardImpl {
|
||||||
|
|
||||||
|
public OverlordOfTheBalemurk(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "{3}{B}{B}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.AVATAR);
|
||||||
|
this.subtype.add(SubType.HORROR);
|
||||||
|
this.power = new MageInt(5);
|
||||||
|
this.toughness = new MageInt(5);
|
||||||
|
|
||||||
|
// Impending 5--{1}{B}
|
||||||
|
this.addAbility(new ImpendingAbility("{1}{B}", 5));
|
||||||
|
|
||||||
|
// Whenever Overlord of the Balemurk enters or attacks, mill four cards, then you may return a non-Avatar creature card or a planeswalker card from your graveyard to your hand.
|
||||||
|
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new MillCardsControllerEffect(4));
|
||||||
|
ability.addEffect(new OverlordOfTheBalemurkEffect());
|
||||||
|
this.addAbility(ability);
|
||||||
|
}
|
||||||
|
|
||||||
|
private OverlordOfTheBalemurk(final OverlordOfTheBalemurk card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OverlordOfTheBalemurk copy() {
|
||||||
|
return new OverlordOfTheBalemurk(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class OverlordOfTheBalemurkEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final FilterCard filter = new FilterCard("non-Avatar creature card or a planeswalker card from your graveyard");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(Predicates.or(
|
||||||
|
Predicates.and(
|
||||||
|
Predicates.not(SubType.AVATAR.getPredicate()),
|
||||||
|
CardType.CREATURE.getPredicate()
|
||||||
|
), CardType.PLANESWALKER.getPredicate()
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
OverlordOfTheBalemurkEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = ", then you may return a non-Avatar creature card " +
|
||||||
|
"or a planeswalker card from your graveyard to your hand";
|
||||||
|
}
|
||||||
|
|
||||||
|
private OverlordOfTheBalemurkEffect(final OverlordOfTheBalemurkEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public OverlordOfTheBalemurkEffect copy() {
|
||||||
|
return new OverlordOfTheBalemurkEffect(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.PutCreatureInPlay, target, source, game);
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
return card != null && player.moveCards(card, Zone.HAND, source, game);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -139,6 +139,7 @@ public final class DuskmournHouseOfHorror extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Oblivious Bookworm", 225, Rarity.UNCOMMON, mage.cards.o.ObliviousBookworm.class));
|
cards.add(new SetCardInfo("Oblivious Bookworm", 225, Rarity.UNCOMMON, mage.cards.o.ObliviousBookworm.class));
|
||||||
cards.add(new SetCardInfo("Optimistic Scavenger", 21, Rarity.UNCOMMON, mage.cards.o.OptimisticScavenger.class));
|
cards.add(new SetCardInfo("Optimistic Scavenger", 21, Rarity.UNCOMMON, mage.cards.o.OptimisticScavenger.class));
|
||||||
cards.add(new SetCardInfo("Orphans of the Wheat", 22, Rarity.UNCOMMON, mage.cards.o.OrphansOfTheWheat.class));
|
cards.add(new SetCardInfo("Orphans of the Wheat", 22, Rarity.UNCOMMON, mage.cards.o.OrphansOfTheWheat.class));
|
||||||
|
cards.add(new SetCardInfo("Overlord of the Balemurk", 113, Rarity.MYTHIC, mage.cards.o.OverlordOfTheBalemurk.class));
|
||||||
cards.add(new SetCardInfo("Overlord of the Boilerbilges", 146, Rarity.MYTHIC, mage.cards.o.OverlordOfTheBoilerbilges.class));
|
cards.add(new SetCardInfo("Overlord of the Boilerbilges", 146, Rarity.MYTHIC, mage.cards.o.OverlordOfTheBoilerbilges.class));
|
||||||
cards.add(new SetCardInfo("Overlord of the Floodpits", 68, Rarity.MYTHIC, mage.cards.o.OverlordOfTheFloodpits.class));
|
cards.add(new SetCardInfo("Overlord of the Floodpits", 68, Rarity.MYTHIC, mage.cards.o.OverlordOfTheFloodpits.class));
|
||||||
cards.add(new SetCardInfo("Overlord of the Hauntwoods", 194, Rarity.MYTHIC, mage.cards.o.OverlordOfTheHauntwoods.class));
|
cards.add(new SetCardInfo("Overlord of the Hauntwoods", 194, Rarity.MYTHIC, mage.cards.o.OverlordOfTheHauntwoods.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue