[ACR] Implement Templar Knight

This commit is contained in:
theelk801 2024-06-19 15:46:24 -04:00
parent 94b6f71eac
commit 9d57cee7c4
3 changed files with 80 additions and 0 deletions

View file

@ -0,0 +1,77 @@
package mage.cards.t;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.common.SimpleStaticAbility;
import mage.abilities.costs.common.TapTargetCost;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.InfoEffect;
import mage.abilities.effects.common.search.SearchLibraryPutInPlayEffect;
import mage.abilities.keyword.VigilanceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.constants.SuperType;
import mage.filter.FilterCard;
import mage.filter.common.FilterArtifactCard;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.mageobject.NamePredicate;
import mage.filter.predicate.permanent.AttackingPredicate;
import mage.filter.predicate.permanent.TappedPredicate;
import mage.target.common.TargetCardInLibrary;
import mage.target.common.TargetControlledPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class TemplarKnight extends CardImpl {
private static final FilterCard filter = new FilterArtifactCard("a legendary artifact card");
private static final FilterControlledPermanent filter2
= new FilterControlledCreaturePermanent("untapped attacking creatures you control named Templar Knight");
static {
filter.add(SuperType.LEGENDARY.getPredicate());
filter2.add(TappedPredicate.UNTAPPED);
filter2.add(AttackingPredicate.instance);
filter2.add(new NamePredicate("Templar Knight"));
}
public TemplarKnight(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{1}{W}");
this.subtype.add(SubType.HUMAN);
this.subtype.add(SubType.KNIGHT);
this.power = new MageInt(3);
this.toughness = new MageInt(1);
// Vigilance
this.addAbility(VigilanceAbility.getInstance());
// {W}, Tap five untapped attacking creatures you control named Templar Knight: Search your library for a legendary artifact card, put it onto the battlefield, then shuffle.
Ability ability = new SimpleActivatedAbility(
new SearchLibraryPutInPlayEffect(new TargetCardInLibrary(filter)), new ManaCostsImpl<>("{W}")
);
ability.addCost(new TapTargetCost(new TargetControlledPermanent(5, filter2)));
this.addAbility(ability);
// A deck can have any number of cards named Templar Knight.
this.addAbility(new SimpleStaticAbility(new InfoEffect(
"a deck can have any number of cards named Templar Knight"
)));
}
private TemplarKnight(final TemplarKnight card) {
super(card);
}
@Override
public TemplarKnight copy() {
return new TemplarKnight(this);
}
}

View file

@ -49,6 +49,7 @@ public final class AssassinsCreed extends ExpansionSet {
cards.add(new SetCardInfo("Surtr, Fiery Jotun", 293, Rarity.RARE, mage.cards.s.SurtrFieryJotun.class)); cards.add(new SetCardInfo("Surtr, Fiery Jotun", 293, Rarity.RARE, mage.cards.s.SurtrFieryJotun.class));
cards.add(new SetCardInfo("Sword of Feast and Famine", 99, Rarity.MYTHIC, mage.cards.s.SwordOfFeastAndFamine.class)); cards.add(new SetCardInfo("Sword of Feast and Famine", 99, Rarity.MYTHIC, mage.cards.s.SwordOfFeastAndFamine.class));
cards.add(new SetCardInfo("Sword of Light and Shadow", 100, Rarity.MYTHIC, mage.cards.s.SwordOfLightAndShadow.class)); cards.add(new SetCardInfo("Sword of Light and Shadow", 100, Rarity.MYTHIC, mage.cards.s.SwordOfLightAndShadow.class));
cards.add(new SetCardInfo("Templar Knight", 10, Rarity.UNCOMMON, mage.cards.t.TemplarKnight.class));
cards.add(new SetCardInfo("Temporal Trespass", 86, Rarity.MYTHIC, mage.cards.t.TemporalTrespass.class)); cards.add(new SetCardInfo("Temporal Trespass", 86, Rarity.MYTHIC, mage.cards.t.TemporalTrespass.class));
cards.add(new SetCardInfo("The Animus", 69, Rarity.RARE, mage.cards.t.TheAnimus.class)); cards.add(new SetCardInfo("The Animus", 69, Rarity.RARE, mage.cards.t.TheAnimus.class));
cards.add(new SetCardInfo("The Spear of Leonidas", 38, Rarity.RARE, mage.cards.t.TheSpearOfLeonidas.class)); cards.add(new SetCardInfo("The Spear of Leonidas", 38, Rarity.RARE, mage.cards.t.TheSpearOfLeonidas.class));

View file

@ -30,6 +30,7 @@ public abstract class DeckValidator implements Serializable {
)); ));
public static final HashSet<String> ALL_BASIC_LAND_NAMES = new HashSet<>(); public static final HashSet<String> ALL_BASIC_LAND_NAMES = new HashSet<>();
{ {
ALL_BASIC_LAND_NAMES.addAll(MAIN_BASIC_LAND_NAMES); ALL_BASIC_LAND_NAMES.addAll(MAIN_BASIC_LAND_NAMES);
ALL_BASIC_LAND_NAMES.addAll(ADDITIONAL_BASIC_LAND_NAMES); ALL_BASIC_LAND_NAMES.addAll(ADDITIONAL_BASIC_LAND_NAMES);
@ -46,6 +47,7 @@ public abstract class DeckValidator implements Serializable {
maxCopiesMap.put("Persistent Petitioners", Integer.MAX_VALUE); maxCopiesMap.put("Persistent Petitioners", Integer.MAX_VALUE);
maxCopiesMap.put("Dragon's Approach", Integer.MAX_VALUE); maxCopiesMap.put("Dragon's Approach", Integer.MAX_VALUE);
maxCopiesMap.put("Slime Against Humanity", Integer.MAX_VALUE); maxCopiesMap.put("Slime Against Humanity", Integer.MAX_VALUE);
maxCopiesMap.put("Templar Knight", Integer.MAX_VALUE);
maxCopiesMap.put("Once More with Feeling", 1); maxCopiesMap.put("Once More with Feeling", 1);
maxCopiesMap.put("Seven Dwarves", 7); maxCopiesMap.put("Seven Dwarves", 7);
maxCopiesMap.put("Nazgul", 9); maxCopiesMap.put("Nazgul", 9);