mirror of
https://github.com/magefree/mage.git
synced 2025-12-22 11:32:00 -08:00
Implemented Purphoros's Intervention
This commit is contained in:
parent
cea9b989bb
commit
dccc17fac9
3 changed files with 121 additions and 0 deletions
87
Mage.Sets/src/mage/cards/p/PurphorossIntervention.java
Normal file
87
Mage.Sets/src/mage/cards/p/PurphorossIntervention.java
Normal file
|
|
@ -0,0 +1,87 @@
|
||||||
|
package mage.cards.p;
|
||||||
|
|
||||||
|
import mage.abilities.Ability;
|
||||||
|
import mage.abilities.Mode;
|
||||||
|
import mage.abilities.common.delayed.AtTheBeginOfNextEndStepDelayedTriggeredAbility;
|
||||||
|
import mage.abilities.dynamicvalue.DynamicValue;
|
||||||
|
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||||
|
import mage.abilities.dynamicvalue.common.ManacostVariableValue;
|
||||||
|
import mage.abilities.effects.OneShotEffect;
|
||||||
|
import mage.abilities.effects.common.DamageTargetEffect;
|
||||||
|
import mage.abilities.effects.common.SacrificeTargetEffect;
|
||||||
|
import mage.cards.CardImpl;
|
||||||
|
import mage.cards.CardSetInfo;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.Outcome;
|
||||||
|
import mage.game.Game;
|
||||||
|
import mage.game.permanent.token.PurphorossInterventionToken;
|
||||||
|
import mage.game.permanent.token.Token;
|
||||||
|
import mage.target.common.TargetCreatureOrPlaneswalker;
|
||||||
|
import mage.target.targetpointer.FixedTarget;
|
||||||
|
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PurphorossIntervention extends CardImpl {
|
||||||
|
|
||||||
|
private static final DynamicValue xValue = new MultipliedValue(ManacostVariableValue.instance, 2);
|
||||||
|
|
||||||
|
public PurphorossIntervention(UUID ownerId, CardSetInfo setInfo) {
|
||||||
|
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{R}");
|
||||||
|
|
||||||
|
// Choose one —
|
||||||
|
// • Create an X/1 red Elemental creature token with trample and haste. Sacrifice it at the beginning of the next end step.
|
||||||
|
this.getSpellAbility().addEffect(new PurphorossInterventionEffect());
|
||||||
|
|
||||||
|
// • Purphoros's Intervention deals twice X damage to target creature or planeswalker.
|
||||||
|
Mode mode = new Mode(new DamageTargetEffect(xValue)
|
||||||
|
.setText("{this} deals twice X damage to target creature or planeswalker"));
|
||||||
|
mode.addTarget(new TargetCreatureOrPlaneswalker());
|
||||||
|
this.getSpellAbility().addMode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
|
private PurphorossIntervention(final PurphorossIntervention card) {
|
||||||
|
super(card);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PurphorossIntervention copy() {
|
||||||
|
return new PurphorossIntervention(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class PurphorossInterventionEffect extends OneShotEffect {
|
||||||
|
|
||||||
|
PurphorossInterventionEffect() {
|
||||||
|
super(Outcome.Benefit);
|
||||||
|
staticText = "Create an X/1 red Elemental creature token with trample and haste. " +
|
||||||
|
"Sacrifice it at the beginning of the next end step.";
|
||||||
|
}
|
||||||
|
|
||||||
|
private PurphorossInterventionEffect(final PurphorossInterventionEffect effect) {
|
||||||
|
super(effect);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public PurphorossInterventionEffect copy() {
|
||||||
|
return new PurphorossInterventionEffect(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean apply(Game game, Ability source) {
|
||||||
|
Token token = new PurphorossInterventionToken(source.getManaCostsToPay().getX());
|
||||||
|
token.putOntoBattlefield(1, game, source.getSourceId(), source.getControllerId());
|
||||||
|
token.getLastAddedTokenIds()
|
||||||
|
.stream()
|
||||||
|
.forEach(uuid -> game.addDelayedTriggeredAbility(
|
||||||
|
new AtTheBeginOfNextEndStepDelayedTriggeredAbility(
|
||||||
|
new SacrificeTargetEffect()
|
||||||
|
.setText("sacrifice this creature")
|
||||||
|
.setTargetPointer(new FixedTarget(uuid, game))
|
||||||
|
), source
|
||||||
|
));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -96,6 +96,7 @@ public final class TherosBeyondDeath extends ExpansionSet {
|
||||||
cards.add(new SetCardInfo("Pious Wayfarer", 32, Rarity.COMMON, mage.cards.p.PiousWayfarer.class));
|
cards.add(new SetCardInfo("Pious Wayfarer", 32, Rarity.COMMON, mage.cards.p.PiousWayfarer.class));
|
||||||
cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
cards.add(new SetCardInfo("Plains", 250, Rarity.LAND, mage.cards.basiclands.Plains.class, FULL_ART_BFZ_VARIOUS));
|
||||||
cards.add(new SetCardInfo("Polukranos, Unchained", 224, Rarity.MYTHIC, mage.cards.p.PolukranosUnchained.class));
|
cards.add(new SetCardInfo("Polukranos, Unchained", 224, Rarity.MYTHIC, mage.cards.p.PolukranosUnchained.class));
|
||||||
|
cards.add(new SetCardInfo("Purphoros's Intervention", 151, Rarity.RARE, mage.cards.p.PurphorossIntervention.class));
|
||||||
cards.add(new SetCardInfo("Purphoros, Bronze-Blooded", 150, Rarity.MYTHIC, mage.cards.p.PurphorosBronzeBlooded.class));
|
cards.add(new SetCardInfo("Purphoros, Bronze-Blooded", 150, Rarity.MYTHIC, mage.cards.p.PurphorosBronzeBlooded.class));
|
||||||
cards.add(new SetCardInfo("Reverent Hoplite", 33, Rarity.UNCOMMON, mage.cards.r.ReverentHoplite.class));
|
cards.add(new SetCardInfo("Reverent Hoplite", 33, Rarity.UNCOMMON, mage.cards.r.ReverentHoplite.class));
|
||||||
cards.add(new SetCardInfo("Revoke Existence", 34, Rarity.COMMON, mage.cards.r.RevokeExistence.class));
|
cards.add(new SetCardInfo("Revoke Existence", 34, Rarity.COMMON, mage.cards.r.RevokeExistence.class));
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package mage.game.permanent.token;
|
||||||
|
|
||||||
|
import mage.MageInt;
|
||||||
|
import mage.abilities.keyword.HasteAbility;
|
||||||
|
import mage.abilities.keyword.TrampleAbility;
|
||||||
|
import mage.constants.CardType;
|
||||||
|
import mage.constants.SubType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author TheElk801
|
||||||
|
*/
|
||||||
|
public final class PurphorossInterventionToken extends TokenImpl {
|
||||||
|
|
||||||
|
public PurphorossInterventionToken(int power) {
|
||||||
|
super("Elemental", "X/1 red Elemental creature token with trample and haste");
|
||||||
|
this.cardType.add(CardType.CREATURE);
|
||||||
|
this.subtype.add(SubType.ELEMENTAL);
|
||||||
|
this.color.setRed(true);
|
||||||
|
this.power = new MageInt(power);
|
||||||
|
this.toughness = new MageInt(1);
|
||||||
|
this.addAbility(TrampleAbility.getInstance());
|
||||||
|
this.addAbility(HasteAbility.getInstance());
|
||||||
|
}
|
||||||
|
|
||||||
|
private PurphorossInterventionToken(final PurphorossInterventionToken token) {
|
||||||
|
super(token);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PurphorossInterventionToken copy() {
|
||||||
|
return new PurphorossInterventionToken(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue