diff --git a/Mage.Sets/src/mage/cards/b/BreakerOfCreation.java b/Mage.Sets/src/mage/cards/b/BreakerOfCreation.java new file mode 100644 index 00000000000..431d94cb5b8 --- /dev/null +++ b/Mage.Sets/src/mage/cards/b/BreakerOfCreation.java @@ -0,0 +1,58 @@ +package mage.cards.b; + +import mage.MageInt; +import mage.abilities.dynamicvalue.DynamicValue; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.common.CastSourceTriggeredAbility; +import mage.abilities.effects.common.GainLifeEffect; +import mage.abilities.keyword.AnnihilatorAbility; +import mage.abilities.keyword.HexproofFromEachColorAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.constants.CardType; +import mage.constants.SubType; +import mage.filter.FilterPermanent; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.ColorlessPredicate; + +import java.util.UUID; + +/** + * @author TheElk801 + */ +public final class BreakerOfCreation extends CardImpl { + + private static final FilterPermanent filter = new FilterControlledPermanent("colorless permanent you control"); + + static { + filter.add(ColorlessPredicate.instance); + } + + private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(filter, 1); + + public BreakerOfCreation(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{6}{C}{C}"); + + this.subtype.add(SubType.ELDRAZI); + this.power = new MageInt(8); + this.toughness = new MageInt(4); + + // When you cast this spell, you gain 1 life for each colorless permanent you control. + this.addAbility(new CastSourceTriggeredAbility(new GainLifeEffect(xValue))); + + // Hexproof from each color + this.addAbility(HexproofFromEachColorAbility.getInstance()); + + // Annihilator 2 + this.addAbility(new AnnihilatorAbility(2)); + } + + private BreakerOfCreation(final BreakerOfCreation card) { + super(card); + } + + @Override + public BreakerOfCreation copy() { + return new BreakerOfCreation(this); + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons3.java b/Mage.Sets/src/mage/sets/ModernHorizons3.java index 9391cae08ea..a815c405473 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons3.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons3.java @@ -24,6 +24,7 @@ public final class ModernHorizons3 extends ExpansionSet { cards.add(new SetCardInfo("Ajani, Nacatl Avenger", 237, Rarity.MYTHIC, mage.cards.a.AjaniNacatlAvenger.class)); cards.add(new SetCardInfo("Ajani, Nacatl Pariah", 237, Rarity.MYTHIC, mage.cards.a.AjaniNacatlPariah.class)); cards.add(new SetCardInfo("Bloodstained Mire", 216, Rarity.RARE, mage.cards.b.BloodstainedMire.class)); + cards.add(new SetCardInfo("Breaker of Creation", 1, Rarity.UNCOMMON, mage.cards.b.BreakerOfCreation.class)); cards.add(new SetCardInfo("Chthonian Nightmare", 83, Rarity.RARE, mage.cards.c.ChthonianNightmare.class)); cards.add(new SetCardInfo("Emrakul, the World Anew", 6, Rarity.MYTHIC, mage.cards.e.EmrakulTheWorldAnew.class)); cards.add(new SetCardInfo("Flare of Cultivation", 154, Rarity.RARE, mage.cards.f.FlareOfCultivation.class)); diff --git a/Mage/src/main/java/mage/abilities/keyword/HexproofFromEachColorAbility.java b/Mage/src/main/java/mage/abilities/keyword/HexproofFromEachColorAbility.java new file mode 100644 index 00000000000..3e47bb87c42 --- /dev/null +++ b/Mage/src/main/java/mage/abilities/keyword/HexproofFromEachColorAbility.java @@ -0,0 +1,52 @@ +package mage.abilities.keyword; + +import mage.MageObject; +import mage.game.Game; + +import java.io.ObjectStreamException; + +/** + * Hexproof from each color + * + * @author TheElk801 + */ +public class HexproofFromEachColorAbility extends HexproofBaseAbility { + + private static final HexproofFromEachColorAbility instance; + + static { + instance = new HexproofFromEachColorAbility(); + } + + private Object readResolve() throws ObjectStreamException { + return instance; + } + + public static HexproofFromEachColorAbility getInstance() { + return instance; + } + + private HexproofFromEachColorAbility() { + super(); + } + + @Override + public boolean checkObject(MageObject source, Game game) { + return !source.getColor(game).isColorless(); + } + + @Override + public HexproofFromEachColorAbility copy() { + return instance; + } + + @Override + public String getRule() { + return "hexproof from each color"; + } + + @Override + public String getCardIconHint(Game game) { + return "hexproof from each color"; + } +} diff --git a/Utils/mtg-cards-data.txt b/Utils/mtg-cards-data.txt index 002b170af18..3067e6f7ac7 100644 --- a/Utils/mtg-cards-data.txt +++ b/Utils/mtg-cards-data.txt @@ -52707,6 +52707,7 @@ Island|Outlaws of Thunder Junction|273|C||Basic Land - Island|||({T}: Add {U}.)| Swamp|Outlaws of Thunder Junction|274|C||Basic Land - Swamp|||({T}: Add {B}.)| Mountain|Outlaws of Thunder Junction|275|C||Basic Land - Mountain|||({T}: Add {R}.)| Forest|Outlaws of Thunder Junction|276|C||Basic Land - Forest|||({T}: Add {G}.)| +Breaker of Creation|Modern Horizons 3|1|U|{6}{C}{C}|Creature - Eldrazi|8|4|When you cast this spell, you gain 1 life for each colorless permanent you control.$Hexproof from each color$Annihilator 2| Emrakul, the World Anew|Modern Horizons 3|6|M|{12}|Legendary Creature - Eldrazi|12|12|When you cast this spell, gain control of all creatures target player controls.$Flying, protection from spells and from permanents that were cast this turn$When Emrakul, the World Anew leaves the battlefield, sacrifice all creatures you control.$Madness--Pay six {C}.| Herigast, Erupting Nullkite|Modern Horizons 3|8|M|{9}|Legendary Creature - Eldrazi Dragon|6|6|Emerge {6}{R}{R}$When you cast this spell, you may exile your hand. If you do, draw three cards.$Flying$Each creature spell you cast has emerge. The emerge cost is equal to its mana cost.| It That Heralds the End|Modern Horizons 3|9|U|{1}{C}|Creature - Eldrazi Drone|2|2|Colorless spells you cast with mana value 7 or greater cost {1} less to cast.$Other colorless creatures you control get +1/+1.|