[SPM] Implement Green Goblin, Revenant

This commit is contained in:
theelk801 2025-07-25 23:07:10 -04:00
parent 1bbf173058
commit be2acd79e4
2 changed files with 89 additions and 0 deletions

View file

@ -0,0 +1,88 @@
package mage.cards.g;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.effects.Effect;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.discard.DiscardControllerEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.abilities.keyword.DeathtouchAbility;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.game.Game;
import mage.watchers.common.DiscardedCardWatcher;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class GreenGoblinRevenant extends CardImpl {
public GreenGoblinRevenant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{3}{B}{R}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.VILLAIN);
this.power = new MageInt(3);
this.toughness = new MageInt(3);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Deathtouch
this.addAbility(DeathtouchAbility.getInstance());
// Whenever Green Goblin attacks, discard a card. Then draw a card for each card you've discarded this turn.
Ability ability = new AttacksTriggeredAbility(new DiscardControllerEffect(1));
ability.addEffect(new DrawCardSourceControllerEffect(GreenGoblinRevenantValue.instance).concatBy("Then"));
this.addAbility(ability.addHint(GreenGoblinRevenantValue.getHint()), new DiscardedCardWatcher());
}
private GreenGoblinRevenant(final GreenGoblinRevenant card) {
super(card);
}
@Override
public GreenGoblinRevenant copy() {
return new GreenGoblinRevenant(this);
}
}
enum GreenGoblinRevenantValue implements DynamicValue {
instance;
private static final Hint hint = new ValueHint("Cards you've discarded this turn", instance);
public static Hint getHint() {
return hint;
}
@Override
public int calculate(Game game, Ability sourceAbility, Effect effect) {
return DiscardedCardWatcher.getDiscarded(sourceAbility.getControllerId(), game);
}
@Override
public GreenGoblinRevenantValue copy() {
return instance;
}
@Override
public String toString() {
return "1";
}
@Override
public String getMessage() {
return "card you've discarded this turn";
}
}

View file

@ -37,6 +37,7 @@ public final class MarvelsSpiderMan extends ExpansionSet {
cards.add(new SetCardInfo("Flying Octobot", 31, Rarity.UNCOMMON, mage.cards.f.FlyingOctobot.class));
cards.add(new SetCardInfo("Forest", 193, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Forest", 198, Rarity.LAND, mage.cards.basiclands.Forest.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Green Goblin, Revenant", 130, Rarity.UNCOMMON, mage.cards.g.GreenGoblinRevenant.class));
cards.add(new SetCardInfo("Grow Extra Arms", 101, Rarity.COMMON, mage.cards.g.GrowExtraArms.class));
cards.add(new SetCardInfo("Guy in the Chair", 102, Rarity.COMMON, mage.cards.g.GuyInTheChair.class));
cards.add(new SetCardInfo("Iron Spider, Stark Upgrade", 166, Rarity.RARE, mage.cards.i.IronSpiderStarkUpgrade.class, NON_FULL_USE_VARIOUS));