[TDM] Implement Surrak, Elusive Hunter

This commit is contained in:
theelk801 2025-04-11 10:08:06 -04:00
parent b819545744
commit 7964b10a4f
2 changed files with 99 additions and 0 deletions

View file

@ -0,0 +1,98 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.common.CantBeCounteredSourceAbility;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.constants.Zone;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.game.permanent.Permanent;
import mage.game.stack.Spell;
import mage.game.stack.StackObject;
import mage.util.CardUtil;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SurrakElusiveHunter extends CardImpl {
public SurrakElusiveHunter(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}");
this.supertype.add(SuperType.LEGENDARY);
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.WARRIOR);
this.power = new MageInt(4);
this.toughness = new MageInt(3);
// This spell can't be countered.
this.addAbility(new CantBeCounteredSourceAbility());
// Trample
this.addAbility(TrampleAbility.getInstance());
// Whenever a creature you control or a creature spell you control becomes the target of a spell or ability an opponent controls, draw a card.
this.addAbility(new SurrakElusiveHunterTriggeredAbility());
}
private SurrakElusiveHunter(final SurrakElusiveHunter card) {
super(card);
}
@Override
public SurrakElusiveHunter copy() {
return new SurrakElusiveHunter(this);
}
}
class SurrakElusiveHunterTriggeredAbility extends TriggeredAbilityImpl {
SurrakElusiveHunterTriggeredAbility() {
super(Zone.BATTLEFIELD, new DrawCardSourceControllerEffect(1));
this.setTriggerPhrase("Whenever a creature you control or a creature spell you control " +
"becomes the target of a spell or ability an opponent controls, ");
}
private SurrakElusiveHunterTriggeredAbility(final SurrakElusiveHunterTriggeredAbility ability) {
super(ability);
}
@Override
public SurrakElusiveHunterTriggeredAbility copy() {
return new SurrakElusiveHunterTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.TARGETED;
}
private boolean checkTargeted(UUID targetId, Game game) {
Permanent permanent = game.getPermanentOrLKIBattlefield(targetId);
if (permanent != null) {
return permanent.isCreature(game) && permanent.isControlledBy(getControllerId());
}
Spell spell = game.getSpellOrLKIStack(targetId);
return spell != null && spell.isCreature(game) && spell.isControlledBy(getControllerId());
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (!checkTargeted(event.getTargetId(), game)) {
return false;
}
StackObject targetingObject = CardUtil.getTargetingStackObject(this.getId().toString(), event, game);
return targetingObject != null
&& !game.getOpponents(getControllerId()).contains(targetingObject.getControllerId())
&& !CardUtil.checkTargetedEventAlreadyUsed(this.getId().toString(), targetingObject, event, game)
}
}

View file

@ -252,6 +252,7 @@ public final class TarkirDragonstorm extends ExpansionSet {
cards.add(new SetCardInfo("Summit Intimidator", 125, Rarity.COMMON, mage.cards.s.SummitIntimidator.class));
cards.add(new SetCardInfo("Sunpearl Kirin", 29, Rarity.UNCOMMON, mage.cards.s.SunpearlKirin.class));
cards.add(new SetCardInfo("Sunset Strikemaster", 126, Rarity.UNCOMMON, mage.cards.s.SunsetStrikemaster.class));
cards.add(new SetCardInfo("Surrak, Elusive Hunter", 161, Rarity.RARE, mage.cards.s.SurrakElusiveHunter.class));
cards.add(new SetCardInfo("Swamp", 281, Rarity.LAND, mage.cards.basiclands.Swamp.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Swiftwater Cliffs", 268, Rarity.COMMON, mage.cards.s.SwiftwaterCliffs.class));
cards.add(new SetCardInfo("Synchronized Charge", 162, Rarity.UNCOMMON, mage.cards.s.SynchronizedCharge.class));