forked from External/mage
[ZNR] Implemented Inscription of Insight
This commit is contained in:
parent
ea137de0f5
commit
ed65b8dea8
3 changed files with 119 additions and 0 deletions
90
Mage.Sets/src/mage/cards/i/InscriptionOfInsight.java
Normal file
90
Mage.Sets/src/mage/cards/i/InscriptionOfInsight.java
Normal file
|
|
@ -0,0 +1,90 @@
|
|||
package mage.cards.i;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.abilities.Mode;
|
||||
import mage.abilities.costs.mana.ManaCostsImpl;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
|
||||
import mage.abilities.effects.common.ReturnToHandTargetEffect;
|
||||
import mage.abilities.effects.keyword.ScryEffect;
|
||||
import mage.abilities.keyword.KickerAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.token.InscriptionOfInsightToken;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetPlayer;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class InscriptionOfInsight extends CardImpl {
|
||||
|
||||
public InscriptionOfInsight(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{U}");
|
||||
|
||||
// Kicker {2}{U}{U}
|
||||
this.addAbility(new KickerAbility(new ManaCostsImpl<>("{2}{U}{U}")));
|
||||
|
||||
// Choose one. If this spell was kicked, choose any number instead.
|
||||
this.getSpellAbility().getModes().setAllWhenKicked(true);
|
||||
|
||||
// • Return up to two target creatures to their owners' hands.
|
||||
this.getSpellAbility().addEffect(new ReturnToHandTargetEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
|
||||
|
||||
// • Scry 2, then draw two cards.
|
||||
Mode mode = new Mode(new ScryEffect(2));
|
||||
mode.addEffect(new DrawCardSourceControllerEffect(2).concatBy(", then"));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// • Target player creates an X/X blue Illusion creature token, where X is the number of cards in their hand.
|
||||
mode = new Mode(new InscriptionOfInsightEffect());
|
||||
mode.addTarget(new TargetPlayer());
|
||||
this.getSpellAbility().addMode(mode);
|
||||
}
|
||||
|
||||
private InscriptionOfInsight(final InscriptionOfInsight card) {
|
||||
super(card);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InscriptionOfInsight copy() {
|
||||
return new InscriptionOfInsight(this);
|
||||
}
|
||||
}
|
||||
|
||||
class InscriptionOfInsightEffect extends OneShotEffect {
|
||||
|
||||
InscriptionOfInsightEffect() {
|
||||
super(Outcome.Benefit);
|
||||
staticText = "Target player creates an X/X blue Illusion creature token, " +
|
||||
"where X is the number of cards in their hand.";
|
||||
}
|
||||
|
||||
private InscriptionOfInsightEffect(final InscriptionOfInsightEffect effect) {
|
||||
super(effect);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InscriptionOfInsightEffect copy() {
|
||||
return new InscriptionOfInsightEffect(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player player = game.getPlayer(source.getFirstTarget());
|
||||
if (player == null) {
|
||||
return false;
|
||||
}
|
||||
int cardsInHand = player.getHand().size();
|
||||
return new InscriptionOfInsightToken(player.getHand().size()).putOntoBattlefield(
|
||||
1, game, source.getSourceId(), source.getFirstTarget()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -165,6 +165,7 @@ public final class ZendikarRising extends ExpansionSet {
|
|||
cards.add(new SetCardInfo("Highborn Vampire", 107, Rarity.COMMON, mage.cards.h.HighbornVampire.class));
|
||||
cards.add(new SetCardInfo("Inordinate Rage", 144, Rarity.COMMON, mage.cards.i.InordinateRage.class));
|
||||
cards.add(new SetCardInfo("Inscription of Abundance", 186, Rarity.RARE, mage.cards.i.InscriptionOfAbundance.class));
|
||||
cards.add(new SetCardInfo("Inscription of Insight", 61, Rarity.RARE, mage.cards.i.InscriptionOfInsight.class));
|
||||
cards.add(new SetCardInfo("Inscription of Ruin", 108, Rarity.RARE, mage.cards.i.InscriptionOfRuin.class));
|
||||
cards.add(new SetCardInfo("Into the Roil", 62, Rarity.COMMON, mage.cards.i.IntoTheRoil.class));
|
||||
cards.add(new SetCardInfo("Iridescent Hornbeetle", 187, Rarity.UNCOMMON, mage.cards.i.IridescentHornbeetle.class));
|
||||
|
|
|
|||
|
|
@ -0,0 +1,28 @@
|
|||
package mage.game.permanent.token;
|
||||
|
||||
import mage.MageInt;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
|
||||
/**
|
||||
* @author TheElk801
|
||||
*/
|
||||
public final class InscriptionOfInsightToken extends TokenImpl {
|
||||
|
||||
public InscriptionOfInsightToken(int xValue) {
|
||||
super("Illusion", "X/X blue Illusion creature token");
|
||||
cardType.add(CardType.CREATURE);
|
||||
color.setBlue(true);
|
||||
subtype.add(SubType.ILLUSION);
|
||||
power = new MageInt(xValue);
|
||||
toughness = new MageInt(xValue);
|
||||
}
|
||||
|
||||
public InscriptionOfInsightToken(final InscriptionOfInsightToken token) {
|
||||
super(token);
|
||||
}
|
||||
|
||||
public InscriptionOfInsightToken copy() {
|
||||
return new InscriptionOfInsightToken(this);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue