mirror of
https://github.com/correl/mage.git
synced 2024-12-26 03:00:11 +00:00
[MID] Implemented Deathbonnet Sprout / Deathbonnet Hulk
This commit is contained in:
parent
0408e08306
commit
37f71d0df4
3 changed files with 157 additions and 0 deletions
93
Mage.Sets/src/mage/cards/d/DeathbonnetHulk.java
Normal file
93
Mage.Sets/src/mage/cards/d/DeathbonnetHulk.java
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.cards.Card;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.*;
|
||||||
|
import mage.counters.CounterType;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.Permanent;
|
||||||
|
import mage.players.Player;
|
||||||
|
import mage.target.TargetCard;
|
||||||
|
import mage.target.common.TargetCardInGraveyard;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class DeathbonnetHulk extends CardImpl {
|
||||||
|
|
||||||
|
public DeathbonnetHulk(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.FUNGUS);
|
||||||
|
this.subtype.add(SubType.HORROR);
|
||||||
|
this.power = new MageInt(3);
|
||||||
|
this.toughness = new MageInt(3);
|
||||||
|
this.color.setGreen(true);
|
||||||
|
this.transformable = true;
|
||||||
|
this.nightCard = true;
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, you may exile a card from a graveyard. If a creature card was exiled this way, put a +1/+1 counter on Deathbonnet Hulk.
|
||||||
|
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||||
|
new DeathbonnetHulkEffect(), TargetController.YOU, false
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
private DeathbonnetHulk(final DeathbonnetHulk card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathbonnetHulk copy() {
|
||||||
|
return new DeathbonnetHulk(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class DeathbonnetHulkEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
DeathbonnetHulkEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "you may exile a card from a graveyard. " +
|
||||||
|
"If a creature card was exiled this way, put a +1/+1 counter on {this}";
|
||||||
|
}
|
||||||
|
|
||||||
|
private DeathbonnetHulkEffect(final DeathbonnetHulkEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathbonnetHulkEffect copy() {
|
||||||
|
return new DeathbonnetHulkEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player player = game.getPlayer(source.getControllerId());
|
||||||
|
if (player == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
TargetCard target = new TargetCardInGraveyard(0, 1);
|
||||||
|
target.setNotTarget(true);
|
||||||
|
player.choose(outcome, target, source.getSourceId(), game);
|
||||||
|
Card card = game.getCard(target.getFirstTarget());
|
||||||
|
if (card == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
boolean flag = card.isCreature(game);
|
||||||
|
player.moveCards(card, Zone.EXILED, source, game);
|
||||||
|
if (!flag) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Permanent permanent = source.getSourcePermanentIfItStillExists(game);
|
||||||
|
if (permanent != null) {
|
||||||
|
permanent.addCounters(CounterType.P1P1.createInstance(), source.getControllerId(), source, game);
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
62
Mage.Sets/src/mage/cards/d/DeathbonnetSprout.java
Normal file
62
Mage.Sets/src/mage/cards/d/DeathbonnetSprout.java
Normal file
|
@ -0,0 +1,62 @@
|
||||||
|
package mage.cards.d;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
|
||||||
|
import mage.abilities.condition.Condition;
|
||||||
|
import mage.abilities.condition.common.CardsInControllerGraveyardCondition;
|
||||||
|
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||||
|
import mage.abilities.dynamicvalue.common.CardsInControllerGraveyardCount;
|
||||||
|
import mage.abilities.effects.common.MillCardsControllerEffect;
|
||||||
|
import mage.abilities.effects.common.TransformSourceEffect;
|
||||||
|
import mage.abilities.hint.Hint;
|
||||||
|
import mage.abilities.hint.ValueHint;
|
||||||
|
import mage.abilities.keyword.TransformAbility;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
import mage.filter.StaticFilters;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class DeathbonnetSprout extends CardImpl {
|
||||||
|
|
||||||
|
private static final Condition condition
|
||||||
|
= new CardsInControllerGraveyardCondition(3, StaticFilters.FILTER_CARD_CREATURE);
|
||||||
|
private static final Hint hint = new ValueHint(
|
||||||
|
"Creature cards in your graveyard",
|
||||||
|
new CardsInControllerGraveyardCount(StaticFilters.FILTER_CARD_CREATURE)
|
||||||
|
);
|
||||||
|
|
||||||
|
public DeathbonnetSprout(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{G}");
|
||||||
|
|
||||||
|
this.subtype.add(SubType.FUNGUS);
|
||||||
|
this.power = new MageInt(1);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
this.transformable = true;
|
||||||
|
this.secondSideCardClazz = mage.cards.d.DeathbonnetHulk.class;
|
||||||
|
|
||||||
|
// At the beginning of your upkeep, mill a card. Then if there are three or more creature cards in your graveyard, transform Deathbonnet Sprout.
|
||||||
|
this.addAbility(new TransformAbility());
|
||||||
|
Ability ability = new EntersBattlefieldTriggeredAbility(new MillCardsControllerEffect(1));
|
||||||
|
ability.addEffect(new ConditionalOneShotEffect(
|
||||||
|
new TransformSourceEffect(true), condition,
|
||||||
|
"Then if there are three or more creature cards in your graveyard, transform {this}"
|
||||||
|
));
|
||||||
|
this.addAbility(ability.addHint(hint));
|
||||||
|
}
|
||||||
|
|
||||||
|
private DeathbonnetSprout(final DeathbonnetSprout card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public DeathbonnetSprout copy() {
|
||||||
|
return new DeathbonnetSprout(this);
|
||||||
|
}
|
||||||
|
}
|
|
@ -88,6 +88,8 @@ public final class InnistradMidnightHunt extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Dawnhart Mentor", 179, Rarity.UNCOMMON, mage.cards.d.DawnhartMentor.class));
|
cards.add(new SetCardInfo("Dawnhart Mentor", 179, Rarity.UNCOMMON, mage.cards.d.DawnhartMentor.class));
|
||||||
cards.add(new SetCardInfo("Dawnhart Rejuvenator", 180, Rarity.COMMON, mage.cards.d.DawnhartRejuvenator.class));
|
cards.add(new SetCardInfo("Dawnhart Rejuvenator", 180, Rarity.COMMON, mage.cards.d.DawnhartRejuvenator.class));
|
||||||
cards.add(new SetCardInfo("Dawnhart Wardens", 216, Rarity.UNCOMMON, mage.cards.d.DawnhartWardens.class));
|
cards.add(new SetCardInfo("Dawnhart Wardens", 216, Rarity.UNCOMMON, mage.cards.d.DawnhartWardens.class));
|
||||||
|
cards.add(new SetCardInfo("Deathbonnet Hulk", 181, Rarity.UNCOMMON, mage.cards.d.DeathbonnetHulk.class));
|
||||||
|
cards.add(new SetCardInfo("Deathbonnet Sprout", 181, Rarity.UNCOMMON, mage.cards.d.DeathbonnetSprout.class));
|
||||||
cards.add(new SetCardInfo("Defend the Celestus", 182, Rarity.UNCOMMON, mage.cards.d.DefendTheCelestus.class));
|
cards.add(new SetCardInfo("Defend the Celestus", 182, Rarity.UNCOMMON, mage.cards.d.DefendTheCelestus.class));
|
||||||
cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class));
|
cards.add(new SetCardInfo("Defenestrate", 95, Rarity.COMMON, mage.cards.d.Defenestrate.class));
|
||||||
cards.add(new SetCardInfo("Delver of Secrets", 47, Rarity.UNCOMMON, mage.cards.d.DelverOfSecrets.class));
|
cards.add(new SetCardInfo("Delver of Secrets", 47, Rarity.UNCOMMON, mage.cards.d.DelverOfSecrets.class));
|
||||||
|
|
Loading…
Reference in a new issue