Skip to content

Commit

Permalink
[MKM] Implement Incinerator of the Guilty
Browse files Browse the repository at this point in the history
  • Loading branch information
DominionSpy committed Feb 21, 2024
1 parent 34816be commit bcbddaf
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 0 deletions.
74 changes: 74 additions & 0 deletions Mage.Sets/src/mage/cards/i/IncineratorOfTheGuilty.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
package mage.cards.i;

import java.util.UUID;
import mage.MageInt;
import mage.abilities.Ability;
import mage.abilities.common.DealsCombatDamageToAPlayerTriggeredAbility;
import mage.abilities.common.delayed.ReflexiveTriggeredAbility;
import mage.abilities.costs.common.CollectEvidenceCost;
import mage.abilities.costs.common.CollectEvidenceXCost;
import mage.abilities.dynamicvalue.common.GetXValue;
import mage.abilities.effects.OneShotEffect;
import mage.abilities.effects.common.DamageAllControlledTargetEffect;
import mage.abilities.effects.common.DoIfCostPaid;
import mage.abilities.effects.common.DoWhenCostPaid;
import mage.constants.Outcome;
import mage.constants.SetTargetPointer;
import mage.constants.SubType;
import mage.abilities.keyword.FlyingAbility;
import mage.abilities.keyword.TrampleAbility;
import mage.cards.CardImpl;
import mage.cards.CardSetInfo;
import mage.constants.CardType;
import mage.filter.FilterPermanent;
import mage.filter.StaticFilters;
import mage.filter.predicate.Predicates;
import mage.game.Game;
import mage.players.Player;

/**
*
* @author DominionSpy
*/
public final class IncineratorOfTheGuilty extends CardImpl {

private static final FilterPermanent filter = new FilterPermanent("creature and each planeswalker");

static {
filter.add(
Predicates.or(
CardType.CREATURE.getPredicate(),
CardType.PLANESWALKER.getPredicate()));
}

public IncineratorOfTheGuilty(UUID ownerId, CardSetInfo setInfo) {
super(ownerId, setInfo, new CardType[]{CardType.CREATURE}, "{4}{R}{R}");

this.subtype.add(SubType.DRAGON);
this.power = new MageInt(6);
this.toughness = new MageInt(6);

// Flying
this.addAbility(FlyingAbility.getInstance());

// Trample
this.addAbility(TrampleAbility.getInstance());

// Whenever Incinerator of the Guilty deals combat damage to a player, you may collect evidence X.
// When you do, Incinerator of the Guilty deals X damage to each creature and each planeswalker that player controls.
ReflexiveTriggeredAbility reflexive = new ReflexiveTriggeredAbility(new DamageAllControlledTargetEffect(GetXValue.instance, filter), false);
Ability ability = new DealsCombatDamageToAPlayerTriggeredAbility(
new DoWhenCostPaid(reflexive, new CollectEvidenceXCost(), "Collect evidence X to deal damage?"),
false, true);
this.addAbility(ability);
}

private IncineratorOfTheGuilty(final IncineratorOfTheGuilty card) {
super(card);
}

@Override
public IncineratorOfTheGuilty copy() {
return new IncineratorOfTheGuilty(this);
}
}
1 change: 1 addition & 0 deletions Mage.Sets/src/mage/sets/MurdersAtKarlovManor.java
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ private MurdersAtKarlovManor() {
cards.add(new SetCardInfo("Hunted Bonebrute", 87, Rarity.RARE, mage.cards.h.HuntedBonebrute.class));
cards.add(new SetCardInfo("Hustle // Bustle", 249, Rarity.UNCOMMON, mage.cards.h.HustleBustle.class));
cards.add(new SetCardInfo("Ill-Timed Explosion", 207, Rarity.RARE, mage.cards.i.IllTimedExplosion.class));
cards.add(new SetCardInfo("Incinerator of the Guilty", 132, Rarity.MYTHIC, mage.cards.i.IncineratorOfTheGuilty.class));
cards.add(new SetCardInfo("Innocent Bystander", 133, Rarity.COMMON, mage.cards.i.InnocentBystander.class));
cards.add(new SetCardInfo("Inside Source", 19, Rarity.COMMON, mage.cards.i.InsideSource.class));
cards.add(new SetCardInfo("Insidious Roots", 208, Rarity.UNCOMMON, mage.cards.i.InsidiousRoots.class));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package mage.abilities.costs.common;

import mage.abilities.costs.Cost;
import mage.abilities.costs.VariableCostImpl;
import mage.abilities.costs.VariableCostType;

public class CollectEvidenceXCost extends VariableCostImpl {

public CollectEvidenceXCost() {
this(false);
}

public CollectEvidenceXCost(boolean useAsAdditionalCost) {
super(useAsAdditionalCost ? VariableCostType.ADDITIONAL : VariableCostType.NORMAL,
"evidence to collect");
this.text = (useAsAdditionalCost ? "as an additional cost to cast this spell, collect evidence " : "Collect evidence ") + xText;
}

protected CollectEvidenceXCost(final CollectEvidenceXCost cost) {
super(cost);
}

@Override
public CollectEvidenceXCost copy() {
return new CollectEvidenceXCost(this);
}

@Override
public Cost getFixedCostsFromAnnouncedValue(int xValue) {
return new CollectEvidenceCost(xValue);
}
}

0 comments on commit bcbddaf

Please sign in to comment.