[NEO] Implemented Jin-Gitaxias, Progress Tyrant

This commit is contained in:
Evan Kranzler 2022-02-07 21:10:53 -05:00
parent 76a1187c8e
commit abd11817d6
2 changed files with 93 additions and 0 deletions

View file

@ -0,0 +1,92 @@
package mage.cards.j;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.common.SpellCastOpponentTriggeredAbility;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CopySourceSpellEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.game.stack.Spell;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class JinGitaxiasProgressTyrant extends CardImpl {
private static final FilterSpell filter = new FilterSpell("an artifact, instant, or sorcery spell");
static {
filter.add(Predicates.or(
CardType.ARTIFACT.getPredicate(),
CardType.INSTANT.getPredicate(),
CardType.SORCERY.getPredicate()
));
}
public JinGitaxiasProgressTyrant(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{5}{U}{U}");
this.addSuperType(SuperType.LEGENDARY);
this.subtype.add(SubType.PHYREXIAN);
this.subtype.add(SubType.PRAETOR);
this.power = new MageInt(5);
this.toughness = new MageInt(5);
// Whenever you cast an artifact, instant, or sorcery spell, copy that spell. You may choose new targets for the copy. This ability triggers only once each turn.
this.addAbility(new SpellCastControllerTriggeredAbility(
new CopySourceSpellEffect().setText("copy that spell. You may choose new targets for the copy"),
filter, false, true
).setTriggersOnce(true));
// Whenever an opponent casts an artifact, instant, or sorcery spell, counter that spell. This ability triggers only once each turn.
this.addAbility(new SpellCastOpponentTriggeredAbility(
new JinGitaxiasProgressTyrantEffect(), filter, false
).setTriggersOnce(true));
}
private JinGitaxiasProgressTyrant(final JinGitaxiasProgressTyrant card) {
super(card);
}
@Override
public JinGitaxiasProgressTyrant copy() {
return new JinGitaxiasProgressTyrant(this);
}
}
class JinGitaxiasProgressTyrantEffect extends OneShotEffect {
JinGitaxiasProgressTyrantEffect() {
super(Outcome.Benefit);
staticText = "counter that spell";
}
private JinGitaxiasProgressTyrantEffect(final JinGitaxiasProgressTyrantEffect effect) {
super(effect);
}
@Override
public JinGitaxiasProgressTyrantEffect copy() {
return new JinGitaxiasProgressTyrantEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Spell spell = (Spell) getValue("spellCast");
if (spell != null) {
spell.counter(source, game);
}
return true;
}
}

View file

@ -143,6 +143,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Ironhoof Boar", 148, Rarity.COMMON, mage.cards.i.IronhoofBoar.class));
cards.add(new SetCardInfo("Island", 285, Rarity.LAND, mage.cards.basiclands.Island.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Isshin, Two Heavens as One", 224, Rarity.RARE, mage.cards.i.IsshinTwoHeavensAsOne.class));
cards.add(new SetCardInfo("Jin-Gitaxias, Progress Tyrant", 59, Rarity.MYTHIC, mage.cards.j.JinGitaxiasProgressTyrant.class));
cards.add(new SetCardInfo("Jugan Defends the Temple", 194, Rarity.MYTHIC, mage.cards.j.JuganDefendsTheTemple.class));
cards.add(new SetCardInfo("Jukai Naturalist", 225, Rarity.UNCOMMON, mage.cards.j.JukaiNaturalist.class));
cards.add(new SetCardInfo("Jukai Preserver", 195, Rarity.COMMON, mage.cards.j.JukaiPreserver.class));