[MH2] Implemented Arcbound Tracker

This commit is contained in:
Daniel Bomar 2021-06-02 19:41:24 -05:00
parent 9eabb7596d
commit 03910cc994
No known key found for this signature in database
GPG key ID: C86C8658F4023918
2 changed files with 86 additions and 0 deletions

View file

@ -0,0 +1,85 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.abilities.TriggeredAbilityImpl;
import mage.abilities.effects.common.counter.AddCountersSourceEffect;
import mage.constants.SubType;
import mage.abilities.keyword.MenaceAbility;
import mage.abilities.keyword.ModularAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Zone;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.events.GameEvent;
import mage.watchers.common.SpellsCastWatcher;
/**
*
* @author weirddan455
*/
public final class ArcboundTracker extends CardImpl {
public ArcboundTracker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{2}{R}");
this.subtype.add(SubType.DOG);
this.power = new MageInt(0);
this.toughness = new MageInt(0);
// Menace
this.addAbility(new MenaceAbility());
// Modular 2
this.addAbility(new ModularAbility(this, 2));
// Whenever you cast a spell other than your first spell each turn, put a +1/+1 counter on Arcbound Tracker.
this.addAbility(new ArcboundTrackerTriggeredAbility(), new SpellsCastWatcher());
}
private ArcboundTracker(final ArcboundTracker card) {
super(card);
}
@Override
public ArcboundTracker copy() {
return new ArcboundTracker(this);
}
}
class ArcboundTrackerTriggeredAbility extends TriggeredAbilityImpl {
public ArcboundTrackerTriggeredAbility() {
super(Zone.BATTLEFIELD, new AddCountersSourceEffect(CounterType.P1P1.createInstance()));
}
private ArcboundTrackerTriggeredAbility(final ArcboundTrackerTriggeredAbility ability) {
super(ability);
}
@Override
public ArcboundTrackerTriggeredAbility copy() {
return new ArcboundTrackerTriggeredAbility(this);
}
@Override
public boolean checkEventType(GameEvent event, Game game) {
return event.getType() == GameEvent.EventType.SPELL_CAST;
}
@Override
public boolean checkTrigger(GameEvent event, Game game) {
if (event.getPlayerId().equals(this.getControllerId())) {
SpellsCastWatcher watcher = game.getState().getWatcher(SpellsCastWatcher.class);
return watcher != null && watcher.getSpellsCastThisTurn(event.getPlayerId()).size() > 1;
}
return false;
}
@Override
public String getRule() {
return "Whenever you cast a spell other than your first spell each turn, " + super.getRule();
}
}

View file

@ -37,6 +37,7 @@ public final class ModernHorizons2 extends ExpansionSet {
cards.add(new SetCardInfo("Arcbound Prototype", 4, Rarity.COMMON, mage.cards.a.ArcboundPrototype.class));
cards.add(new SetCardInfo("Arcbound Shikari", 184, Rarity.UNCOMMON, mage.cards.a.ArcboundShikari.class));
cards.add(new SetCardInfo("Arcbound Slasher", 111, Rarity.COMMON, mage.cards.a.ArcboundSlasher.class));
cards.add(new SetCardInfo("Arcbound Tracker", 112, Rarity.COMMON, mage.cards.a.ArcboundTracker.class));
cards.add(new SetCardInfo("Arcbound Whelp", 113, Rarity.UNCOMMON, mage.cards.a.ArcboundWhelp.class));
cards.add(new SetCardInfo("Archfiend of Sorrows", 74, Rarity.UNCOMMON, mage.cards.a.ArchfiendOfSorrows.class));
cards.add(new SetCardInfo("Archon of Cruelty", 75, Rarity.MYTHIC, mage.cards.a.ArchonOfCruelty.class));