Implemented Startling Development

This commit is contained in:
Evan Kranzler 2020-04-12 20:24:30 -04:00
parent 193033ad6f
commit f3ea9c15cf
3 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,45 @@
package mage.cards.s;
import mage.abilities.costs.mana.ManaCostsImpl;
import mage.abilities.effects.common.continuous.BecomesCreatureTargetEffect;
import mage.abilities.keyword.CyclingAbility;
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.custom.CreatureToken;
import mage.target.common.TargetCreaturePermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class StartlingDevelopment extends CardImpl {
public StartlingDevelopment(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{U}");
// Until end of turn, target creature becomes a blue Serpent with base power and toughness 4/4.
this.getSpellAbility().addEffect(new BecomesCreatureTargetEffect(
new CreatureToken(
4, 4, "blue Serpent with base power and toughness 4/4"
).withColor("U").withSubType(SubType.SERPENT),
false, false, Duration.EndOfTurn
).setRemoveSubtypes(true));
this.getSpellAbility().addTarget(new TargetCreaturePermanent());
// Cycling {1}
this.addAbility(new CyclingAbility(new ManaCostsImpl("{1}")));
}
private StartlingDevelopment(final StartlingDevelopment card) {
super(card);
}
@Override
public StartlingDevelopment copy() {
return new StartlingDevelopment(this);
}
}

View file

@ -275,6 +275,7 @@ public final class IkoriaLairOfBehemoths extends ExpansionSet {
cards.add(new SetCardInfo("Spontaneous Flight", 33, Rarity.COMMON, mage.cards.s.SpontaneousFlight.class));
cards.add(new SetCardInfo("Springjaw Trap", 241, Rarity.COMMON, mage.cards.s.SpringjawTrap.class));
cards.add(new SetCardInfo("Sprite Dragon", 211, Rarity.UNCOMMON, mage.cards.s.SpriteDragon.class));
cards.add(new SetCardInfo("Startling Development", 68, Rarity.COMMON, mage.cards.s.StartlingDevelopment.class));
cards.add(new SetCardInfo("Sudden Spinnerets", 171, Rarity.COMMON, mage.cards.s.SuddenSpinnerets.class));
cards.add(new SetCardInfo("Suffocating Fumes", 100, Rarity.COMMON, mage.cards.s.SuffocatingFumes.class));
cards.add(new SetCardInfo("Survivors' Bond", 172, Rarity.COMMON, mage.cards.s.SurvivorsBond.class));

View file

@ -22,6 +22,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
protected boolean addStillALandText;
protected boolean loseName;
protected boolean keepAbilities;
protected boolean removeSubtypes = false;
public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration) {
@ -86,6 +87,9 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
permanent.getCardType().clear(); // remove all CardTypes
permanent.getSubtype(game).addAll(token.getSubtype(game));
} else {
if (removeSubtypes) {
permanent.getSubtype(game).clear();
}
for (SubType t : token.getSubtype(game)) {
if (!permanent.hasSubtype(t, game)) {
permanent.getSubtype(game).add(t);
@ -149,6 +153,11 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
return result;
}
public BecomesCreatureTargetEffect setRemoveSubtypes(boolean removeSubtypes) {
this.removeSubtypes = removeSubtypes;
return this;
}
@Override
public boolean apply(Game game, Ability source) {
return false;