mirror of
https://github.com/correl/mage.git
synced 2025-04-11 01:01:05 -09:00
Implemented Morgue Troll
This commit is contained in:
parent
8792e0b5cf
commit
5cdc14da4c
3 changed files with 81 additions and 1 deletions
Mage.Sets/src/mage
Mage/src/main/java/mage/abilities/effects/common
76
Mage.Sets/src/mage/cards/m/MorgueTroll.java
Normal file
76
Mage.Sets/src/mage/cards/m/MorgueTroll.java
Normal file
|
@ -0,0 +1,76 @@
|
|||
package mage.cards.m;
|
||||
|
||||
import java.util.UUID;
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.BeginningOfUpkeepTriggeredAbility;
|
||||
import mage.abilities.common.SimpleActivatedAbility;
|
||||
import mage.abilities.costs.common.DiscardTargetCost;
|
||||
import mage.abilities.costs.common.ExileFromGraveCost;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.common.DoIfCostPaid;
|
||||
import mage.abilities.effects.common.SacrificeSourceEffect;
|
||||
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
|
||||
import mage.constants.SubType;
|
||||
import mage.abilities.keyword.TrampleAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.TargetController;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
import mage.target.common.TargetCardInYourGraveyard;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class MorgueTroll extends CardImpl {
|
||||
|
||||
public MorgueTroll(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{B}{G}");
|
||||
|
||||
this.subtype.add(SubType.TROLL);
|
||||
this.power = new MageInt(4);
|
||||
this.toughness = new MageInt(4);
|
||||
|
||||
// Trample
|
||||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// At the beginning of your upkeep, exile a creature card from your graveyard. If you do, put a +1/+1 counter on Morgue Troll. Otherwise sacrifice it.
|
||||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new DoIfCostPaid(
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
new SacrificeSourceEffect(),
|
||||
new ExileFromGraveCost(new TargetCardInYourGraveyard(
|
||||
StaticFilters.FILTER_CARD_CREATURE_YOUR_GRAVEYARD
|
||||
)), false
|
||||
).setText("exile a creature card from your graveyard. "
|
||||
+ "If you do, put a +1/+1 counter on {this}."
|
||||
+ " Otherwise sacrifice it."),
|
||||
TargetController.YOU, false
|
||||
));
|
||||
|
||||
// {B}{G}, Discard a creature card: Put a +1/+1 counter on Morgue Troll.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
Zone.BATTLEFIELD,
|
||||
new AddCountersSourceEffect(CounterType.P1P1.createInstance()),
|
||||
new ManaCostsImpl("{B}{G}")
|
||||
);
|
||||
ability.addCost(new DiscardTargetCost(
|
||||
new TargetCardInHand(StaticFilters.FILTER_CARD_CREATURE_A)
|
||||
));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
public MorgueTroll(final MorgueTroll card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public MorgueTroll copy() {
|
||||
return new MorgueTroll(this);
|
||||
}
|
||||
}
|
|
@ -128,6 +128,7 @@ public final class GuildsOfRavnica extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Mission Briefing", 44, Rarity.RARE, mage.cards.m.MissionBriefing.class));
|
||||
cards.add(new SetCardInfo("Molderhulk", 190, Rarity.UNCOMMON, mage.cards.m.Molderhulk.class));
|
||||
cards.add(new SetCardInfo("Moodmark Painter", 78, Rarity.COMMON, mage.cards.m.MoodmarkPainter.class));
|
||||
cards.add(new SetCardInfo("Morgue Troll", 160, Rarity.RARE, mage.cards.m.MorgueTroll.class));
|
||||
cards.add(new SetCardInfo("Mountain", 263, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));
|
||||
cards.add(new SetCardInfo("Murmuring Mystic", 45, Rarity.UNCOMMON, mage.cards.m.MurmuringMystic.class));
|
||||
cards.add(new SetCardInfo("Narcomoeba", 47, Rarity.RARE, mage.cards.n.Narcomoeba.class));
|
||||
|
|
|
@ -27,7 +27,10 @@ public class DoIfCostPaid extends OneShotEffect {
|
|||
}
|
||||
|
||||
public DoIfCostPaid(Effect effect, Effect effect2, Cost cost) {
|
||||
this(effect, cost, null, true);
|
||||
this(effect,effect2,cost,true);
|
||||
}
|
||||
public DoIfCostPaid(Effect effect, Effect effect2, Cost cost,boolean optional) {
|
||||
this(effect, cost, null, optional);
|
||||
this.otherwiseEffects.add(effect2);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue