1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-14 09:09:38 -09:00

[STX] Implemented Mercurial Transformation

This commit is contained in:
Evan Kranzler 2021-04-06 20:54:28 -04:00
parent 3cc92d6c3e
commit c307d6ee3d
2 changed files with 84 additions and 0 deletions

View file

@ -0,0 +1,83 @@
package mage.cards.m;
import mage.abilities.Ability;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.constants.Outcome;
import mage.constants.SubType;
import mage.game.Game;
import mage.game.permanent.token.Token;
import mage.game.permanent.token.custom.CreatureToken;
import mage.players.Player;
import mage.target.common.TargetNonlandPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class MercurialTransformation extends CardImpl {
public MercurialTransformation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{1}{U}");
this.subtype.add(SubType.LESSON);
// Until end of turn, target nonland permanent loses all abilities and becomes your choice of a blue Frog creature with base power and toughness 1/1 or a blue Octopus creature with base power and toughness 4/4.
this.getSpellAbility().addEffect(new MercurialTransformationEffect());
this.getSpellAbility().addTarget(new TargetNonlandPermanent());
}
private MercurialTransformation(final MercurialTransformation card) {
super(card);
}
@Override
public MercurialTransformation copy() {
return new MercurialTransformation(this);
}
}
class MercurialTransformationEffect extends OneShotEffect {
MercurialTransformationEffect() {
super(Outcome.Benefit);
staticText = "until end of turn, target nonland permanent loses all abilities and " +
"becomes your choice of a blue Frog creature with base power and toughness 1/1 " +
"or a blue Octopus creature with base power and toughness 4/4";
}
private MercurialTransformationEffect(final MercurialTransformationEffect effect) {
super(effect);
}
@Override
public MercurialTransformationEffect copy() {
return new MercurialTransformationEffect(this);
}
@Override
public boolean apply(Game game, Ability source) {
Player player = game.getPlayer(source.getControllerId());
if (player == null) {
return false;
}
Token token;
if (player.chooseUse(
outcome, "1/1 Frog or 4/4 Octopus?",
null, "Frog", "Octopus", source, game
)) {
token = new CreatureToken(1, 1).withColor("U").withSubType(SubType.FROG);
} else {
token = new CreatureToken(4, 4).withColor("U").withSubType(SubType.OCTOPUS);
}
game.addEffect(new BecomesCreatureTargetEffect(
token, true, false, Duration.EndOfTurn
), source);
return true;
}
}

View file

@ -148,6 +148,7 @@ public final class StrixhavenSchoolOfMages extends ExpansionSet {
cards.add(new SetCardInfo("Mascot Interception", 110, Rarity.UNCOMMON, mage.cards.m.MascotInterception.class));
cards.add(new SetCardInfo("Master Symmetrist", 138, Rarity.UNCOMMON, mage.cards.m.MasterSymmetrist.class));
cards.add(new SetCardInfo("Mentor's Guidance", 46, Rarity.UNCOMMON, mage.cards.m.MentorsGuidance.class));
cards.add(new SetCardInfo("Mercurial Transformation", 47, Rarity.UNCOMMON, mage.cards.m.MercurialTransformation.class));
cards.add(new SetCardInfo("Moldering Karok", 206, Rarity.COMMON, mage.cards.m.MolderingKarok.class));
cards.add(new SetCardInfo("Mortality Spear", 207, Rarity.UNCOMMON, mage.cards.m.MortalitySpear.class));
cards.add(new SetCardInfo("Mountain", 372, Rarity.LAND, mage.cards.basiclands.Mountain.class, NON_FULL_USE_VARIOUS));