mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
add RepeatTargeted param to Effect and card
This commit is contained in:
@@ -3,6 +3,7 @@ package forge.game.ability.effects;
|
|||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import forge.GameCommand;
|
import forge.GameCommand;
|
||||||
import forge.game.Game;
|
import forge.game.Game;
|
||||||
|
import forge.game.GameObject;
|
||||||
import forge.game.ability.AbilityUtils;
|
import forge.game.ability.AbilityUtils;
|
||||||
import forge.game.ability.SpellAbilityEffect;
|
import forge.game.ability.SpellAbilityEffect;
|
||||||
import forge.game.card.*;
|
import forge.game.card.*;
|
||||||
@@ -114,6 +115,18 @@ public class RepeatEachEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// for a mixed list of target permanents and players, e.g. Soulfire Eruption
|
||||||
|
if (sa.hasParam("RepeatTargeted")) {
|
||||||
|
final List <GameObject> tgts = getTargets(sa);
|
||||||
|
if (tgts != null) {
|
||||||
|
for (final Object o : tgts) {
|
||||||
|
source.addRemembered(o);
|
||||||
|
AbilityUtils.resolve(repeat);
|
||||||
|
source.removeRemembered(o);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (sa.hasParam("RepeatPlayers")) {
|
if (sa.hasParam("RepeatPlayers")) {
|
||||||
final FCollection<Player> repeatPlayers = AbilityUtils.getDefinedPlayers(source, sa.getParam("RepeatPlayers"), sa);
|
final FCollection<Player> repeatPlayers = AbilityUtils.getDefinedPlayers(source, sa.getParam("RepeatPlayers"), sa);
|
||||||
if (sa.hasParam("ClearRememberedBeforeLoop")) {
|
if (sa.hasParam("ClearRememberedBeforeLoop")) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
Name:Soulfire Eruption
|
Name:Soulfire Eruption
|
||||||
ManaCost:6 R R R
|
ManaCost:6 R R R
|
||||||
Types:Sorcery
|
Types:Sorcery
|
||||||
A:SP$ RepeatEach | Cost$ 6 R R R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Choose any number of target creatures, planeswalkers, and/or players | TargetMin$ 0 | TargetMax$ MaxTgt | References$ MaxTgt,MaxPl,MaxPerm | RepeatSubAbility$ DBDig | DefinedCards$ Targeted | RepeatPlayers$ Targeted | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Choose any number of target creatures, planeswalkers, and/or players. For each of them, exile the top card of your library, then CARDNAME deals damage equal to that card's converted mana cost to that permanent or player. You may play the exiled cards until the end of your next turn.
|
A:SP$ RepeatEach | Cost$ 6 R R R | ValidTgts$ Creature,Player,Planeswalker | TgtPrompt$ Choose any number of target creatures, planeswalkers, and/or players | TargetMin$ 0 | TargetMax$ MaxTgt | References$ MaxTgt,MaxPl,MaxPerm | RepeatSubAbility$ DBDig | RepeatTargeted$ True | SubAbility$ DBEffect | StackDescription$ SpellDescription | SpellDescription$ Choose any number of target creatures, planeswalkers, and/or players. For each of them, exile the top card of your library, then CARDNAME deals damage equal to that card's converted mana cost to that permanent or player. You may play the exiled cards until the end of your next turn.
|
||||||
SVar:DBDig:DB$ Dig | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | ImprintRevealed$ True | Reveal$ True | SubAbility$ DBDealDamage
|
SVar:DBDig:DB$ Dig | Defined$ You | DigNum$ 1 | ChangeNum$ All | DestinationZone$ Exile | ImprintRevealed$ True | Reveal$ True | SubAbility$ DBDealDamage
|
||||||
SVar:DBDealDamage:DB$ DealDamage | Defined$ Remembered | NumDmg$ X | References$ X | SubAbility$ DBCleanup
|
SVar:DBDealDamage:DB$ DealDamage | Defined$ Remembered | NumDmg$ X | References$ X | SubAbility$ DBCleanup
|
||||||
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True
|
SVar:DBCleanup:DB$ Cleanup | ClearImprinted$ True
|
||||||
|
|||||||
Reference in New Issue
Block a user