[NEO] Implemented Fable of the Mirror Breaker / Reflection of Kiki-Jiki

This commit is contained in:
Evan Kranzler 2022-02-07 20:38:03 -05:00
parent e2ad74cb75
commit 76a1187c8e
5 changed files with 198 additions and 11 deletions

View file

@ -0,0 +1,52 @@
package mage.cards.f;
import mage.abilities.common.SagaAbility;
import mage.abilities.effects.common.CreateTokenEffect;
import mage.abilities.effects.common.ExileSagaAndReturnTransformedEffect;
import mage.abilities.effects.common.discard.DiscardAndDrawThatManyEffect;
import mage.abilities.keyword.TransformAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SagaChapter;
import mage.constants.SubType;
import mage.game.permanent.token.FableOfTheMirrorBreakerToken;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class FableOfTheMirrorBreaker extends CardImpl {
public FableOfTheMirrorBreaker(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{2}{R}");
this.subtype.add(SubType.SAGA);
this.secondSideCardClazz = mage.cards.r.ReflectionOfKikiJiki.class;
// (As this Saga enters and after your draw step, add a lore counter.)
SagaAbility sagaAbility = new SagaAbility(this);
// I Create a 2/2 red Goblin Shaman creature token with "Whenever this creature attacks, create a Treasure token."
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_I, new CreateTokenEffect(new FableOfTheMirrorBreakerToken()));
// II You may discard up to two cards. If you do, draw that many cards.
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_II, new DiscardAndDrawThatManyEffect(2));
// III Exile this Saga, then return it to the battlefield transformed under your control.
this.addAbility(new TransformAbility());
sagaAbility.addChapterEffect(this, SagaChapter.CHAPTER_III, new ExileSagaAndReturnTransformedEffect());
this.addAbility(sagaAbility);
}
private FableOfTheMirrorBreaker(final FableOfTheMirrorBreaker card) {
super(card);
}
@Override
public FableOfTheMirrorBreaker copy() {
return new FableOfTheMirrorBreaker(this);
}
}

View file

@ -0,0 +1,91 @@
package mage.cards.r;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.SimpleActivatedAbility;
import mage.abilities.costs.common.TapSourceCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.CreateTokenCopyTargetEffect;
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.FilterPermanent;
import mage.filter.common.FilterControlledCreaturePermanent;
import mage.filter.predicate.Predicates;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.game.Game;
import mage.target.TargetPermanent;
import mage.target.targetpointer.FixedTarget;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ReflectionOfKikiJiki extends CardImpl {
private static final FilterPermanent filter
= new FilterControlledCreaturePermanent("another nonlegendary creature you control");
static {
filter.add(AnotherPredicate.instance);
filter.add(Predicates.not(SuperType.LEGENDARY.getPredicate()));
}
public ReflectionOfKikiJiki(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT, CardType.CREATURE}, "");
this.subtype.add(SubType.GOBLIN);
this.subtype.add(SubType.SHAMAN);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
this.color.setRed(true);
this.nightCard = true;
// {1}, {T}: Create a token that's a copy of another target nonlegendary creature you control, except it has haste. Sacrifice it at the beginning of the next end step.
Ability ability = new SimpleActivatedAbility(new ReflectionOfKikiJikiEffect(), new GenericManaCost(1));
ability.addCost(new TapSourceCost());
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private ReflectionOfKikiJiki(final ReflectionOfKikiJiki card) {
super(card);
}
@Override
public ReflectionOfKikiJiki copy() {
return new ReflectionOfKikiJiki(this);
}
}
class ReflectionOfKikiJikiEffect extends OneShotEffect {
ReflectionOfKikiJikiEffect() {
super(Outcome.Benefit);
staticText = "create a token that's a copy of another target nonlegendary creature you control, " +
"except it has haste. Sacrifice it at the beginning of the next end step";
}
private ReflectionOfKikiJikiEffect(final ReflectionOfKikiJikiEffect effect) {
super(effect);
}
@Override
public ReflectionOfKikiJikiEffect copy() {
return new ReflectionOfKikiJikiEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
CreateTokenCopyTargetEffect effect = new CreateTokenCopyTargetEffect(null, null, true);
effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
effect.apply(game, source);
effect.sacrificeTokensCreatedAtEndOfCombat(game, source);
return true;
}
}

View file

@ -91,6 +91,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Experimental Synthesizer", 138, Rarity.COMMON, mage.cards.e.ExperimentalSynthesizer.class));
cards.add(new SetCardInfo("Explosive Entry", 139, Rarity.COMMON, mage.cards.e.ExplosiveEntry.class));
cards.add(new SetCardInfo("Explosive Singularity", 140, Rarity.MYTHIC, mage.cards.e.ExplosiveSingularity.class));
cards.add(new SetCardInfo("Fable of the Mirror-Breaker", 141, Rarity.RARE, mage.cards.f.FableOfTheMirrorBreaker.class));
cards.add(new SetCardInfo("Fade into Antiquity", 182, Rarity.COMMON, mage.cards.f.FadeIntoAntiquity.class));
cards.add(new SetCardInfo("Fang of Shigeki", 183, Rarity.COMMON, mage.cards.f.FangOfShigeki.class));
cards.add(new SetCardInfo("Farewell", 13, Rarity.RARE, mage.cards.f.Farewell.class));
@ -222,6 +223,7 @@ public final class KamigawaNeonDynasty extends ExpansionSet {
cards.add(new SetCardInfo("Reckoner Bankbuster", 255, Rarity.RARE, mage.cards.r.ReckonerBankbuster.class));
cards.add(new SetCardInfo("Reckoner Shakedown", 119, Rarity.COMMON, mage.cards.r.ReckonerShakedown.class));
cards.add(new SetCardInfo("Reckoner's Bargain", 120, Rarity.COMMON, mage.cards.r.ReckonersBargain.class));
cards.add(new SetCardInfo("Reflection of Kiki-Jiki", 141, Rarity.RARE, mage.cards.r.ReflectionOfKikiJiki.class));
cards.add(new SetCardInfo("Regent's Authority", 32, Rarity.COMMON, mage.cards.r.RegentsAuthority.class));
cards.add(new SetCardInfo("Reinforced Ronin", 158, Rarity.UNCOMMON, mage.cards.r.ReinforcedRonin.class));
cards.add(new SetCardInfo("Reito Sentinel", 256, Rarity.UNCOMMON, mage.cards.r.ReitoSentinel.class));