[WOC] Implement Archmage of Echoes (#11017)

This commit is contained in:
Vivian Greenslade 2023-08-26 18:16:15 -02:30 committed by GitHub
parent cde60d38d8
commit 6852786a10
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 90 additions and 0 deletions

View file

@ -0,0 +1,59 @@
package mage.cards.a;
import java.util.UUID;
import mage.MageInt;
import mage.constants.SubType;
import mage.filter.FilterSpell;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.PermanentPredicate;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.common.SpellCastControllerTriggeredAbility;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.CopySourceSpellEffect;
import mage.abilities.effects.common.CopyTargetSpellEffect;
import mage.abilities.keyword.WardAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SetTargetPointer;
/**
*
* @author Xanderhall
*/
public final class ArchmageOfEchoes extends CardImpl {
private static FilterSpell filter = new FilterSpell("Faerie or Wizard permanent spell");
static {
filter.add(PermanentPredicate.instance);
filter.add(Predicates.or(SubType.FAERIE.getPredicate(), SubType.WIZARD.getPredicate()));
}
public ArchmageOfEchoes(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{U}");
this.subtype.add(SubType.FAERIE);
this.subtype.add(SubType.WIZARD);
this.power = new MageInt(4);
this.toughness = new MageInt(4);
// Flying
this.addAbility(FlyingAbility.getInstance());
// Ward {2}
this.addAbility(new WardAbility(new ManaCostsImpl<>("{2}")));
// Whenever you cast a Faerie or Wizard permanent spell, copy it.
this.addAbility(new SpellCastControllerTriggeredAbility(new CopyTargetSpellEffect(), filter, false, SetTargetPointer.SPELL));
}
private ArchmageOfEchoes(final ArchmageOfEchoes card) {
super(card);
}
@Override
public ArchmageOfEchoes copy() {
return new ArchmageOfEchoes(this);
}
}

View file

@ -24,6 +24,7 @@ public final class WildsOfEldraineCommander extends ExpansionSet {
cards.add(new SetCardInfo("Angelic Destiny", 60, Rarity.MYTHIC, mage.cards.a.AngelicDestiny.class));
cards.add(new SetCardInfo("Arcane Denial", 84, Rarity.COMMON, mage.cards.a.ArcaneDenial.class));
cards.add(new SetCardInfo("Arcane Signet", 367, Rarity.COMMON, mage.cards.a.ArcaneSignet.class));
cards.add(new SetCardInfo("Archmage of Echoes", 9, Rarity.RARE, mage.cards.a.ArchmageOfEchoes.class));
cards.add(new SetCardInfo("Archon of Sun's Grace", 61, Rarity.RARE, mage.cards.a.ArchonOfSunsGrace.class));
cards.add(new SetCardInfo("Aura Gnarlid", 120, Rarity.COMMON, mage.cards.a.AuraGnarlid.class));
cards.add(new SetCardInfo("Austere Command", 62, Rarity.RARE, mage.cards.a.AustereCommand.class));

View file

@ -0,0 +1,30 @@
package org.mage.test.cards.single.woc;
import org.junit.Test;
import org.mage.test.serverside.base.CardTestPlayerBase;
import mage.constants.PhaseStep;
import mage.constants.Zone;
public class ArchmageOfEchoesTest extends CardTestPlayerBase {
private static String ARCHMAGE = "Archmage of Echoes";
private static String FAERIE = "Faerie Miscreant";
// Whenever you cast a Faerie or Wizard permanent spell, copy it.
@Test
public void testCopy() {
addCard(Zone.BATTLEFIELD, playerA, ARCHMAGE);
addCard(Zone.BATTLEFIELD, playerA, "Island", 1);
addCard(Zone.HAND, playerA, FAERIE);
castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, FAERIE);
setStopAt(1, PhaseStep.END_TURN);
setStrictChooseMode(true);
execute();
assertPermanentCount(playerA, FAERIE, 2);
}
}