diff --git a/Mage.Sets/src/mage/cards/g/GiantOpportunity.java b/Mage.Sets/src/mage/cards/g/GiantOpportunity.java new file mode 100644 index 0000000000..0baf6ebb8b --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GiantOpportunity.java @@ -0,0 +1,44 @@ +package mage.cards.g; + +import mage.abilities.costs.common.SacrificeTargetCost; +import mage.abilities.effects.common.CreateTokenEffect; +import mage.abilities.effects.common.DoIfCostPaid; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.common.FilterControlledPermanent; +import mage.game.permanent.token.FoodToken; +import mage.game.permanent.token.GiantOpportunityToken; +import mage.target.common.TargetControlledPermanent; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class GiantOpportunity extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.FOOD, "Foods"); + + public GiantOpportunity(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}"); + + // You may sacrifice two Foods. If you do, create a 7/7 green Giant creature token. Otherwise, create three Food tokens. + this.getSpellAbility().addEffect(new DoIfCostPaid( + new CreateTokenEffect(new GiantOpportunityToken()), + new CreateTokenEffect(new FoodToken(), 3), + new SacrificeTargetCost(new TargetControlledPermanent(2, filter)) + ).setText("You may sacrifice two Foods. If you do, create a 7/7 green Giant creature token. " + + "Otherwise, create three Food tokens.")); + } + + private GiantOpportunity(final GiantOpportunity card) { + super(card); + } + + @Override + public GiantOpportunity copy() { + return new GiantOpportunity(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java index 1e4e434fcf..dda7fa3739 100644 --- a/Mage.Sets/src/mage/sets/ThroneOfEldraine.java +++ b/Mage.Sets/src/mage/sets/ThroneOfEldraine.java @@ -91,6 +91,7 @@ public final class ThroneOfEldraine extends ExpansionSet { cards.add(new SetCardInfo("Garrison Griffin", 305, Rarity.COMMON, mage.cards.g.GarrisonGriffin.class)); cards.add(new SetCardInfo("Garruk, Cursed Huntsman", 191, Rarity.MYTHIC, mage.cards.g.GarrukCursedHuntsman.class)); cards.add(new SetCardInfo("Giant Killer", 14, Rarity.RARE, mage.cards.g.GiantKiller.class)); + cards.add(new SetCardInfo("Giant Opportunity", 159, Rarity.UNCOMMON, mage.cards.g.GiantOpportunity.class)); cards.add(new SetCardInfo("Gilded Goose", 160, Rarity.RARE, mage.cards.g.GildedGoose.class)); cards.add(new SetCardInfo("Gingerbrute", 219, Rarity.COMMON, mage.cards.g.Gingerbrute.class)); cards.add(new SetCardInfo("Glass Casket", 15, Rarity.UNCOMMON, mage.cards.g.GlassCasket.class)); diff --git a/Mage/src/main/java/mage/game/permanent/token/GiantOpportunityToken.java b/Mage/src/main/java/mage/game/permanent/token/GiantOpportunityToken.java new file mode 100644 index 0000000000..d8bee08b4e --- /dev/null +++ b/Mage/src/main/java/mage/game/permanent/token/GiantOpportunityToken.java @@ -0,0 +1,28 @@ +package mage.game.permanent.token; + +import mage.MageInt; +import mage.constants.CardType; +import mage.constants.SubType; + +/** + * @author TheElk801 + */ +public final class GiantOpportunityToken extends TokenImpl { + + public GiantOpportunityToken() { + super("Giant", "7/7 green Giant creature token"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.GIANT); + color.setGreen(true); + power = new MageInt(7); + toughness = new MageInt(7); + } + + private GiantOpportunityToken(final GiantOpportunityToken token) { + super(token); + } + + public GiantOpportunityToken copy() { + return new GiantOpportunityToken(this); + } +}