mirror of
https://github.com/magefree/mage.git
synced 2025-12-28 22:42:03 -08:00
TargetAmount refactors (#13128)
* Add minimum and maximum target counts as parameters for TargetAmount and its subclasses; update/add several rules comments (and one actual text) for clarity; remove unused imports * Get amount+description from target instead of parameters for DistributeCountersEffect and DamageMultiEffect; additions to TargetImpl.getDescription to accommodate * Create separate method to check if "any number" phrasing should be used, override it in TargetAmount * Check instanceof TargetAmount before casting * Add new constructors to chain off of for TargetCreaturePermanentAmount & TargetCreatureOrPlaneswalkerAmount * Fix text for Storm the Seedcore * Use Integer.MAX_VALUE instead of 0 to represent no maximum targets * Add comment about getUseAnyNumber() * Use amount-only constructors in some TargetAmount subclasses, add clarifying documentation * Fix a few calls * Require more specific filters
This commit is contained in:
parent
960c26a291
commit
73b63d14ad
123 changed files with 444 additions and 365 deletions
|
|
@ -11,7 +11,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ComparisonType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterCreaturePermanent;
|
||||
import mage.filter.predicate.mageobject.PowerPredicate;
|
||||
import mage.target.common.TargetCreaturePermanent;
|
||||
|
|
@ -43,7 +42,7 @@ public final class AbzanCharm extends CardImpl {
|
|||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
// *Distribute two +1/+1 counters among one or two target creatures.
|
||||
mode = new Mode(new DistributeCountersEffect(2, "one or two target creatures"));
|
||||
mode = new Mode(new DistributeCountersEffect());
|
||||
mode.addTarget(new TargetCreaturePermanentAmount(2));
|
||||
this.getSpellAbility().addMode(mode);
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class AerialVolley extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{G}");
|
||||
|
||||
// Aerial Volley deals 3 damage divided as you choose among one, two, or three target creatures with flying.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, filter));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterCard;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.filter.predicate.Predicates;
|
||||
|
|
@ -38,7 +37,7 @@ public final class AjaniMentorOfHeroes extends CardImpl {
|
|||
this.setStartingLoyalty(4);
|
||||
|
||||
// +1: Distribute three +1/+1 counters among one, two, or three target creatures you control
|
||||
Ability ability = new LoyaltyAbility(new DistributeCountersEffect(3, "one, two, or three target creatures you control"), 1);
|
||||
Ability ability = new LoyaltyAbility(new DistributeCountersEffect(), 1);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -15,11 +15,9 @@ import mage.constants.*;
|
|||
import mage.abilities.keyword.CompleatedAbility;
|
||||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.counters.CounterType;
|
||||
import mage.game.Game;
|
||||
import mage.game.command.emblems.AjaniSleeperAgentEmblem;
|
||||
import mage.players.Player;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -42,12 +40,10 @@ public final class AjaniSleeperAgent extends CardImpl {
|
|||
this.addAbility(new LoyaltyAbility(new AjaniSleeperAgentEffect(), 1));
|
||||
|
||||
// −3: Distribute three +1/+1 counters among up to three target creatures. They gain vigilance until end of turn.
|
||||
Ability ability = new LoyaltyAbility(new DistributeCountersEffect(3, "up to three target creatures"), -3);
|
||||
Ability ability = new LoyaltyAbility(new DistributeCountersEffect()
|
||||
.setText("distribute three +1/+1 counters among up to three target creatures"), -3);
|
||||
ability.addEffect(new GainAbilityTargetEffect(VigilanceAbility.getInstance()).setText("They gain vigilance until end of turn"));
|
||||
Target target = new TargetCreaturePermanentAmount(3);
|
||||
target.setMinNumberOfTargets(0);
|
||||
target.setMaxNumberOfTargets(3);
|
||||
ability.addTarget(target);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(3, 0, 3));
|
||||
this.addAbility(ability);
|
||||
|
||||
// −6: You get an emblem with "Whenever you cast a creature or planeswalker spell, target opponent gets two poison counters."
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class AmethystDragon extends AdventureCard {
|
|||
|
||||
// Explosive Crystal
|
||||
// Explosive Crystal deals 4 damage divided as you choose among any number of targets.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageMultiEffect(4));
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetAnyTargetAmount(4));
|
||||
|
||||
this.finalizeAdventure();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public final class AngelOfSalvation extends CardImpl {
|
|||
this.addAbility(new ConvokeAbility());
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Angel of Salvation enters the battlefield, prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||
// When Angel of Salvation enters, prevent the next 5 damage that would be dealt this turn to any number of targets, divided as you choose.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 5));
|
||||
ability.addTarget(new TargetAnyTargetAmount(5));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public final class ArcLightning extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}");
|
||||
|
||||
// Arc Lightning deals 3 damage divided as you choose among one, two, or three targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.target.common.TargetAnyTargetAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -29,7 +28,7 @@ public final class ArcMage extends CardImpl {
|
|||
this.toughness = new MageInt(2);
|
||||
|
||||
// {2}{R}, {tap}, Discard a card: Arc Mage deals 2 damage divided as you choose among one or two targets.
|
||||
Ability ability = new SimpleActivatedAbility(new DamageMultiEffect(2), new ManaCostsImpl<>("{2}{R}"));
|
||||
Ability ability = new SimpleActivatedAbility(new DamageMultiEffect(), new ManaCostsImpl<>("{2}{R}"));
|
||||
ability.addCost(new TapSourceCost());
|
||||
ability.addCost(new DiscardCardCost());
|
||||
ability.addTarget(new TargetAnyTargetAmount(2));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
|
|
@ -28,7 +27,7 @@ public final class ArmamentCorps extends CardImpl {
|
|||
this.toughness = new MageInt(4);
|
||||
|
||||
// When Armament Corps enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(2, "one or two target creatures you control"), false);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(), false);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(2, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class ArrowVolleyTrap extends CardImpl {
|
|||
this.addAbility(new AlternativeCostSourceAbility(new ManaCostsImpl<>("{1}{W}"), ArrowVolleyTrapCondition.instance));
|
||||
|
||||
// Arrow Volley Trap deals 5 damage divided as you choose among any number of target attacking creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(5));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(5, StaticFilters.FILTER_ATTACKING_CREATURES));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ public final class AureliasFury extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{X}{R}{W}");
|
||||
|
||||
|
||||
// Aurelia's Fury deals X damage divided as you choose among any number of target creatures and/or players.
|
||||
// Aurelia's Fury deals X damage divided as you choose among any number of targets.
|
||||
// Tap each creature dealt damage this way. Players dealt damage this way can't cast noncreature spells this turn.
|
||||
DynamicValue xValue = GetXValue.instance;
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addEffect(new AureliasFuryEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
|
||||
this.getSpellAbility().addWatcher(new AureliasFuryDamagedByWatcher());
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ public final class AvacynsJudgment extends CardImpl {
|
|||
ability.setRuleAtTheTop(true);
|
||||
this.addAbility(ability);
|
||||
|
||||
// Avacyn's Judgment deals 2 damage divided as you choose among any number of target creatures and/or players. If Avacyn's Judgment's madness cost was paid, it deals X damage divided as you choose among those creatures and/or players instead.
|
||||
// Avacyn's Judgment deals 2 damage divided as you choose among any number of targets. If this spell's madness cost was paid, it deals X damage divided as you choose among those creatures and/or players instead.
|
||||
DynamicValue xValue = new AvacynsJudgmentManacostVariableValue();
|
||||
Effect effect = new DamageMultiEffect(xValue);
|
||||
Effect effect = new DamageMultiEffect();
|
||||
effect.setText("{this} deals 2 damage divided as you choose among any number of targets. If this spell's madness cost was paid, it deals X damage divided as you choose among those permanents and/or players instead.");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
|
||||
|
|
|
|||
|
|
@ -115,8 +115,6 @@ class AwakenTheMaelstromEffect extends OneShotEffect {
|
|||
return;
|
||||
}
|
||||
TargetPermanentAmount target = new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
target.setMinNumberOfTargets(1);
|
||||
target.setMaxNumberOfTargets(3);
|
||||
target.withNotTarget(true);
|
||||
target.withChooseHint("to distribute counters");
|
||||
target.chooseTarget(outcome, player.getId(), source, game);
|
||||
|
|
|
|||
|
|
@ -26,10 +26,7 @@ public final class BiogenicUpgrade extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}{G}");
|
||||
|
||||
// Distribute three +1/+1 counters among one, two, or three target creatures, then double the number of +1/+1 counters on each of those creatures.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(
|
||||
3,
|
||||
"one, two, or three target creatures"
|
||||
));
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3));
|
||||
this.getSpellAbility().addEffect(new BiogenicUpgradeEffect());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public final class BlasterHulk extends CardImpl {
|
|||
|
||||
// Whenever Blaster Hulk attacks, you get {E}{E}, then you may pay eight {E}. When you do, Blaster Hulk deals 8 damage divided as you choose among up to eight targets.
|
||||
Ability ability = new AttacksTriggeredAbility(new GetEnergyCountersControllerEffect(2));
|
||||
ReflexiveTriggeredAbility reflexiveAbility = new ReflexiveTriggeredAbility(new DamageMultiEffect(8)
|
||||
ReflexiveTriggeredAbility reflexiveAbility = new ReflexiveTriggeredAbility(new DamageMultiEffect()
|
||||
.setText("{this} deals 8 damage divided as you choose among up to eight targets"), false);
|
||||
reflexiveAbility.addTarget(new TargetAnyTargetAmount(8));
|
||||
ability.addEffect(new DoWhenCostPaid(reflexiveAbility, new PayEnergyCost(8),
|
||||
|
|
|
|||
|
|
@ -79,8 +79,7 @@ class BlessingOfFrostEffect extends OneShotEffect {
|
|||
int snow = ManaPaidSourceWatcher.getSnowPaid(source.getId(), game);
|
||||
int potentialTarget = game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game);
|
||||
if (snow > 0 && potentialTarget > 0) {
|
||||
TargetAmount target = new TargetCreaturePermanentAmount(snow, StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
target.setMinNumberOfTargets(1);
|
||||
TargetAmount target = new TargetCreaturePermanentAmount(snow, 0, snow, StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
target.withNotTarget(true);
|
||||
target.chooseTarget(outcome, player.getId(), source, game);
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import mage.abilities.keyword.MiracleAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -19,7 +18,7 @@ public final class BlessingsOfNature extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{4}{G}");
|
||||
|
||||
// Distribute four +1/+1 counters among any number of target creatures.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(4, "any number of target creatures"));
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(4));
|
||||
|
||||
this.addAbility(new MiracleAbility("{G}"));
|
||||
|
|
|
|||
|
|
@ -28,9 +28,14 @@ public final class BogardanHellkite extends CardImpl {
|
|||
this.power = new MageInt(5);
|
||||
this.toughness = new MageInt(5);
|
||||
|
||||
// Flash
|
||||
this.addAbility(FlashAbility.getInstance());
|
||||
|
||||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(5, "it"), false);
|
||||
|
||||
// When Bogardan Hellkite enters, it deals 5 damage divided as you choose among any number of targets.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect("it"), false);
|
||||
ability.addTarget(new TargetAnyTargetAmount(5));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public final class Boulderfall extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{6}{R}{R}");
|
||||
|
||||
// Boulderfall deals 5 damage divided as you choose among any number of targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(5));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(5));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.common.FilterOwnedCard;
|
||||
import mage.filter.predicate.mageobject.ColorPredicate;
|
||||
import mage.target.common.TargetCardInHand;
|
||||
|
|
@ -34,10 +33,7 @@ public final class BountyOfTheHunt extends CardImpl {
|
|||
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
|
||||
|
||||
// Distribute three +1/+1 counters among one, two, or three target creatures. For each +1/+1 counter you put on a creature this way, remove a +1/+1 counter from that creature at the beginning of the next cleanup step.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(
|
||||
3,
|
||||
"one, two, or three target creatures"
|
||||
).withRemoveAtEndOfTurn());
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect().withRemoveAtEndOfTurn());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import mage.filter.StaticFilters;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ public final class Broodlord extends CardImpl {
|
|||
|
||||
// Brood Telepathy -- When Broodlord enters the battlefield, distribute X +1/+1 counters among any number of other target creatures you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new BroodlordEffect());
|
||||
ability.addTarget(new TargetPermanentAmount(GetXValue.instance, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(GetXValue.instance, StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
this.addAbility(ability.withFlavorWord("Brood Telepathy"));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -53,11 +53,11 @@ public final class CaptainAmericaFirstAvenger extends CardImpl {
|
|||
|
||||
// Throw ... — {3}, Unattach an Equipment from Captain America: He deals damage equal to that Equipment’s mana value divided as you choose among one, two, or three targets.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DamageMultiEffect(CaptainAmericaFirstAvengerValue.instance).setText(
|
||||
new DamageMultiEffect().setText(
|
||||
"he deals damage equal to that Equipment's mana value divided as you choose among one, two, or three targets."),
|
||||
new GenericManaCost(3));
|
||||
ability.addCost(new CaptainAmericaFirstAvengerUnattachCost());
|
||||
ability.addTarget(new TargetAnyTargetAmount(CaptainAmericaFirstAvengerValue.instance, 3));
|
||||
ability.addTarget(new TargetAnyTargetAmount(CaptainAmericaFirstAvengerValue.instance, 1, 3));
|
||||
this.addAbility(ability.withFlavorWord("Throw ..."));
|
||||
|
||||
// ... Catch — At the beginning of combat on your turn, attach up to one target Equipment you control to Captain America.
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import mage.filter.common.FilterCreaturePermanent;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.common.TargetAttackingCreature;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -40,11 +40,8 @@ public final class CaseOfTheTrampledGarden extends CardImpl {
|
|||
this.subtype.add(SubType.CASE);
|
||||
|
||||
// When this Case enters the battlefield, distribute two +1/+1 counters among one or two target creatures you control.
|
||||
Ability initialAbility = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(2,
|
||||
"one or two target creatures you control"));
|
||||
TargetPermanentAmount target = new TargetPermanentAmount(2, StaticFilters.FILTER_CONTROLLED_CREATURES);
|
||||
target.setMinNumberOfTargets(1);
|
||||
initialAbility.addTarget(target);
|
||||
Ability initialAbility = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect());
|
||||
initialAbility.addTarget(new TargetCreaturePermanentAmount(2, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
// To solve -- Creatures you control have total power 8 or greater.
|
||||
// Solved -- Whenever you attack, put a +1/+1 counter on target attacking creature. It gains trample until end of turn.
|
||||
Ability solvedAbility = new ConditionalTriggeredAbility(
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public final class ChandraFlameshaper extends CardImpl {
|
|||
|
||||
// -4: Chandra deals 8 damage divided as you choose among any number of target creatures and/or planeswalkers.
|
||||
Ability minusFourAbility = new LoyaltyAbility(
|
||||
new DamageMultiEffect(8, "{this}"), -4
|
||||
new DamageMultiEffect(), -4
|
||||
);
|
||||
minusFourAbility.addTarget(new TargetCreatureOrPlaneswalkerAmount(8));
|
||||
this.addAbility(minusFourAbility);
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public final class ChandrasPyrohelix extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{1}{R}");
|
||||
|
||||
// Chandra's Pyrohelix deals 2 damage divided as you choose among one or two targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(2));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public final class Conflagrate extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{X}{X}{R}");
|
||||
|
||||
// Conflagrate deals X damage divided as you choose among any number of targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(GetXValue.instance));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(GetXValue.instance));
|
||||
|
||||
// Flashback-{R}{R}, Discard X cards.
|
||||
|
|
|
|||
|
|
@ -38,10 +38,7 @@ public final class Contagion extends CardImpl {
|
|||
|
||||
// Distribute two -2/-1 counters among one or two target creatures.
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2));
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(
|
||||
CounterType.M2M1, 2,
|
||||
"one or two target creatures"
|
||||
));
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.M2M1));
|
||||
}
|
||||
|
||||
private Contagion(final Contagion card) {
|
||||
|
|
|
|||
|
|
@ -31,15 +31,9 @@ public final class CourtOfGarenbrig extends CardImpl {
|
|||
this.addAbility(new EntersBattlefieldTriggeredAbility(new BecomesMonarchSourceEffect()).addHint(MonarchHint.instance));
|
||||
|
||||
// At the beginning of your upkeep, distribute two +1/+1 counters among up to two target creatures. Then if you're the monarch, double the number of +1/+1 counters on each creature you control.
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(
|
||||
new DistributeCountersEffect(
|
||||
2, "up to two target creatures"
|
||||
)
|
||||
);
|
||||
TargetCreaturePermanentAmount target = new TargetCreaturePermanentAmount(2);
|
||||
target.setMinNumberOfTargets(0);
|
||||
target.setMaxNumberOfTargets(2);
|
||||
ability.addTarget(target);
|
||||
Ability ability = new BeginningOfUpkeepTriggeredAbility(new DistributeCountersEffect()
|
||||
.setText("distribute two +1/+1 counters among up to two target creatures"));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(2, 0, 2));
|
||||
ability.addEffect(new ConditionalOneShotEffect(
|
||||
new DoubleCounterOnEachPermanentEffect(CounterType.P1P1, StaticFilters.FILTER_CONTROLLED_CREATURE),
|
||||
MonarchIsSourceControllerCondition.instance
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
|
|
@ -19,10 +18,7 @@ public final class DefendTheCelestus extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{G}{G}");
|
||||
|
||||
// Distribute three +1/+1 counters among one, two, or three target creatures you control.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(
|
||||
3,
|
||||
"one, two, or three target creatures you control"
|
||||
));
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(
|
||||
3, StaticFilters.FILTER_CONTROLLED_CREATURES
|
||||
));
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class DeftDismissal extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{3}{W}");
|
||||
|
||||
// Deft Dismissal deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_ATTACKING_OR_BLOCKING_CREATURES));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,11 +43,8 @@ public final class DragonlordAtarka extends CardImpl {
|
|||
this.addAbility(TrampleAbility.getInstance());
|
||||
|
||||
// When Dragonlord Atarka enters the battlefield, it deals 5 damage divided as you choose among any number of target creatures and/or planeswalkers your opponents control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect(5, "it"), false);
|
||||
TargetCreatureOrPlaneswalkerAmount target = new TargetCreatureOrPlaneswalkerAmount(5, filter);
|
||||
target.setMinNumberOfTargets(1);
|
||||
target.setMaxNumberOfTargets(5);
|
||||
ability.addTarget(target);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DamageMultiEffect("it"), false);
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalkerAmount(5, filter));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class Electrolyze extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{U}{R}");
|
||||
|
||||
// Electrolyze deals 2 damage divided as you choose among one or two targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(2));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2));
|
||||
// Draw a card.
|
||||
this.getSpellAbility().addEffect(new DrawCardSourceControllerEffect(1).concatBy("<br>"));
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@ import mage.cards.AdventureCard;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -37,14 +35,9 @@ public final class ElusiveOtter extends AdventureCard {
|
|||
|
||||
// Grove's Bounty
|
||||
// Distribute X +1/+1 counters among any number of target creatures you control.
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DistributeCountersEffect(
|
||||
CounterType.P1P1, GetXValue.instance,
|
||||
"any number of target creatures you control"
|
||||
));
|
||||
Target target = new TargetCreaturePermanentAmount(GetXValue.instance, StaticFilters.FILTER_CONTROLLED_CREATURES);
|
||||
target.setMinNumberOfTargets(0);
|
||||
target.setMaxNumberOfTargets(Integer.MAX_VALUE);
|
||||
this.getSpellCard().getSpellAbility().addTarget(target);
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(
|
||||
new TargetCreaturePermanentAmount(GetXValue.instance, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
|
||||
this.finalizeAdventure();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.abilities.effects.common.counter.DistributeCountersEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -19,7 +18,7 @@ public final class ElvenRite extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{1}{G}");
|
||||
|
||||
// Distribute two +1/+1 counters among one or two target creatures.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(2, "one or two target creatures"));
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.TimingRule;
|
||||
import mage.target.common.TargetAnyTargetAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -21,7 +20,7 @@ public final class Embolden extends CardImpl {
|
|||
public Embolden(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{W}");
|
||||
|
||||
// Prevent the next 4 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||
// Prevent the next 4 damage that would be dealt this turn to any number of targets, divided as you choose.
|
||||
this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 4));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4));
|
||||
|
||||
|
|
|
|||
|
|
@ -77,8 +77,7 @@ class FeastOfTheVictoriousDeadEffect extends OneShotEffect {
|
|||
if (player == null || game.getBattlefield().count(StaticFilters.FILTER_CONTROLLED_CREATURE, player.getId(), source, game) < 1) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanentAmount target = new TargetCreaturePermanentAmount(amount, StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
target.setMinNumberOfTargets(1);
|
||||
TargetPermanentAmount target = new TargetCreaturePermanentAmount(amount, 1, amount, StaticFilters.FILTER_CONTROLLED_CREATURE);
|
||||
target.withNotTarget(true);
|
||||
target.withChooseHint("to distribute " + amount + " counters");
|
||||
target.chooseTarget(outcome, player.getId(), source, game);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public final class FieryJustice extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{R}{G}{W}");
|
||||
|
||||
// Fiery Justice deals 5 damage divided as you choose among any number of targets. Target opponent gains 5 life.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(5));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(5));
|
||||
Effect effect = new GainLifeTargetEffect(5);
|
||||
effect.setTargetPointer(new SecondTargetPointer());
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class FightWithFire extends CardImpl {
|
|||
|
||||
// Fight with Fire deals 5 damage to target creature. If this spell was kicked, it deals 10 damage divided as you choose among any number of targets instead.<i> (Those targets can include players and planeswalkers.)</i>
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new DamageMultiEffect(10),
|
||||
new DamageMultiEffect(),
|
||||
new DamageTargetEffect(5),
|
||||
KickedCondition.ONCE,
|
||||
"{this} deals 5 damage to target creature. If this spell was kicked, "
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public final class FireAtWill extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{R/W}{R/W}{R/W}");
|
||||
|
||||
// Fire at Will deals 3 damage divided as you choose among one, two, or three target attacking or blocking creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_ATTACKING_OR_BLOCKING_CREATURES));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class FireCovenant extends CardImpl {
|
|||
|
||||
// Fire Covenant deals X damage divided as you choose among any number of target creatures.
|
||||
DynamicValue xValue = GetXValue.instance;
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class FireIce extends SplitCard {
|
|||
|
||||
// Fire
|
||||
// Fire deals 2 damage divided as you choose among one or two targets.
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new DamageMultiEffect(2, "Fire"));
|
||||
getLeftHalfCard().getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
getLeftHalfCard().getSpellAbility().addTarget(new TargetAnyTargetAmount(2));
|
||||
|
||||
// Ice
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public final class FlamesOfTheFirebrand extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.SORCERY},"{2}{R}");
|
||||
|
||||
// Flames of the Firebrand deals 3 damage divided as you choose among one, two, or three targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public final class Flameshot extends CardImpl {
|
|||
this.addAbility(new AlternativeCostSourceAbility(new DiscardTargetCost(new TargetCardInHand(filter))));
|
||||
|
||||
// Flameshot deals 3 damage divided as you choose among one, two, or three target creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public final class ForkedBolt extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{R}");
|
||||
|
||||
// Forked Bolt deals 2 damage divided as you choose among one or two targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(2));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(2));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.abilities.effects.common.DamageMultiEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.target.Target;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -19,9 +18,8 @@ public final class ForkedLightning extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{3}{R}");
|
||||
|
||||
// Forked Lightning deals 4 damage divided as you choose among one, two, or three target creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(4)
|
||||
.setText("{this} deals 4 damage divided as you choose among one, two, or three target creatures"));
|
||||
Target target=new TargetCreaturePermanentAmount(4);target.setMaxNumberOfTargets(3);this.getSpellAbility().addTarget(target);
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(4, 1, 3));
|
||||
}
|
||||
|
||||
private ForkedLightning(final ForkedLightning card) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public final class Fury extends CardImpl {
|
|||
|
||||
// When Fury enters the battlefield, it deals 4 damage divided as you choose among any number of target creatures and/or planeswalkers.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(
|
||||
new DamageMultiEffect(4, "it")
|
||||
new DamageMultiEffect("it")
|
||||
);
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalkerAmount(4));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public final class GangOfDevils extends CardImpl {
|
|||
this.toughness = new MageInt(3);
|
||||
|
||||
// When Gang of Devils dies, it deals 3 damage divided as you choose among one, two, or three targets.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DamageMultiEffect(3, "it"));
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DamageMultiEffect("it"));
|
||||
ability.addTarget(new TargetAnyTargetAmount(3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ public final class GhiredsBelligerence extends CardImpl {
|
|||
|
||||
class GhiredsBelligerenceEffect extends OneShotEffect {
|
||||
|
||||
private static final DamageMultiEffect effect = new DamageMultiEffect(GetXValue.instance);
|
||||
private static final DamageMultiEffect effect = new DamageMultiEffect();
|
||||
|
||||
GhiredsBelligerenceEffect() {
|
||||
super(Outcome.Benefit);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
|
@ -32,9 +31,7 @@ public final class GlintWeaver extends CardImpl {
|
|||
this.addAbility(ReachAbility.getInstance());
|
||||
|
||||
// When Glint Weaver enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures, then you gain life equal to the greatest toughness among creatures you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(
|
||||
3, "one, two, or three target creatures"
|
||||
));
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect());
|
||||
ability.addEffect(new GainLifeEffect(GreatestToughnessAmongControlledCreaturesValue.instance)
|
||||
.setText(", then you gain life equal to the greatest toughness among creatures you control"));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public final class HailOfArrows extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{X}{W}");
|
||||
|
||||
// Hail of Arrows deals X damage divided as you choose among any number of target attacking creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(GetXValue.instance));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(GetXValue.instance, StaticFilters.FILTER_ATTACKING_CREATURES));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class IgniteDisorder extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{R}");
|
||||
|
||||
// Ignite Disorder deals 3 damage divided as you choose among one, two, or three target white and/or blue creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(3, filter));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public final class ImpactResonance extends CardImpl {
|
|||
|
||||
// Impact Resonance deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn.
|
||||
DynamicValue xValue = GreatestAmountOfDamageDealtValue.instance;
|
||||
Effect effect = new DamageMultiEffect(xValue);
|
||||
Effect effect = new DamageMultiEffect();
|
||||
effect.setText("{this} deals X damage divided as you choose among any number of target creatures, where X is the greatest amount of damage dealt by a source to a permanent or player this turn");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue));
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public final class InfernalHarvest extends CardImpl {
|
|||
this.getSpellAbility().addCost(new InfernalHarvestAdditionalCost());
|
||||
|
||||
// Infernal Harvest deals X damage divided as you choose among any number of target creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(GetXValue.instance));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(GetXValue.instance));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class InfernoTitan extends CardImpl {
|
|||
this.addAbility(new SimpleActivatedAbility(new BoostSourceEffect(1, 0, Duration.EndOfTurn), new ColoredManaCost(ColoredManaSymbol.R)));
|
||||
|
||||
// Whenever Inferno Titan enters the battlefield or attacks, it deals 3 damage divided as you choose among one, two, or three targets.
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageMultiEffect(3, "it"));
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(new DamageMultiEffect("it"));
|
||||
ability.addTarget(new TargetAnyTargetAmount(3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class InvokeJusticeEffect extends OneShotEffect {
|
|||
if (!game.getBattlefield().contains(filter, source, game, 1)) {
|
||||
return false;
|
||||
}
|
||||
TargetPermanentAmount target = new TargetPermanentAmount(4, filter);
|
||||
TargetPermanentAmount target = new TargetPermanentAmount(4, 0, filter);
|
||||
target.withNotTarget(true);
|
||||
target.chooseTarget(outcome, player.getId(), source, game);
|
||||
for (UUID targetId : target.getTargets()) {
|
||||
|
|
|
|||
|
|
@ -7,9 +7,8 @@ import mage.abilities.keyword.CraftAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -23,12 +22,8 @@ public final class JadeSeedstones extends CardImpl {
|
|||
this.secondSideCardClazz = mage.cards.j.JadeheartAttendant.class;
|
||||
|
||||
// When Jade Seedstones enters the battlefield, distribute three +1/+1 counters among one, two, or three target creatures you control.
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect(
|
||||
3, "one, two, or three target creatures you control"
|
||||
));
|
||||
TargetPermanentAmount target = new TargetPermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES);
|
||||
target.setMinNumberOfTargets(1);
|
||||
ability.addTarget(target);
|
||||
Ability ability = new EntersBattlefieldTriggeredAbility(new DistributeCountersEffect());
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
this.addAbility(ability);
|
||||
|
||||
// Craft with creature {5}{G}{G}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class JawsOfStone extends CardImpl {
|
|||
|
||||
// Jaws of Stone deals X damage divided as you choose among any number of targets, where X is the number of Mountains you control as you cast this spell.
|
||||
PermanentsOnBattlefieldCount mountains = new PermanentsOnBattlefieldCount(filter, null);
|
||||
Effect effect = new DamageMultiEffect(mountains);
|
||||
Effect effect = new DamageMultiEffect();
|
||||
effect.setText(rule);
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(mountains));
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.SuperType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -33,7 +32,7 @@ public final class JuganTheRisingStar extends CardImpl {
|
|||
// Flying
|
||||
this.addAbility(FlyingAbility.getInstance());
|
||||
// When Jugan, the Rising Star dies, you may distribute five +1/+1 counters among any number of target creatures.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(5, "any number of target creatures"), true);
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(), true);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(5));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetAnyTargetAmount;
|
||||
|
||||
/**
|
||||
|
|
@ -29,7 +28,7 @@ public final class KuldothaFlamefiend extends CardImpl {
|
|||
|
||||
// When Kuldotha Flamefiend enters the battlefield, you may sacrifice an artifact. If you do, Kuldotha Flamefiend deals 4 damage divided as you choose among any number of targets.
|
||||
EntersBattlefieldTriggeredAbility ability =
|
||||
new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DamageMultiEffect(4), new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN)), false);
|
||||
new EntersBattlefieldTriggeredAbility(new DoIfCostPaid(new DamageMultiEffect(), new SacrificeTargetCost(StaticFilters.FILTER_CONTROLLED_PERMANENT_ARTIFACT_AN)), false);
|
||||
ability.addTarget(new TargetAnyTargetAmount(4));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,10 +15,8 @@ import mage.abilities.keyword.LifelinkAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.game.Game;
|
||||
import mage.target.TargetAmount;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
import mage.watchers.common.PlayerGainedLifeWatcher;
|
||||
|
||||
|
|
@ -44,18 +42,13 @@ public final class LathielTheBounteousDawn extends CardImpl {
|
|||
|
||||
// At the beginning of each end step, if you gained life this turn, distribute up to that many +1/+1 counters among any number of other target creatures.
|
||||
Ability ability = new ConditionalInterveningIfTriggeredAbility(
|
||||
new BeginningOfEndStepTriggeredAbility(TargetController.ANY, new DistributeCountersEffect(
|
||||
1, ""
|
||||
), false),
|
||||
new BeginningOfEndStepTriggeredAbility(TargetController.ANY, new DistributeCountersEffect(), false),
|
||||
condition, "At the beginning of each end step, if you gained life this turn, " +
|
||||
"distribute up to that many +1/+1 counters among any number of other target creatures."
|
||||
);
|
||||
TargetAmount target = new TargetCreaturePermanentAmount(
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(
|
||||
LathielTheBounteousDawnValue.instance,
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE
|
||||
);
|
||||
target.setMinNumberOfTargets(0);
|
||||
ability.addTarget(target);
|
||||
StaticFilters.FILTER_CONTROLLED_ANOTHER_CREATURE));
|
||||
this.addAbility(ability.addHint(LathielTheBounteousDawnValue.getHint()), new PlayerGainedLifeWatcher());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Outcome;
|
||||
import mage.constants.SubType;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.target.Target;
|
||||
|
|
@ -57,7 +56,8 @@ enum LivingInfernoAdjuster implements TargetAdjuster {
|
|||
Permanent sourcePermanent = game.getPermanentOrLKIBattlefield(ability.getSourceId());
|
||||
if (sourcePermanent != null) {
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(sourcePermanent.getPower().getValue()));
|
||||
int power = sourcePermanent.getPower().getValue();
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(power, 0, power));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import mage.Mana;
|
|||
import mage.abilities.Ability;
|
||||
import mage.abilities.LoyaltyAbility;
|
||||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.common.GreatestPowerAmongControlledCreaturesValue;
|
||||
import mage.abilities.effects.OneShotEffect;
|
||||
import mage.abilities.effects.common.CreateTokenEffect;
|
||||
|
|
@ -51,11 +50,10 @@ public class LukkaBoundToRuin extends CardImpl {
|
|||
|
||||
// −4: Lukka deals X damage divided as you choose among any number of target creatures and/or planeswalkers,
|
||||
// where X is the greatest power among creatures you controlled as you activated this ability.
|
||||
DynamicValue xValue = GreatestPowerAmongControlledCreaturesValue.instance;
|
||||
DamageMultiEffect damageMultiEffect = new DamageMultiEffect(xValue);
|
||||
DamageMultiEffect damageMultiEffect = new DamageMultiEffect();
|
||||
damageMultiEffect.setText("Lukka deals X damage divided as you choose " +
|
||||
"among any number of target creatures and/or planeswalkers, " +
|
||||
"where X is the greatest power among creatures you controlled as you activated this ability.");
|
||||
"where X is the greatest power among creatures you control as you activate this ability.");
|
||||
ability = new LoyaltyAbility(damageMultiEffect, -4);
|
||||
ability.setTargetAdjuster(LukkaBoundToRuinAdjuster.instance);
|
||||
this.addAbility(ability);
|
||||
|
|
@ -135,9 +133,6 @@ enum LukkaBoundToRuinAdjuster implements TargetAdjuster {
|
|||
// Maximum targets is equal to the damage - as each target need to be assigned at least 1 damage
|
||||
ability.getTargets().clear();
|
||||
int xValue = GreatestPowerAmongControlledCreaturesValue.instance.calculate(game, ability, null);
|
||||
TargetCreatureOrPlaneswalkerAmount targetCreatureOrPlaneswalkerAmount = new TargetCreatureOrPlaneswalkerAmount(xValue);
|
||||
targetCreatureOrPlaneswalkerAmount.setMinNumberOfTargets(0);
|
||||
targetCreatureOrPlaneswalkerAmount.setMaxNumberOfTargets(xValue);
|
||||
ability.addTarget(targetCreatureOrPlaneswalkerAmount);
|
||||
ability.addTarget(new TargetCreatureOrPlaneswalkerAmount(xValue, 0, xValue));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ public final class MagicMissile extends CardImpl {
|
|||
this.addAbility(new CantBeCounteredSourceAbility().setRuleAtTheTop(true));
|
||||
|
||||
// Magic Missile deals 3 damage divided as you choose among one, two, or three targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(3));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class MagmaOpus extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{6}{U}{R}");
|
||||
|
||||
// Magma Opus deals 4 damage divided as you choose among any number of targets. Tap two target permanents. Create a 4/4 blue and red Elemental creature token. Draw two cards.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(4));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4).withChooseHint("damage"));
|
||||
this.getSpellAbility().addEffect(new TapTargetEffect("tap two target permanents").setTargetPointer(new SecondTargetPointer()));
|
||||
this.getSpellAbility().addTarget(new TargetPermanent(2, StaticFilters.FILTER_PERMANENTS).withChooseHint("tap"));
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class MagmaticCore extends CardImpl {
|
|||
// At the beginning of your end step, Magmatic Core deals X damage divided as you choose among any number of target creatures, where X is the number of age counters on it.
|
||||
DynamicValue value = new CountersSourceCount(CounterType.AGE);
|
||||
Ability ability = new BeginningOfEndStepTriggeredAbility(
|
||||
new DamageMultiEffect(value)
|
||||
new DamageMultiEffect()
|
||||
.setText("{this} deals X damage divided as you choose "
|
||||
+ "among any number of target creatures,"
|
||||
+ " where X is the number of age counters on it.")
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ public final class MeteorShower extends CardImpl {
|
|||
|
||||
// Meteor Shower deals X plus 1 damage divided as you choose among any number of targets.
|
||||
DynamicValue xValue = new IntPlusDynamicValue(1, GetXValue.instance);
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect()
|
||||
.setText("{this} deals X plus 1 damage divided as you choose among any number of targets"));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,10 +19,11 @@ public final class MeteorSwarm extends CardImpl {
|
|||
|
||||
// Meteor Swarm deals 8 damage divided as you choose among X target creatures and/or planeswalkers.
|
||||
this.getSpellAbility().addEffect(
|
||||
new DamageMultiEffect(8).
|
||||
new DamageMultiEffect().
|
||||
setText("{this} deals 8 damage divided as you choose among X target creatures and/or planeswalkers.")
|
||||
);
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalkerAmount(8));
|
||||
// Minimum number of targets will be overridden to X by the adjuster
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalkerAmount(8, 1, 8));
|
||||
this.getSpellAbility().setTargetAdjuster(new XTargetsCountAdjuster());
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class MoggMob extends CardImpl {
|
|||
|
||||
// Sacrifice Mogg Mob: It deals 3 damage divided as you choose among one, two, or three targets.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new DamageMultiEffect(3, "it"), new SacrificeSourceCost()
|
||||
new DamageMultiEffect("it"), new SacrificeSourceCost()
|
||||
);
|
||||
ability.addTarget(new TargetAnyTargetAmount(3));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public final class MonstrousOnslaught extends CardImpl {
|
|||
|
||||
// Monstrous Onslaught deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast Monstrous Onslaught.
|
||||
DynamicValue xValue = GreatestPowerAmongControlledCreaturesValue.instance;
|
||||
Effect effect = new DamageMultiEffect(xValue);
|
||||
Effect effect = new DamageMultiEffect();
|
||||
effect.setText("{this} deals X damage divided as you choose among any number of target creatures, where X is the greatest power among creatures you control as you cast this spell");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue));
|
||||
|
|
|
|||
|
|
@ -44,10 +44,8 @@ public final class MyojinOfToweringMight extends CardImpl {
|
|||
), new CastFromHandWatcher());
|
||||
|
||||
// Remove an indestructible counter from Myojin of Towering Might: Distribute eight +1/+1 counters among any number of target creatures you control. They gain trample until end of turn.
|
||||
Ability ability = new SimpleActivatedAbility(new DistributeCountersEffect(
|
||||
8,
|
||||
"any number of target creatures you control"
|
||||
), new RemoveCountersSourceCost(CounterType.INDESTRUCTIBLE.createInstance()));
|
||||
Ability ability = new SimpleActivatedAbility(new DistributeCountersEffect(),
|
||||
new RemoveCountersSourceCost(CounterType.INDESTRUCTIBLE.createInstance()));
|
||||
ability.addEffect(new GainAbilityTargetEffect(
|
||||
TrampleAbility.getInstance(), Duration.EndOfTurn
|
||||
).setText("They gain trample until end of turn"));
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import mage.abilities.effects.common.DamageMultiEffect;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.ColoredManaSymbol;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Outcome;
|
||||
import mage.game.Game;
|
||||
|
|
@ -34,7 +33,7 @@ public final class MythosOfVadrok extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{R}{R}");
|
||||
|
||||
// Mythos of Vadrok deals 5 damage divided as you choose among any number of target creatures and/or planeswalkers. If {W}{U} was spent to cast this spell, until your next turn, those permanents can't attack or block and their activated abilities can't be activated.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(5));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreatureOrPlaneswalkerAmount(5));
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new MythosOfVadrokEffect(), condition, "If {W}{U} was spent to cast this spell, " +
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public final class NahirisSacrifice extends CardImpl {
|
|||
this.getSpellAbility().addCost(new SacrificeXManaValueCost(filter,true));
|
||||
|
||||
// Nahiri’s Sacrifice deals X damage divided as you choose among any number of target creatures.
|
||||
Effect effect = new DamageMultiEffect(GetXValue.instance);
|
||||
Effect effect = new DamageMultiEffect();
|
||||
effect.setText("{this} deals X damage divided as you choose among any number of target creatures.");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(GetXValue.instance));
|
||||
|
|
|
|||
|
|
@ -13,11 +13,10 @@ import mage.abilities.keyword.PartnerAbility;
|
|||
import mage.cards.CardImpl;
|
||||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.*;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.FilterPermanent;
|
||||
import mage.game.Game;
|
||||
import mage.players.Player;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -88,10 +87,10 @@ class NumaJoragaChieftainEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
ReflexiveTriggeredAbility ability = new ReflexiveTriggeredAbility(
|
||||
new DistributeCountersEffect(costX, ""),
|
||||
new DistributeCountersEffect(),
|
||||
false, "distribute " + costX + " +1/+1 counters among any number of target Elves"
|
||||
);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(costX, filter));
|
||||
ability.addTarget(new TargetPermanentAmount(costX, 0, filter));
|
||||
game.fireReflexiveTriggeredAbility(ability, source);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public final class OmnivorousFlytrap extends CardImpl {
|
|||
|
||||
// Delirium -- Whenever Omnivorous Flytrap enters or attacks, if there are four or more card types among cards in your graveyard, distribute two +1/+1 counters among one or two target creatures. Then if there are six or more card types among cards in your graveyard, double the number of +1/+1 counters on those creatures.
|
||||
Ability ability = new EntersBattlefieldOrAttacksSourceTriggeredAbility(
|
||||
new DistributeCountersEffect(CounterType.P1P1, 2, "one or two target creatures"))
|
||||
new DistributeCountersEffect())
|
||||
.withInterveningIf(DeliriumCondition.instance);
|
||||
ability.addEffect(new ConditionalOneShotEffect(
|
||||
new OmnivorousFlytrapEffect(),
|
||||
|
|
|
|||
|
|
@ -50,12 +50,7 @@ public final class OnduKnotmaster extends AdventureCard {
|
|||
|
||||
// Throw a Line
|
||||
// Distribute two +1/+1 counters among one or two target creatures.
|
||||
this.getSpellCard().getSpellAbility().addEffect(
|
||||
new DistributeCountersEffect(
|
||||
2,
|
||||
"one or two target creatures"
|
||||
)
|
||||
);
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2));
|
||||
|
||||
this.finalizeAdventure();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public final class OrcaSiegeDemon extends CardImpl {
|
|||
this.addAbility(new DiesCreatureTriggeredAbility(new AddCountersSourceEffect(CounterType.P1P1.createInstance()), false, true));
|
||||
|
||||
// When Orca dies, it deals damage equal to its power divided as you choose among any number of targets.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DamageMultiEffect(SourcePermanentPowerValue.NOT_NEGATIVE)
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DamageMultiEffect()
|
||||
.setText("it deals damage equal to its power divided as you choose among any number of targets."));
|
||||
ability.addTarget(new TargetAnyTargetAmount(SourcePermanentPowerValue.NOT_NEGATIVE));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.SubType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
|
|
@ -40,14 +39,9 @@ public final class PicnicRuiner extends AdventureCard {
|
|||
|
||||
// Stolen Goodies
|
||||
// Distribute three +1/+1 counters among any number of target creatures you control.
|
||||
this.getSpellCard().getSpellAbility().addEffect(
|
||||
new DistributeCountersEffect(
|
||||
3,
|
||||
"any number of target creatures you control"
|
||||
)
|
||||
);
|
||||
this.getSpellCard().getSpellAbility().addEffect(new DistributeCountersEffect());
|
||||
this.getSpellCard().getSpellAbility().addTarget(
|
||||
new TargetCreaturePermanentAmount(3, StaticFilters.FILTER_CONTROLLED_CREATURES)
|
||||
new TargetCreaturePermanentAmount(3, 0, 3, StaticFilters.FILTER_CONTROLLED_CREATURES)
|
||||
);
|
||||
|
||||
this.finalizeAdventure();
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ public final class PollenRemedy extends CardImpl {
|
|||
// Kicker-Sacrifice a land.
|
||||
this.addAbility(new KickerAbility(new SacrificeTargetCost(StaticFilters.FILTER_LAND)));
|
||||
|
||||
// Prevent the next 3 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||
// Prevent the next 3 damage that would be dealt this turn to any number of targets, divided as you choose.
|
||||
// If Pollen Remedy was kicked, prevent the next 6 damage this way instead.
|
||||
Effect effect = new ConditionalReplacementEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 6),
|
||||
KickedCondition.ONCE, new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 3));
|
||||
effect.setText("Prevent the next 3 damage that would be dealt this turn to any number of targets, divided as you choose. If this spell was kicked, prevent the next 6 damage this way instead.");
|
||||
this.getSpellAbility().addEffect(effect);
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(3, 0, 3));
|
||||
this.getSpellAbility().setTargetAdjuster(new ConditionalTargetAdjuster(KickedCondition.ONCE,
|
||||
new TargetAnyTargetAmount(6)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ enum PolukranosWorldEaterAdjuster implements TargetAdjuster {
|
|||
public void adjustTargets(Ability ability, Game game) {
|
||||
int xValue = ((BecomesMonstrousSourceTriggeredAbility) ability).getMonstrosityValue();
|
||||
ability.getTargets().clear();
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(xValue, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(xValue, 0, xValue, StaticFilters.FILTER_OPPONENTS_PERMANENT_CREATURE));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public final class Pyrokinesis extends CardImpl {
|
|||
this.addAbility(new AlternativeCostSourceAbility(new ExileFromHandCost(new TargetCardInHand(filter))));
|
||||
|
||||
// Pyrokinesis deals 4 damage divided as you choose among any number of target creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(4));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(4));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public final class Pyrotechnics extends CardImpl {
|
|||
|
||||
|
||||
// Pyrotechnics deals 4 damage divided as you choose among any number of targets.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(4));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(4));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -39,10 +39,8 @@ public final class QuirionBeastcaller extends CardImpl {
|
|||
|
||||
// When Quirion Beastcaller dies, distribute X +1/+1 counters among any number of target creatures you control, where X is the number of +1/+1 counters on Quirion Beastcaller.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(
|
||||
// Amount here is only used for text generation. Real amount is set in target.
|
||||
1, "any number of target creatures you control"
|
||||
).setText("distribute X +1/+1 counters among any number of target creatures you control, where X is the number of +1/+1 counters on {this}"));
|
||||
ability.addTarget(new TargetPermanentAmount(new CountersSourceCount(CounterType.P1P1), StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(new CountersSourceCount(CounterType.P1P1), StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ public final class RalCallerOfStorms extends CardImpl {
|
|||
));
|
||||
|
||||
// -2: Ral, Caller of Storms deals 3 damage divided as you choose among one, two, or three targets.
|
||||
Ability ability = new LoyaltyAbility(new DamageMultiEffect(3), -2);
|
||||
Ability ability = new LoyaltyAbility(new DamageMultiEffect(), -2);
|
||||
ability.addTarget(new TargetAnyTargetAmount(3));
|
||||
this.addAbility(ability);
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public final class RalLeylineProdigy extends CardImpl {
|
|||
this.addAbility(new LoyaltyAbility(new RalLeylineProdigyCostReductionEffect(), 1));
|
||||
|
||||
// -2: Ral deals 2 damage divided as you choose among one or two targets. Draw a card if you control a blue permanent other than Ral.
|
||||
Ability ability = new LoyaltyAbility(new DamageMultiEffect(2), -2);
|
||||
Ability ability = new LoyaltyAbility(new DamageMultiEffect(), -2);
|
||||
ability.addTarget(new TargetAnyTargetAmount(2));
|
||||
ability.addEffect(new ConditionalOneShotEffect(
|
||||
new DrawCardSourceControllerEffect(1),
|
||||
|
|
|
|||
|
|
@ -73,13 +73,13 @@ class RavenousGigantotheriumAbility extends EntersBattlefieldTriggeredAbility {
|
|||
}
|
||||
int power = Math.max(permanent.getPower().getValue(), 0);
|
||||
this.getEffects().clear();
|
||||
this.addEffect(new DamageMultiEffect(power));
|
||||
this.addEffect(new DamageMultiEffect());
|
||||
this.addEffect(new RavenousGigantotheriumEffect());
|
||||
this.getTargets().clear();
|
||||
if (power < 1) {
|
||||
return true;
|
||||
}
|
||||
this.addTarget(new TargetCreaturePermanentAmount(power));
|
||||
this.addTarget(new TargetCreaturePermanentAmount(power, 0, power));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public final class Remedy extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{1}{W}");
|
||||
|
||||
|
||||
// Prevent the next 5 damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose.
|
||||
// Prevent the next 5 damage that would be dealt this turn to any number of targets, divided as you choose.
|
||||
this.getSpellAbility().addEffect(new PreventDamageToTargetMultiAmountEffect(Duration.EndOfTurn, 5));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(5));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ public final class RockSlide extends CardImpl {
|
|||
|
||||
// Rock Slide deals X damage divided as you choose among any number of target attacking or blocking creatures without flying.
|
||||
DynamicValue xValue = GetXValue.instance;
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(xValue, filter));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class RoilsRetribution extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{3}{W}{W}");
|
||||
|
||||
// Roil's Retribution deals 5 damage divided as you choose among any number of target attacking or blocking creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(5));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(5, StaticFilters.FILTER_ATTACKING_OR_BLOCKING_CREATURES));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public final class RollingThunder extends CardImpl {
|
|||
|
||||
// Rolling Thunder deals X damage divided as you choose among any number of targets.
|
||||
DynamicValue xValue = GetXValue.instance;
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(xValue));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(xValue));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ public final class SamutTheTested extends CardImpl {
|
|||
this.addAbility(ability);
|
||||
|
||||
// -2: Samut, the Tested deals 2 damage divided as you choose among one or two targets.
|
||||
effect = new DamageMultiEffect(2);
|
||||
effect = new DamageMultiEffect();
|
||||
ability = new LoyaltyAbility(effect, -2);
|
||||
ability.addTarget(new TargetAnyTargetAmount(2));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.constants.Zone;
|
||||
import mage.counters.CounterType;
|
||||
import mage.target.common.TargetAnyTargetAmount;
|
||||
|
||||
|
|
@ -22,7 +21,7 @@ import mage.target.common.TargetAnyTargetAmount;
|
|||
*/
|
||||
public final class SerrasHymn extends CardImpl {
|
||||
|
||||
private static final String rule = "Prevent the next X damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose, where X is the number of verse counters on {this}.";
|
||||
private static final String rule = "Prevent the next X damage that would be dealt this turn to any number of targets, divided as you choose, where X is the number of verse counters on {this}.";
|
||||
|
||||
public SerrasHymn(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.ENCHANTMENT}, "{W}");
|
||||
|
|
@ -31,7 +30,7 @@ public final class SerrasHymn extends CardImpl {
|
|||
this.addAbility(new BeginningOfUpkeepTriggeredAbility(
|
||||
new AddCountersSourceEffect(CounterType.VERSE.createInstance(), true), true));
|
||||
|
||||
// Sacrifice Serra's Hymn: Prevent the next X damage that would be dealt this turn to any number of target creatures and/or players, divided as you choose, where X is the number of verse counters on Serra's Hymn.
|
||||
// Sacrifice Serra's Hymn: Prevent the next X damage that would be dealt this turn to any number of targets, divided as you choose, where X is the number of verse counters on Serra's Hymn.
|
||||
Ability ability = new SimpleActivatedAbility(
|
||||
new PreventDamageToTargetMultiAmountEffect(
|
||||
Duration.EndOfTurn,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ public final class ShamblingSwarm extends CardImpl {
|
|||
|
||||
// When Shambling Swarm dies, distribute three -1/-1 counters among one, two, or three target creatures. For each -1/-1 counter you put on a creature this way, remove a -1/-1 counter from that creature at the beginning of the next end step.
|
||||
Ability ability = new DiesSourceTriggeredAbility(new DistributeCountersEffect(
|
||||
CounterType.M1M1, 3, "one, two, or three target creatures"
|
||||
CounterType.M1M1
|
||||
).withRemoveAtEndOfTurn(), false);
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
||||
this.addAbility(ability);
|
||||
|
|
|
|||
|
|
@ -5,9 +5,6 @@ import mage.abilities.common.AsEntersBattlefieldAbility;
|
|||
import mage.abilities.condition.Condition;
|
||||
import mage.abilities.costs.common.PayLifeCost;
|
||||
import mage.abilities.decorator.ConditionalOneShotEffect;
|
||||
import mage.abilities.dynamicvalue.DynamicValue;
|
||||
import mage.abilities.dynamicvalue.MultipliedValue;
|
||||
import mage.abilities.dynamicvalue.common.GetXValue;
|
||||
import mage.abilities.effects.common.DamageMultiEffect;
|
||||
import mage.abilities.effects.common.TapSourceUnlessPaysEffect;
|
||||
import mage.abilities.mana.RedManaAbility;
|
||||
|
|
@ -28,8 +25,6 @@ import java.util.UUID;
|
|||
*/
|
||||
public final class ShatterskullSmashing extends ModalDoubleFacedCard {
|
||||
|
||||
private static final DynamicValue xValue = new MultipliedValue(GetXValue.instance, 2);
|
||||
|
||||
public ShatterskullSmashing(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo,
|
||||
new CardType[]{CardType.SORCERY}, new SubType[]{}, "{X}{R}{R}",
|
||||
|
|
@ -42,7 +37,7 @@ public final class ShatterskullSmashing extends ModalDoubleFacedCard {
|
|||
|
||||
// Shatterskull Smashing deals X damage divided as you choose among up to two target creatures and/or planeswalkers. If X is 6 or more, Shatterskull Smashing deals twice X damage divided as you choose among them instead.
|
||||
this.getLeftHalfCard().getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new DamageMultiEffect(xValue), new DamageMultiEffect(GetXValue.instance),
|
||||
new DamageMultiEffect(), new DamageMultiEffect(),
|
||||
ShatterskullSmashingCondition.instance, "{this} deals X damage divided as you choose " +
|
||||
"among up to two target creatures and/or planeswalkers. If X is 6 or more, " +
|
||||
"{this} deals twice X damage divided as you choose among them instead."
|
||||
|
|
@ -90,12 +85,10 @@ enum ShatterskullSmashingAdjuster implements TargetAdjuster {
|
|||
ability.getTargets().clear();
|
||||
TargetAmount target;
|
||||
if (CardUtil.getSourceCostsTag(game, ability, "X", 0) >= 6) {
|
||||
target = new TargetCreatureOrPlaneswalkerAmount(2 * CardUtil.getSourceCostsTag(game, ability, "X", 0));
|
||||
target = new TargetCreatureOrPlaneswalkerAmount(2 * CardUtil.getSourceCostsTag(game, ability, "X", 0), 0, 2);
|
||||
} else {
|
||||
target = new TargetCreatureOrPlaneswalkerAmount(CardUtil.getSourceCostsTag(game, ability, "X", 0));
|
||||
target = new TargetCreatureOrPlaneswalkerAmount(CardUtil.getSourceCostsTag(game, ability, "X", 0), 0, 2);
|
||||
}
|
||||
target.setMinNumberOfTargets(0);
|
||||
target.setMaxNumberOfTargets(2);
|
||||
ability.addTarget(target);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public final class SkarrganHellkite extends CardImpl {
|
|||
|
||||
// {3}{R}: Skarrgan Hellkite deals 2 damage divided as you choose among one or two targets. Activate this ability only if Skarrgan Hellkite has a +1/+1 counter on it.
|
||||
Ability ability = new ConditionalActivatedAbility(
|
||||
Zone.BATTLEFIELD, new DamageMultiEffect(2),
|
||||
Zone.BATTLEFIELD, new DamageMultiEffect(),
|
||||
new ManaCostsImpl<>("{3}{R}"), new SourceHasCounterCondition(CounterType.P1P1),
|
||||
"{3}{R}: {this} deals 2 damage divided as you choose among one or two targets. " +
|
||||
"Activate only if {this} has a +1/+1 counter on it."
|
||||
|
|
|
|||
|
|
@ -12,9 +12,7 @@ import mage.cards.CardSetInfo;
|
|||
import mage.constants.CardType;
|
||||
import mage.constants.SubType;
|
||||
import mage.filter.common.FilterControlledLandPermanent;
|
||||
import mage.target.common.TargetControlledPermanent;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
import mage.target.common.TargetSacrifice;
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -38,7 +36,7 @@ public final class SkirkVolcanist extends CardImpl {
|
|||
this.addAbility(new MorphAbility(this, new SacrificeTargetCost(2, filter)));
|
||||
|
||||
// When Skirk Volcanist is turned face up, it deals 3 damage divided as you choose among one, two, or three target creatures.
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageMultiEffect(3, "it"));
|
||||
Ability ability = new TurnedFaceUpSourceTriggeredAbility(new DamageMultiEffect("it"));
|
||||
ability.addTarget(new TargetCreaturePermanentAmount(3));
|
||||
this.addAbility(ability);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public final class SplendidAgony extends CardImpl {
|
|||
super(ownerId, setInfo, new CardType[]{CardType.INSTANT}, "{2}{B}");
|
||||
|
||||
// Distribute two -1/-1 counters among one or two target creatures.
|
||||
getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.M1M1, 2, "one or two target creatures"));
|
||||
getSpellAbility().addEffect(new DistributeCountersEffect(CounterType.M1M1));
|
||||
getSpellAbility().addTarget(new TargetCreaturePermanentAmount(2));
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ public final class SpreadingFlames extends CardImpl {
|
|||
super(ownerId,setInfo,new CardType[]{CardType.INSTANT},"{6}{R}");
|
||||
|
||||
// Spreading Flames deals 6 damage divided as you choose among any number of target creatures.
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect(6));
|
||||
this.getSpellAbility().addEffect(new DamageMultiEffect());
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(6));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,8 @@ import mage.cards.CardImpl;
|
|||
import mage.cards.CardSetInfo;
|
||||
import mage.constants.CardType;
|
||||
import mage.constants.Duration;
|
||||
import mage.counters.CounterType;
|
||||
import mage.filter.StaticFilters;
|
||||
import mage.target.common.TargetCreaturePermanentAmount;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -23,15 +21,10 @@ public final class StormTheSeedcore extends CardImpl {
|
|||
public StormTheSeedcore(UUID ownerId, CardSetInfo setInfo) {
|
||||
super(ownerId, setInfo, new CardType[]{CardType.SORCERY}, "{2}{G}{G}");
|
||||
|
||||
// Distribute four +1/+1 counter among up to four target creatures you control. Creatures you control gain vigilance and trample until end of turn.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect(
|
||||
4,
|
||||
"up to four target creatures you control"
|
||||
));
|
||||
TargetPermanentAmount target = new TargetCreaturePermanentAmount(4, StaticFilters.FILTER_CONTROLLED_CREATURES);
|
||||
target.setMinNumberOfTargets(0);
|
||||
target.setMaxNumberOfTargets(4);
|
||||
this.getSpellAbility().addTarget(target);
|
||||
// Distribute four +1/+1 counters among up to four target creatures you control. Creatures you control gain vigilance and trample until end of turn.
|
||||
this.getSpellAbility().addEffect(new DistributeCountersEffect()
|
||||
.setText("distribute four +1/+1 counters among up to four target creatures you control"));
|
||||
this.getSpellAbility().addTarget(new TargetCreaturePermanentAmount(4, StaticFilters.FILTER_CONTROLLED_CREATURES));
|
||||
this.getSpellAbility().addEffect(new GainAbilityControlledEffect(
|
||||
VigilanceAbility.getInstance(), Duration.EndOfTurn,
|
||||
StaticFilters.FILTER_CONTROLLED_CREATURES
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import mage.game.Game;
|
|||
import mage.game.permanent.Permanent;
|
||||
import mage.players.Player;
|
||||
import mage.target.TargetAmount;
|
||||
import mage.target.common.TargetCreatureOrPlaneswalkerAmount;
|
||||
import mage.target.common.TargetPermanentAmount;
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
|
|
@ -96,8 +96,7 @@ class StumpsquallHydraEffect extends OneShotEffect {
|
|||
return false;
|
||||
}
|
||||
|
||||
TargetAmount targetAmount = new TargetCreatureOrPlaneswalkerAmount(xValue, filter);
|
||||
targetAmount.setMinNumberOfTargets(1);
|
||||
TargetAmount targetAmount = new TargetPermanentAmount(xValue, 1, filter);
|
||||
targetAmount.withNotTarget(true);
|
||||
targetAmount.chooseTarget(outcome, player.getId(), source, game);
|
||||
for (UUID targetId : targetAmount.getTargets()) {
|
||||
|
|
|
|||
|
|
@ -25,12 +25,12 @@ public final class SunderingStroke extends CardImpl {
|
|||
|
||||
// Sundering Stroke deals 7 damage divided as you choose among one, two, or three targets. If at least seven red mana was spent to cast this spell, instead Sundering Stroke deals 7 damage to each of those permanents and/or players.
|
||||
this.getSpellAbility().addEffect(new ConditionalOneShotEffect(
|
||||
new DamageTargetEffect(7), new DamageMultiEffect(7), SunderingStrokeCondtition.instance,
|
||||
new DamageTargetEffect(7), new DamageMultiEffect(), SunderingStrokeCondtition.instance,
|
||||
"{this} deals 7 damage divided as you choose among one, two, or three targets. " +
|
||||
"If at least seven red mana was spent to cast this spell, " +
|
||||
"instead {this} deals 7 damage to each of those permanents and/or players"
|
||||
));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(7, 3));
|
||||
this.getSpellAbility().addTarget(new TargetAnyTargetAmount(7, 1, 3));
|
||||
this.getSpellAbility().addHint(new StaticHint(
|
||||
"(You have to choose how 7 damage is divided even if you spend seven red mana.)"
|
||||
));
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue