[MH3] Implement Smelted Chargebug

This commit is contained in:
theelk801 2024-05-30 13:39:36 -04:00
parent 641116cbe9
commit 56c0d71181
2 changed files with 68 additions and 0 deletions

View file

@ -0,0 +1,67 @@
package mage.cards.s;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.AttacksTriggeredAbility;
import mage.abilities.common.EntersBattlefieldTriggeredAbility;
import mage.abilities.costs.common.PayEnergyCost;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.continuous.BoostTargetEffect;
import mage.abilities.effects.common.continuous.GainAbilityTargetEffect;
import mage.abilities.effects.common.counter.GetEnergyCountersControllerEffect;
import mage.abilities.keyword.MenaceAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.constants.SubType;
import mage.filter.FilterPermanent;
import mage.filter.common.FilterAttackingCreature;
import mage.filter.predicate.mageobject.AnotherPredicate;
import mage.target.TargetPermanent;
import java.util.UUID;
/**
* @author TheElk801
*/
public final class SmeltedChargebug extends CardImpl {
private static final FilterPermanent filter = new FilterAttackingCreature("another target attacking creature");
static {
filter.add(AnotherPredicate.instance);
}
public SmeltedChargebug(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.ARTIFACT, CardType.CREATURE}, "{1}{R}");
this.subtype.add(SubType.INSECT);
this.power = new MageInt(1);
this.toughness = new MageInt(3);
// Menace
this.addAbility(new MenaceAbility());
// When Smelted Chargebug enters the battlefield, you get {E}{E}.
this.addAbility(new EntersBattlefieldTriggeredAbility(new GetEnergyCountersControllerEffect(2)));
// Whenever Smelted Chargebug attacks, you may pay {E}. If you do, another target attacking creature gets +1/+0 and gains menace until end of turn.
Ability ability = new AttacksTriggeredAbility(new DoIfCostPaid(
new BoostTargetEffect(1, 0)
.setText("another target attacking creature gets +1/+0"),
new PayEnergyCost(1)
).addEffect(new GainAbilityTargetEffect(new MenaceAbility(false))
.setText("and gains menace until end of turn")));
ability.addTarget(new TargetPermanent(filter));
this.addAbility(ability);
}
private SmeltedChargebug(final SmeltedChargebug card) {
super(card);
}
@Override
public SmeltedChargebug copy() {
return new SmeltedChargebug(this);
}
}

View file

@ -205,6 +205,7 @@ public final class ModernHorizons3 extends ExpansionSet {
cards.add(new SetCardInfo("Six", 169, Rarity.RARE, mage.cards.s.Six.class));
cards.add(new SetCardInfo("Skittering Precursor", 137, Rarity.UNCOMMON, mage.cards.s.SkitteringPrecursor.class));
cards.add(new SetCardInfo("Skoa, Embermage", 138, Rarity.COMMON, mage.cards.s.SkoaEmbermage.class));
cards.add(new SetCardInfo("Smelted Chargebug", 139, Rarity.COMMON, mage.cards.s.SmeltedChargebug.class));
cards.add(new SetCardInfo("Snapping Voidcraw", 204, Rarity.COMMON, mage.cards.s.SnappingVoidcraw.class));
cards.add(new SetCardInfo("Snow-Covered Wastes", 229, Rarity.UNCOMMON, mage.cards.s.SnowCoveredWastes.class, NON_FULL_USE_VARIOUS));
cards.add(new SetCardInfo("Solar Transformer", 211, Rarity.UNCOMMON, mage.cards.s.SolarTransformer.class));