Implemented Feasting Troll King

This commit is contained in:
Evan Kranzler 2019-09-10 20:53:43 -04:00
parent 31730c5352
commit efffc53552
2 changed files with 72 additions and 0 deletions

View file

@ -0,0 +1,71 @@
package mage.cards.f;
import mage.MageInt;
import mage.abilities.common.ActivateIfConditionActivatedAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.condition.common.CastFromHandSourceCondition;
import mage.abilities.condition.common.MyTurnCondition;
import mage.abilities.costs.common.SacrificeTargetCost;
import mage.abilities.decorator.ConditionalInterveningIfTriggeredAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ReturnSourceFromGraveyardToHandEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.Zone;
import mage.filter.common.FilterControlledPermanent;
import mage.game.permanent.token.FoodToken;
import mage.target.common.TargetControlledPermanent;
import mage.watchers.common.CastFromHandWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FeastingTrollKing extends CardImpl {
private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FOOD, "Foods");
public FeastingTrollKing(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}{G}{G}");
this.subtype.add(SubType.TROLL);
this.subtype.add(SubType.NOBLE);
this.power = new MageInt(7);
this.toughness = new MageInt(6);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// Trample
this.addAbility(TrampleAbility.getInstance());
// When Feasting Troll King enters the battlefield, if you cast it from your hand, create three Food tokens.
this.addAbility(new ConditionalInterveningIfTriggeredAbility(
new EntersBattlefieldTriggeredAbility(new CreateTokenEffect(new FoodToken(), 3)),
CastFromHandSourceCondition.instance, "When {this} enters the battlefield, " +
"if you cast it from your hand, create three Food tokens."
), new CastFromHandWatcher());
// Sacrifice three Foods: Return Feasting Troll King from your graveyard to the battlefield. Activate this ability only during your turn.
this.addAbility(new ActivateIfConditionActivatedAbility(
Zone.BATTLEFIELD,
new ReturnSourceFromGraveyardToHandEffect(),
new SacrificeTargetCost(new TargetControlledPermanent(3, filter)),
MyTurnCondition.instance
));
}
private FeastingTrollKing(final FeastingTrollKing card) {
super(card);
}
@Override
public FeastingTrollKing copy() {
return new FeastingTrollKing(this);
}
}

View file

@ -55,6 +55,7 @@ public final class ThroneOfEldraine extends ExpansionSet {
cards.add(new SetCardInfo("Faerie Formation", 316, Rarity.RARE, mage.cards.f.FaerieFormation.class)); cards.add(new SetCardInfo("Faerie Formation", 316, Rarity.RARE, mage.cards.f.FaerieFormation.class));
cards.add(new SetCardInfo("Faerie Guidemother", 11, Rarity.COMMON, mage.cards.f.FaerieGuidemother.class)); cards.add(new SetCardInfo("Faerie Guidemother", 11, Rarity.COMMON, mage.cards.f.FaerieGuidemother.class));
cards.add(new SetCardInfo("Faerie Vandal", 45, Rarity.UNCOMMON, mage.cards.f.FaerieVandal.class)); cards.add(new SetCardInfo("Faerie Vandal", 45, Rarity.UNCOMMON, mage.cards.f.FaerieVandal.class));
cards.add(new SetCardInfo("Feasting Troll King", 152, Rarity.RARE, mage.cards.f.FeastingTrollKing.class));
cards.add(new SetCardInfo("Fireborn Knight", 210, Rarity.UNCOMMON, mage.cards.f.FirebornKnight.class)); cards.add(new SetCardInfo("Fireborn Knight", 210, Rarity.UNCOMMON, mage.cards.f.FirebornKnight.class));
cards.add(new SetCardInfo("Flaxen Intruder", 155, Rarity.UNCOMMON, mage.cards.f.FlaxenIntruder.class)); cards.add(new SetCardInfo("Flaxen Intruder", 155, Rarity.UNCOMMON, mage.cards.f.FlaxenIntruder.class));
cards.add(new SetCardInfo("Foulmire Knight", 90, Rarity.UNCOMMON, mage.cards.f.FoulmireKnight.class)); cards.add(new SetCardInfo("Foulmire Knight", 90, Rarity.UNCOMMON, mage.cards.f.FoulmireKnight.class));