mirror of
https://github.com/magefree/mage.git
synced 2025-12-21 02:52:02 -08:00
[MKM] Implement Incinerator of the Guilty (#11838)
This commit is contained in:
parent
f27a0c8b9a
commit
2ea0093bf8
2 changed files with 104 additions and 0 deletions
103
Mage.Sets/src/mage/cards/i/IncineratorOfTheGuilty.java
Normal file
103
Mage.Sets/src/mage/cards/i/IncineratorOfTheGuilty.java
Normal file
|
|
@ -0,0 +1,103 @@
|
||||||
|
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.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DamageAllControlledTargetEffect;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
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.predicate.Predicates;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.players.Player;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author DominionSpy
|
||||||
|
*/
|
||||||
|
public final class IncineratorOfTheGuilty extends CardImpl {
|
||||||
|
|
||||||
|
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.
|
||||||
|
this.addAbility(new DealsCombatDamageToAPlayerTriggeredAbility(
|
||||||
|
new IncineratorOfTheGuiltyEffect(), false, true));
|
||||||
|
}
|
||||||
|
|
||||||
|
private IncineratorOfTheGuilty(final IncineratorOfTheGuilty card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IncineratorOfTheGuilty copy() {
|
||||||
|
return new IncineratorOfTheGuilty(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class IncineratorOfTheGuiltyEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
private static final FilterPermanent filter = new FilterPermanent("creature and each planeswalker");
|
||||||
|
|
||||||
|
static {
|
||||||
|
filter.add(
|
||||||
|
Predicates.or(
|
||||||
|
CardType.CREATURE.getPredicate(),
|
||||||
|
CardType.PLANESWALKER.getPredicate()));
|
||||||
|
}
|
||||||
|
|
||||||
|
IncineratorOfTheGuiltyEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "you may collect evidence X. When you do, {this} deals X damage " +
|
||||||
|
"to each creature and each planeswalker that player controls.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private IncineratorOfTheGuiltyEffect(final IncineratorOfTheGuiltyEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IncineratorOfTheGuiltyEffect copy() {
|
||||||
|
return new IncineratorOfTheGuiltyEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Player controller = game.getPlayer(source.getControllerId());
|
||||||
|
if (controller == null || !controller.chooseUse(outcome, "Collect evidence X?", source, game)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int xValue = controller.announceXMana(0, Integer.MAX_VALUE, "Announce the value for X", game, source);
|
||||||
|
CollectEvidenceCost cost = new CollectEvidenceCost(xValue);
|
||||||
|
if (!cost.pay(source, game, source, source.getControllerId(), false, null)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||||
|
new DamageAllControlledTargetEffect(xValue, filter)
|
||||||
|
.setTargetPointer(getTargetPointer().copy()), false);
|
||||||
|
game.fireReflexiveTriggeredAbility(ability, source);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -131,6 +131,7 @@ public final class MurdersAtKarlovManor extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Hunted Bonebrute", 87, Rarity.RARE, mage.cards.h.HuntedBonebrute.class));
|
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("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("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("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("Inside Source", 19, Rarity.COMMON, mage.cards.i.InsideSource.class));
|
||||||
cards.add(new SetCardInfo("Insidious Roots", 208, Rarity.UNCOMMON, mage.cards.i.InsidiousRoots.class));
|
cards.add(new SetCardInfo("Insidious Roots", 208, Rarity.UNCOMMON, mage.cards.i.InsidiousRoots.class));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue