Implemented Phantasmal Form

This commit is contained in:
Evan Kranzler 2019-06-02 16:09:32 -04:00
parent 8fe25e62ae
commit e7eda47d68
2 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,69 @@
package mage.cards.p;
import mage.MageInt;
import mage.abilities.effects.common.DrawCardSourceControllerEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.abilities.keyword.FlyingAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.SubType;
import mage.game.permanent.token.TokenImpl;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class PhantasmalForm extends CardImpl {
public PhantasmalForm(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{U}");
// Until end of turn, up to two target creatures each have base power and toughness 3/3, gain flying, and become blue Illusions in addition to their other colors and types.
this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(
new PhantasmalFormToken(), false, false, Duration.EndOfTurn
).setText("Until end of turn, up to two target creatures each have base power and toughness 3/3, " +
"gain flying, and become blue Illusions in addition to their other colors and types.")
);
this.getSpellAbility().addTarget(new TargetCreaturePermanent(0, 2));
// Draw a card.
this.getSpellAbility().addEffect(
new DrawCardSourceControllerEffect(1).setText("<br>Draw a card.")
);
}
private PhantasmalForm(final PhantasmalForm card) {
super(card);
}
@Override
public PhantasmalForm copy() {
return new PhantasmalForm(this);
}
}
class PhantasmalFormToken extends TokenImpl {
PhantasmalFormToken() {
super("", "");
cardType.add(CardType.CREATURE);
subtype.add(SubType.ILLUSION);
color.setBlue(true);
power = new MageInt(3);
toughness = new MageInt(3);
addAbility(FlyingAbility.getInstance());
}
private PhantasmalFormToken(final PhantasmalFormToken token) {
super(token);
}
public PhantasmalFormToken copy() {
return new PhantasmalFormToken(this);
}
}

View file

@ -163,6 +163,7 @@ public final class ModernHorizons extends ExpansionSet {
cards.add(new SetCardInfo("Orcish Hellraiser", 136, Rarity.COMMON, mage.cards.o.OrcishHellraiser.class));
cards.add(new SetCardInfo("Ore-Scale Guardian", 137, Rarity.UNCOMMON, mage.cards.o.OreScaleGuardian.class));
cards.add(new SetCardInfo("Pashalik Mons", 138, Rarity.RARE, mage.cards.p.PashalikMons.class));
cards.add(new SetCardInfo("Phantasmal Form", 61, Rarity.COMMON, mage.cards.p.PhantasmalForm.class));
cards.add(new SetCardInfo("Phantom Ninja", 62, Rarity.COMMON, mage.cards.p.PhantomNinja.class));
cards.add(new SetCardInfo("Pillage", 139, Rarity.UNCOMMON, mage.cards.p.Pillage.class));
cards.add(new SetCardInfo("Plague Engineer", 100, Rarity.RARE, mage.cards.p.PlagueEngineer.class));