mirror of
https://github.com/magefree/mage.git
synced 2025-12-23 20:11:59 -08:00
[WOE] Implement Twining Twins (#10979)
* [WOE] Implement Twinning Twins * One less n in Twining --------- Co-authored-by: Evan Kranzler <theelk801@gmail.com>
This commit is contained in:
parent
a854cf0c71
commit
bc4a3d96ec
2 changed files with 98 additions and 0 deletions
97
Mage.Sets/src/mage/cards/t/TwiningTwins.java
Normal file
97
Mage.Sets/src/mage/cards/t/TwiningTwins.java
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
package mage.cards.t;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||
import mage.abilities.costs.mana.GenericManaCost;
|
||||
import mage.abilities.effects.Effect;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.ReturnToBattlefieldUnderOwnerControlTargetEffect;
|
||||
import mage.abilities.keyword.FlyingAbility;
|
||||
import mage.abilities.keyword.VigilanceAbility;
|
||||
import mage.abilities.keyword.WardAbility;
|
||||
import mage.cards.AdventureCard;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author Susucr
|
||||
*/
|
||||
public final class TwiningTwins extends AdventureCard {
|
||||
|
||||
public TwiningTwins(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, new CardType[]{CardType.INSTANT}, "{2}{U}{U}", "Swift Spiral", "{1}{W}");
|
||||
|
||||
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());
|
||||
|
||||
// Vigilance
|
||||
this.addAbility(VigilanceAbility.getInstance());
|
||||
|
||||
// Ward {1}
|
||||
this.addAbility(new WardAbility(new GenericManaCost(1), false));
|
||||
|
||||
// Swift Spiral
|
||||
// Exile target nontoken creature. Return it to the battlefield under its owner’s control at the beginning of the next end step.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new TwiningTwinsEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanent(StaticFilters.FILTER_CREATURE_NON_TOKEN));
|
||||
}
|
||||
|
||||
private TwiningTwins(final TwiningTwins card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwiningTwins copy() {
|
||||
return new TwiningTwins(this);
|
||||
}
|
||||
}
|
||||
|
||||
class TwiningTwinsEffect extends OneShotEffect {
|
||||
|
||||
TwiningTwinsEffect() {
|
||||
super(Outcome.Detriment);
|
||||
staticText = "Exile target nontoken creature. Return that card to the battlefield under its "
|
||||
+ "owner's control at the beginning of the next end step";
|
||||
}
|
||||
|
||||
private TwiningTwinsEffect(final TwiningTwinsEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getControllerId());
|
||||
Permanent permanent = game.getPermanent(source.getFirstTarget());
|
||||
if (player == null || permanent == null) {
|
||||
return false;
|
||||
}
|
||||
player.moveCardsToExile(permanent, source, game, true, CardUtil.getExileZoneId(game, source), CardUtil.getSourceName(game, source));
|
||||
Effect effect = new ReturnToBattlefieldUnderOwnerControlTargetEffect(false, false);
|
||||
effect.setText("Return the exiled card to the battlefield under its owner's control");
|
||||
effect.setTargetPointer(new FixedTarget(source.getFirstTarget(), game));
|
||||
game.addDelayedTriggeredAbility(new AtTheBeginOfNextEndStepDelayedTriggeredAbility(effect), source);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public TwiningTwinsEffect copy() {
|
||||
return new TwiningTwinsEffect(this);
|
||||
}
|
||||
}
|
||||
|
|
@ -253,6 +253,7 @@ public final class WildsOfEldraine extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Tough Cookie", 193, Rarity.UNCOMMON, mage.cards.t.ToughCookie.class));
|
||||
cards.add(new SetCardInfo("Troublemaker Ouphe", 194, Rarity.COMMON, mage.cards.t.TroublemakerOuphe.class));
|
||||
cards.add(new SetCardInfo("Troyan, Gutsy Explorer", 217, Rarity.UNCOMMON, mage.cards.t.TroyanGutsyExplorer.class));
|
||||
cards.add(new SetCardInfo("Twining Twins", 240, Rarity.RARE, mage.cards.t.TwiningTwins.class));
|
||||
cards.add(new SetCardInfo("Tuinvale Guide", 36, Rarity.COMMON, mage.cards.t.TuinvaleGuide.class));
|
||||
cards.add(new SetCardInfo("Twisted Fealty", 154, Rarity.UNCOMMON, mage.cards.t.TwistedFealty.class));
|
||||
cards.add(new SetCardInfo("Twisted Sewer-Witch", 114, Rarity.UNCOMMON, mage.cards.t.TwistedSewerWitch.class));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue