[BIG] Implement Greed's Gambit

This commit is contained in:
theelk801 2024-04-04 14:13:24 -04:00
parent 6bce50dd6f
commit b9b9889a87
3 changed files with 88 additions and 0 deletions

View file

@ -0,0 +1,57 @@
package mage.cards.g;
import mage.abilities.Ability;
import mage.abilities.common.BeginningOfEndStepTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.common.LeavesBattlefieldTriggeredAbility;
import mage.abilities.effects.common.*;
import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.TargetController;
import mage.filter.StaticFilters;
import mage.game.permanent.token.Bat21Token;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GreedsGambit extends CardImpl {
public GreedsGambit(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{3}{B}");
// When Greed's Gambit enters the battlefield, you draw three cards, gain 6 life, and create three 2/1 black Bat creature tokens with flying.
Ability ability = new EntersBattlefieldTriggeredAbility(new DrawCardSourceControllerEffect(3, "you"));
ability.addEffect(new GainLifeEffect(6).setText(", gain 6 life"));
ability.addEffect(new CreateTokenEffect(new Bat21Token(), 3).concatBy(", and"));
this.addAbility(ability);
// At the beginning of your end step, you discard a card, lose 2 life, and sacrifice a creature.
ability = new BeginningOfEndStepTriggeredAbility(new DiscardControllerEffect(1), TargetController.YOU, false);
ability.addEffect(new LoseLifeSourceControllerEffect(2).setText(", lose 2 life"));
ability.addEffect(new SacrificeControllerEffect(
StaticFilters.FILTER_PERMANENT_A_CREATURE, 1, ""
).setText(", and sacrifice a creature"));
this.addAbility(ability);
// When Greed's Gambit leaves the battlefield, you discard three cards, lose 6 life, and sacrifice three creatures.
ability = new LeavesBattlefieldTriggeredAbility(new DiscardControllerEffect(3), false);
ability.addEffect(new LoseLifeSourceControllerEffect(6).setText(", lose 6 life"));
ability.addEffect(new SacrificeControllerEffect(
StaticFilters.FILTER_PERMANENT_CREATURE, 3, ""
).setText(", and sacrifice 3 creatures"));
this.addAbility(ability);
}
private GreedsGambit(final GreedsGambit card) {
super(card);
}
@Override
public GreedsGambit copy() {
return new GreedsGambit(this);
}
}

View file

@ -27,6 +27,7 @@ public final class TheBigScore extends ExpansionSet {
cards.add(new SetCardInfo("Esoteric Duplicator", 5, Rarity.MYTHIC, mage.cards.e.EsotericDuplicator.class));
cards.add(new SetCardInfo("Generous Plunderer", 11, Rarity.MYTHIC, mage.cards.g.GenerousPlunderer.class));
cards.add(new SetCardInfo("Grand Abolisher", 2, Rarity.MYTHIC, mage.cards.g.GrandAbolisher.class));
cards.add(new SetCardInfo("Greed's Gambit", 8, Rarity.MYTHIC, mage.cards.g.GreedsGambit.class));
cards.add(new SetCardInfo("Harvester of Misery", 9, Rarity.MYTHIC, mage.cards.h.HarvesterOfMisery.class));
cards.add(new SetCardInfo("Hostile Investigator", 10, Rarity.MYTHIC, mage.cards.h.HostileInvestigator.class));
cards.add(new SetCardInfo("Legion Extruder", 12, Rarity.MYTHIC, mage.cards.l.LegionExtruder.class));

View file

@ -0,0 +1,30 @@
package mage.game.permanent.token;
import mage.MageInt;
import mage.abilities.keyword.FlyingAbility;
import mage.constants.CardType;
import mage.constants.SubType;
/**
* @author TheElk801
*/
public final class Bat21Token extends TokenImpl {
public Bat21Token() {
super("Bat Token", "2/1 black Bat creature token with flying");
cardType.add(CardType.CREATURE);
color.setBlack(true);
subtype.add(SubType.BAT);
power = new MageInt(2);
toughness = new MageInt(1);
this.addAbility(FlyingAbility.getInstance());
}
private Bat21Token(final Bat21Token token) {
super(token);
}
public Bat21Token copy() {
return new Bat21Token(this);
}
}