-
Notifications
You must be signed in to change notification settings - Fork 787
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MKM] Implement Incinerator of the Guilty
- Loading branch information
1 parent
34816be
commit bcbddaf
Showing
3 changed files
with
107 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
Mage/src/main/java/mage/abilities/costs/common/CollectEvidenceXCost.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |