mirror of
https://github.com/correl/mage.git
synced 2024-12-25 11:11:16 +00:00
Implemented Startling Development
This commit is contained in:
parent
193033ad6f
commit
f3ea9c15cf
3 changed files with 56 additions and 1 deletions
45
Mage.Sets/src/mage/cards/s/StartlingDevelopment.java
Normal file
45
Mage.Sets/src/mage/cards/s/StartlingDevelopment.java
Normal 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);
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
|
|
|
@ -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) {
|
||||
|
@ -41,7 +42,7 @@ public class BecomesCreatureTargetEffect extends ContinuousEffectImpl {
|
|||
* @param duration
|
||||
*/
|
||||
public BecomesCreatureTargetEffect(Token token, boolean loseAllAbilities, boolean stillALand, Duration duration, boolean loseName,
|
||||
boolean keepAbilities) {
|
||||
boolean keepAbilities) {
|
||||
super(duration, Outcome.BecomeCreature);
|
||||
this.token = token;
|
||||
this.loseAllAbilities = loseAllAbilities;
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue