[MKM] Implement Repulsive Mutation (#11771)

This commit is contained in:
Matthew Wilson 2024-02-10 05:23:32 +02:00 committed by GitHub
parent 293420b4c3
commit 7969736010
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 48 additions and 0 deletions

View file

@ -0,0 +1,47 @@
package mage.cards.r;
import java.util.UUID;
import mage.abilities.dynamicvalue.common.GreatestPowerAmongControlledCreaturesValue;
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
import mage.abilities.effects.common.CounterUnlessPaysEffect;
import mage.abilities.effects.common.counter.AddCountersTargetEffect;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.counters.CounterType;
import mage.filter.StaticFilters;
import mage.target.TargetSpell;
import mage.target.common.TargetControlledCreaturePermanent;
import mage.target.targetpointer.SecondTargetPointer;
/**
*
* @author DominionSpy
*/
public final class RepulsiveMutation extends CardImpl {
public RepulsiveMutation(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{G}{U}");
// Put X +1/+1 counters on target creature you control.
getSpellAbility().addEffect(new AddCountersTargetEffect(
CounterType.P1P1.createInstance(), ManacostVariableValue.REGULAR));
getSpellAbility().addTarget(new TargetControlledCreaturePermanent());
// Then counter up to one target spell unless its controller pays mana equal to the greatest power among creatures you control.
getSpellAbility().addEffect(new CounterUnlessPaysEffect(GreatestPowerAmongControlledCreaturesValue.instance)
.setTargetPointer(new SecondTargetPointer())
.setText("Then counter up to one target spell unless its controller pays mana equal to the greatest power among creatures you control."));
getSpellAbility().addTarget(new TargetSpell(0, 1, StaticFilters.FILTER_SPELL));
}
private RepulsiveMutation(final RepulsiveMutation card) {
super(card);
}
@Override
public RepulsiveMutation copy() {
return new RepulsiveMutation(this);
}
}

View file

@ -187,6 +187,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
cards.add(new SetCardInfo("Reckless Detective", 141, Rarity.UNCOMMON, mage.cards.r.RecklessDetective.class));
cards.add(new SetCardInfo("Red Herring", 142, Rarity.COMMON, mage.cards.r.RedHerring.class));
cards.add(new SetCardInfo("Repeat Offender", 101, Rarity.COMMON, mage.cards.r.RepeatOffender.class));
cards.add(new SetCardInfo("Repulsive Mutation", 227, Rarity.UNCOMMON, mage.cards.r.RepulsiveMutation.class));
cards.add(new SetCardInfo("Riftburst Hellion", 228, Rarity.COMMON, mage.cards.r.RiftburstHellion.class));
cards.add(new SetCardInfo("Rope", 173, Rarity.UNCOMMON, mage.cards.r.Rope.class));
cards.add(new SetCardInfo("Rot Farm Mortipede", 102, Rarity.COMMON, mage.cards.r.RotFarmMortipede.class));