[MH2] Implemented Aeve, Progenitor Ooze (#7850)

* [MH2] Implemented Aeve, Progenitor Ooze

* [MH2] Aeve, Progenitor Ooze - Made requested changes
This commit is contained in:
Daniel Bomar 2021-06-01 19:14:40 -05:00 committed by GitHub
parent 261b09c711
commit e7efc5c918
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 91 additions and 0 deletions

View file

@ -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;
}
}

View file

@ -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));