diff --git a/Mage.Sets/src/mage/cards/c/ChromiumTheMutable.java b/Mage.Sets/src/mage/cards/c/ChromiumTheMutable.java new file mode 100644 index 00000000000..4ec39507c56 --- /dev/null +++ b/Mage.Sets/src/mage/cards/c/ChromiumTheMutable.java @@ -0,0 +1,92 @@ +package mage.cards.c; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.CantBeCounteredAbility; +import mage.abilities.common.SimpleActivatedAbility; +import mage.abilities.costs.common.DiscardCardCost; +import mage.abilities.effects.common.combat.CantBeBlockedSourceEffect; +import mage.abilities.effects.common.continuous.BecomesCreatureSourceEffect; +import mage.constants.SubType; +import mage.constants.SuperType; +import mage.abilities.keyword.FlashAbility; +import mage.abilities.keyword.FlyingAbility; +import mage.abilities.keyword.HexproofAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.Duration; +import mage.game.permanent.token.TokenImpl; + +/** + * + * @author TheElk801 + */ +public final class ChromiumTheMutable extends CardImpl { + + public ChromiumTheMutable(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{W}{U}{B}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.ELDER); + this.subtype.add(SubType.DRAGON); + this.power = new MageInt(7); + this.toughness = new MageInt(7); + + // Flash + this.addAbility(FlashAbility.getInstance()); + + // This spell can't be countered. + this.addAbility(new CantBeCounteredAbility()); + + // Flying + this.addAbility(FlyingAbility.getInstance()); + + // Discard a card: Until end of turn, Chromium, the Mutable becomes a Human with base power and toughness 1/1, loses all abilities, and gains hexproof. It can't be blocked this turn. + Ability ability = new SimpleActivatedAbility( + new BecomesCreatureSourceEffect( + new ChromiumTheMutableToken(), null, Duration.EndOfTurn, + false, false, null, null, true + ).setText("Until end of turn, {this} becomes " + + "a Human with base power and toughness 1/1, " + + "loses all abilities, and gains hexproof."), + new DiscardCardCost() + ); + ability.addEffect( + new CantBeBlockedSourceEffect(Duration.EndOfTurn) + .setText("It can't be blocked this turn.") + ); + this.addAbility(ability); + } + + public ChromiumTheMutable(final ChromiumTheMutable card) { + super(card); + } + + @Override + public ChromiumTheMutable copy() { + return new ChromiumTheMutable(this); + } +} + +class ChromiumTheMutableToken extends TokenImpl { + + public ChromiumTheMutableToken() { + super("", "Human with base power and toughness 1/1, loses all abilities, and gains hexproof"); + cardType.add(CardType.CREATURE); + subtype.add(SubType.HUMAN); + power = new MageInt(1); + toughness = new MageInt(1); + + addAbility(HexproofAbility.getInstance()); + } + + public ChromiumTheMutableToken(final ChromiumTheMutableToken token) { + super(token); + } + + public ChromiumTheMutableToken copy() { + return new ChromiumTheMutableToken(this); + } +} diff --git a/Mage.Sets/src/mage/sets/CoreSet2019.java b/Mage.Sets/src/mage/sets/CoreSet2019.java index be39ebd88f1..ce4daf0ec4e 100644 --- a/Mage.Sets/src/mage/sets/CoreSet2019.java +++ b/Mage.Sets/src/mage/sets/CoreSet2019.java @@ -53,6 +53,7 @@ public final class CoreSet2019 extends ExpansionSet { cards.add(new SetCardInfo("Cavalry Drillmaster", 8, Rarity.COMMON, mage.cards.c.CavalryDrillmaster.class)); cards.add(new SetCardInfo("Centaur Courser", 171, Rarity.COMMON, mage.cards.c.CentaurCourser.class)); cards.add(new SetCardInfo("Child of Night", 89, Rarity.COMMON, mage.cards.c.ChildOfNight.class)); + cards.add(new SetCardInfo("Chromium, the Mutable", 214, Rarity.MYTHIC, mage.cards.c.ChromiumTheMutable.class)); cards.add(new SetCardInfo("Colossal Dreadmaw", 172, Rarity.COMMON, mage.cards.c.ColossalDreadmaw.class)); cards.add(new SetCardInfo("Colossal Majesty", 173, Rarity.UNCOMMON, mage.cards.c.ColossalMajesty.class)); cards.add(new SetCardInfo("Contrite Cleric", 33, Rarity.RARE, mage.cards.c.ContriteCleric.class)); diff --git a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java index 63181779803..ba868a521fe 100644 --- a/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java +++ b/Mage/src/main/java/mage/abilities/effects/common/continuous/BecomesCreatureSourceEffect.java @@ -5,7 +5,6 @@ import mage.MageObjectReference; import mage.abilities.Ability; import mage.abilities.dynamicvalue.DynamicValue; import mage.abilities.effects.ContinuousEffectImpl; -import mage.abilities.keyword.FlyingAbility; import mage.constants.*; import mage.game.Game; import mage.game.permanent.Permanent; @@ -19,6 +18,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements protected Token token; protected String theyAreStillType; protected boolean losePreviousTypes; + protected boolean loseAbilities; protected DynamicValue power = null; protected DynamicValue toughness = null; @@ -31,13 +31,16 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements } public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration, boolean losePreviousTypes, boolean characterDefining, DynamicValue power, DynamicValue toughness) { + this(token, theyAreStillType,duration,losePreviousTypes,characterDefining,power,toughness,false); + } + public BecomesCreatureSourceEffect(Token token, String theyAreStillType, Duration duration, boolean losePreviousTypes, boolean characterDefining, DynamicValue power, DynamicValue toughness, boolean loseAbilities) { super(duration, Outcome.BecomeCreature); this.characterDefining = characterDefining; this.token = token; this.theyAreStillType = theyAreStillType; this.losePreviousTypes = losePreviousTypes; this.power = power; - this.toughness = toughness; + this.toughness = toughness;this.loseAbilities=loseAbilities; setText(); this.addDependencyType(DependencyType.BecomeCreature); @@ -47,7 +50,7 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements super(effect); this.token = effect.token.copy(); this.theyAreStillType = effect.theyAreStillType; - this.losePreviousTypes = effect.losePreviousTypes; + this.losePreviousTypes = effect.losePreviousTypes;this.loseAbilities=effect.loseAbilities; if (effect.power != null) { this.power = effect.power.copy(); } @@ -108,6 +111,8 @@ public class BecomesCreatureSourceEffect extends ContinuousEffectImpl implements case AbilityAddingRemovingEffects_6: if (sublayer == SubLayer.NA) { + if(loseAbilities){ + permanent.removeAllAbilities(source.getSourceId(), game);} for (Ability ability : token.getAbilities()) { permanent.addAbility(ability, source.getSourceId(), game); }