mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
Implemented Giant Opportunity
This commit is contained in:
parent
56c68a9d9f
commit
64dcfb840d
3 changed files with 73 additions and 0 deletions
44
Mage.Sets/src/mage/cards/g/GiantOpportunity.java
Normal file
44
Mage.Sets/src/mage/cards/g/GiantOpportunity.java
Normal file
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue