[MH3] Implement Consuming Corruption

This commit is contained in:
theelk801 2024-05-27 14:56:09 -04:00
parent 15cd7b20b1
commit ffff68aa30
2 changed files with 45 additions and 0 deletions

View file

@ -0,0 +1,44 @@
package mage.cards.c;
import mage.abilities.dynamicvalue.DynamicValue;
import mage.abilities.dynamicvalue.common.PermanentsOnBattlefieldCount;
import mage.abilities.effects.common.DamageTargetEffect;
import mage.abilities.effects.common.GainLifeEffect;
import mage.abilities.hint.Hint;
import mage.abilities.hint.ValueHint;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.common.FilterControlledPermanent;
import mage.target.common.TargetCreatureOrPlaneswalker;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class ConsumingCorruption extends CardImpl {
private static final DynamicValue xValue = new PermanentsOnBattlefieldCount(new FilterControlledPermanent(SubType.SWAMP));
private static final Hint hint = new ValueHint("Swamps you control", xValue);
public ConsumingCorruption(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{B}{B}");
// Consuming Corruption deals X damage to target creature or planeswalker and you gain X life, where X is the number of Swamps you control.
this.getSpellAbility().addEffect(new DamageTargetEffect(xValue).setText("deals X damage to target creature or planeswalker"));
this.getSpellAbility().addEffect(new GainLifeEffect(xValue).setText("and you gain X life, where X is the number of Swamps you control"));
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalker());
this.getSpellAbility().addHint(hint);
}
private ConsumingCorruption(final ConsumingCorruption card) {
super(card);
}
@Override
public ConsumingCorruption copy() {
return new ConsumingCorruption(this);
}
}

View file

@ -37,6 +37,7 @@ public final class ModernHorizons3 extends ExpansionSet {
cards.add(new SetCardInfo("Chthonian Nightmare", 83, Rarity.RARE, mage.cards.c.ChthonianNightmare.class));
cards.add(new SetCardInfo("Collective Resistance", 147, Rarity.UNCOMMON, mage.cards.c.CollectiveResistance.class));
cards.add(new SetCardInfo("Conduit Goblin", 179, Rarity.COMMON, mage.cards.c.ConduitGoblin.class));
cards.add(new SetCardInfo("Consuming Corruption", 84, Rarity.UNCOMMON, mage.cards.c.ConsumingCorruption.class));
cards.add(new SetCardInfo("Copycrook", 55, Rarity.UNCOMMON, mage.cards.c.Copycrook.class));
cards.add(new SetCardInfo("Cranial Ram", 180, Rarity.COMMON, mage.cards.c.CranialRam.class));
cards.add(new SetCardInfo("Cursed Mirror", 279, Rarity.RARE, mage.cards.c.CursedMirror.class));