diff --git a/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java b/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java new file mode 100644 index 0000000000..4afd352c44 --- /dev/null +++ b/Mage.Sets/src/mage/cards/a/AeveProgenitorOoze.java @@ -0,0 +1,90 @@ +package mage.cards.a; + +import java.util.UUID; +import mage.MageInt; +import mage.abilities.Ability; +import mage.abilities.common.EntersBattlefieldAbility; +import mage.abilities.common.SimpleStaticAbility; +import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount; +import mage.abilities.effects.ContinuousEffectImpl; +import mage.abilities.effects.common.counter.AddCountersSourceEffect; +import mage.constants.*; +import mage.abilities.keyword.StormAbility; +import mage.cards.CardImpl; +import mage.cards.CardSetInfo; +import mage.counters.CounterType; +import mage.filter.common.FilterControlledPermanent; +import mage.filter.predicate.mageobject.AnotherPredicate; +import mage.game.Game; +import mage.game.permanent.Permanent; +import mage.game.permanent.PermanentToken; + +/** + * + * @author weirddan455 + */ +public final class AeveProgenitorOoze extends CardImpl { + + private static final FilterControlledPermanent filter = new FilterControlledPermanent(SubType.OOZE); + + static { + filter.add(AnotherPredicate.instance); + } + + public AeveProgenitorOoze(UUID ownerId, CardSetInfo setInfo) { + super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{2}{G}{G}{G}"); + + this.addSuperType(SuperType.LEGENDARY); + this.subtype.add(SubType.OOZE); + this.power = new MageInt(2); + this.toughness = new MageInt(2); + + // Storm + this.addAbility(new StormAbility()); + + // Aeve, Progenitor Ooze isn't legendary as long as it's a token. + this.addAbility(new SimpleStaticAbility(new AeveProgenitorOozeNonLegendaryEffect())); + + // Aeve enters the battlefield with a +1/+1 counter on it for each other Ooze you control. + this.addAbility(new EntersBattlefieldAbility(new AddCountersSourceEffect( + CounterType.P1P1.createInstance(), new PermanentsOnBattlefieldCount(filter), true + ), "with a +1/+1 counter on it for each other Ooze you control" + )); + } + + private AeveProgenitorOoze(final AeveProgenitorOoze card) { + super(card); + } + + @Override + public AeveProgenitorOoze copy() { + return new AeveProgenitorOoze(this); + } +} + +class AeveProgenitorOozeNonLegendaryEffect extends ContinuousEffectImpl { + + public AeveProgenitorOozeNonLegendaryEffect() { + super(Duration.WhileOnBattlefield, Layer.TypeChangingEffects_4, SubLayer.NA, Outcome.Benefit); + this.staticText = "{this} isn't legendary as long as it's a token"; + } + + private AeveProgenitorOozeNonLegendaryEffect(final AeveProgenitorOozeNonLegendaryEffect effect) { + super(effect); + } + + @Override + public AeveProgenitorOozeNonLegendaryEffect copy() { + return new AeveProgenitorOozeNonLegendaryEffect(this); + } + + @Override + public boolean apply(Game game, Ability source) { + Permanent permanent = game.getPermanent(source.getSourceId()); + if (permanent instanceof PermanentToken) { + permanent.getSuperType().remove(SuperType.LEGENDARY); + return true; + } + return false; + } +} diff --git a/Mage.Sets/src/mage/sets/ModernHorizons2.java b/Mage.Sets/src/mage/sets/ModernHorizons2.java index 77e6a13ff1..4a8a360cdb 100644 --- a/Mage.Sets/src/mage/sets/ModernHorizons2.java +++ b/Mage.Sets/src/mage/sets/ModernHorizons2.java @@ -30,6 +30,7 @@ public final class ModernHorizons2 extends ExpansionSet { cards.add(new SetCardInfo("Abiding Grace", 1, Rarity.UNCOMMON, mage.cards.a.AbidingGrace.class)); cards.add(new SetCardInfo("Abundant Harvest", 147, Rarity.COMMON, mage.cards.a.AbundantHarvest.class)); cards.add(new SetCardInfo("Aeromoeba", 37, Rarity.COMMON, mage.cards.a.Aeromoeba.class)); + cards.add(new SetCardInfo("Aeve, Progenitor Ooze", 148, Rarity.RARE, mage.cards.a.AeveProgenitorOoze.class)); cards.add(new SetCardInfo("Arcbound Javelineer", 2, Rarity.UNCOMMON, mage.cards.a.ArcboundJavelineer.class)); cards.add(new SetCardInfo("Arcbound Mouser", 3, Rarity.COMMON, mage.cards.a.ArcboundMouser.class)); cards.add(new SetCardInfo("Arcbound Shikari", 184, Rarity.UNCOMMON, mage.cards.a.ArcboundShikari.class));