From 09a4294466f4c63467fbc1a35e25638f1c649fac Mon Sep 17 00:00:00 2001 From: xenohedron Date: Thu, 20 Apr 2023 22:20:46 -0400 Subject: [PATCH] Implement [ICE] Goblin Sappers (#10215) * Implement [ICE] Goblin Sappers * Fix text on the stack * Cleanup text --- Mage.Sets/src/mage/cards/g/GoblinSappers.java | 63 +++++++++++++++++++ Mage.Sets/src/mage/sets/IceAge.java | 1 + 2 files changed, 64 insertions(+) create mode 100644 Mage.Sets/src/mage/cards/g/GoblinSappers.java diff --git a/Mage.Sets/src/mage/cards/g/GoblinSappers.java b/Mage.Sets/src/mage/cards/g/GoblinSappers.java new file mode 100644 index 0000000000..ec64f37748 --- /dev/null +++ b/Mage.Sets/src/mage/cards/g/GoblinSappers.java @@ -0,0 +1,63 @@ +package mage.cards.g; + +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.DelayedTriggeredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.common.delayed.AtTheEndOfCombatDelayedTriggeredAbility; +import mage.abilities.costs.common.TapSourceCost; +import mage.abilities.costs.mana.ManaCostsImpl; +import mage.abilities.effects.common.CreateDelayedTriggeredAbilityEffect; +import mage.abilities.effects.common.DestroySourceEffect; +import mage.abilities.effects.common.DestroyTargetEffect; +import mage.abilities.effects.common.combat.CantBeBlockedTargetEffect; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.constants.Zone; +import mage.target.common.TargetControlledCreaturePermanent; + +import java.util.UUID; + +/** + * @author xenohedron + */ + +public final class GoblinSappers extends CardImpl { + + public GoblinSappers(UUID ownerId, CardSetInfo setInfo) { + super(ownerId,setInfo,new CardType[]{CardType.CREATURE},"{1}{R}"); + this.subtype.add(SubType.GOBLIN); + this.power = new MageInt(1); + this.toughness = new MageInt(1); + + // {R}{R}, {T}: Target creature you control can’t be blocked this turn. Destroy it and Goblin Sappers at end of combat. + Ability ability = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new ManaCostsImpl<>("{R}{R}")); + ability.addCost(new TapSourceCost()); + ability.addTarget(new TargetControlledCreaturePermanent()); + DelayedTriggeredAbility triggeredAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature")); + triggeredAbility.addEffect(new DestroySourceEffect().setText("and {this}")); + ability.addEffect(new CreateDelayedTriggeredAbilityEffect(triggeredAbility).setText("Destroy it and {this} at end of combat.")); + this.addAbility(ability); + + // {R}{R}{R}{R}, {T}: Target creature you control can’t be blocked this turn. Destroy it at end of combat. + Ability secondAbility = new SimpleActivatedAbility(Zone.BATTLEFIELD, new CantBeBlockedTargetEffect(), new ManaCostsImpl<>("{R}{R}{R}{R}")); + secondAbility.addCost(new TapSourceCost()); + secondAbility.addTarget(new TargetControlledCreaturePermanent()); + DelayedTriggeredAbility secondTriggeredAbility = new AtTheEndOfCombatDelayedTriggeredAbility(new DestroyTargetEffect().setText("destroy that creature")); + secondAbility.addEffect(new CreateDelayedTriggeredAbilityEffect(secondTriggeredAbility).setText("Destroy it at end of combat.")); + this.addAbility(secondAbility); + + } + + private GoblinSappers(final GoblinSappers card) { + super(card); + } + + @Override + public GoblinSappers copy() { + return new GoblinSappers(this); + } + +} diff --git a/Mage.Sets/src/mage/sets/IceAge.java b/Mage.Sets/src/mage/sets/IceAge.java index 794f8bdc78..b717fde1b6 100644 --- a/Mage.Sets/src/mage/sets/IceAge.java +++ b/Mage.Sets/src/mage/sets/IceAge.java @@ -147,6 +147,7 @@ public final class IceAge extends ExpansionSet { cards.add(new SetCardInfo("Glaciers", 294, Rarity.RARE, mage.cards.g.Glaciers.class)); cards.add(new SetCardInfo("Goblin Lyre", 319, Rarity.RARE, mage.cards.g.GoblinLyre.class)); cards.add(new SetCardInfo("Goblin Mutant", 188, Rarity.UNCOMMON, mage.cards.g.GoblinMutant.class)); + cards.add(new SetCardInfo("Goblin Sappers", 189, Rarity.COMMON, mage.cards.g.GoblinSappers.class)); cards.add(new SetCardInfo("Goblin Snowman", 191, Rarity.UNCOMMON, mage.cards.g.GoblinSnowman.class)); cards.add(new SetCardInfo("Gorilla Pack", 247, Rarity.COMMON, mage.cards.g.GorillaPack.class)); cards.add(new SetCardInfo("Gravebind", 129, Rarity.RARE, mage.cards.g.Gravebind.class));