implement [PIP] Mutational Advantage

This commit is contained in:
Susucre 2024-05-02 11:09:49 +02:00
parent bada7d054a
commit 9099f48593
2 changed files with 59 additions and 0 deletions

View file

@ -0,0 +1,58 @@
package mage.cards.m;
import mage.abilities.effects.common.PreventAllDamageToAllEffect;
import mage.abilities.effects.common.continuous.GainAbilityControlledEffect;
import mage.abilities.effects.common.counter.ProliferateEffect;
import mage.abilities.keyword.HexproofAbility;
import mage.abilities.keyword.IndestructibleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.Duration;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterControlledPermanent;
import mage.filter.predicate.permanent.CounterAnyPredicate;
import java.util.UUID;
/**
* @author Susucr
*/
public final class MutationalAdvantage extends CardImpl {
private static final FilterPermanent filter =
new FilterControlledPermanent("permanents you control with counters on them");
static {
filter.add(CounterAnyPredicate.instance);
}
public MutationalAdvantage(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{G}{U}");
// Permanents you control with counters on them gain hexproof and indestructible until end of turn. Prevent all damage that would be dealt to those permanents this turn. Proliferate.
this.getSpellAbility().addEffect(
new GainAbilityControlledEffect(
HexproofAbility.getInstance(), Duration.EndOfTurn, filter
).setText("Permanents you control with counters on them gain hexproof")
);
this.getSpellAbility().addEffect(
new GainAbilityControlledEffect(
IndestructibleAbility.getInstance(), Duration.EndOfTurn, filter
).setText("and indestructible until end of turn")
);
this.getSpellAbility().addEffect(
new PreventAllDamageToAllEffect(Duration.EndOfTurn, filter)
);
this.getSpellAbility().addEffect(new ProliferateEffect());
}
private MutationalAdvantage(final MutationalAdvantage card) {
super(card);
}
@Override
public MutationalAdvantage copy() {
return new MutationalAdvantage(this);
}
}

View file

@ -208,6 +208,7 @@ public final class Fallout extends ExpansionSet {
cards.add(new SetCardInfo("Mossfire Valley", 273, Rarity.RARE, mage.cards.m.MossfireValley.class));
cards.add(new SetCardInfo("Mountain", 323, Rarity.LAND, mage.cards.basiclands.Mountain.class, FULL_ART_BFZ_VARIOUS));
cards.add(new SetCardInfo("Mr. House, President and CEO", 7, Rarity.MYTHIC, mage.cards.m.MrHousePresidentAndCEO.class));
cards.add(new SetCardInfo("Mutational Advantage", 111, Rarity.RARE, mage.cards.m.MutationalAdvantage.class));
cards.add(new SetCardInfo("Myriad Landscape", 274, Rarity.UNCOMMON, mage.cards.m.MyriadLandscape.class));
cards.add(new SetCardInfo("Mystic Forge", 236, Rarity.RARE, mage.cards.m.MysticForge.class));
cards.add(new SetCardInfo("Mystic Monastery", 275, Rarity.UNCOMMON, mage.cards.m.MysticMonastery.class));