mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed Eureka so these cards actually start with the activator when resolving
This commit is contained in:
@@ -6,6 +6,8 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
|
||||
import forge.game.ability.AbilityFactory;
|
||||
import forge.game.ability.AbilityUtils;
|
||||
import forge.game.ability.SpellAbilityEffect;
|
||||
@@ -62,6 +64,12 @@ public class MultiplePilesEffect extends SpellAbilityEffect {
|
||||
|
||||
final TargetRestrictions tgt = sa.getTargetRestrictions();
|
||||
final List<Player> tgtPlayers = getTargetPlayers(sa);
|
||||
// starting with the activator
|
||||
int pSize = tgtPlayers.size();
|
||||
Player activator = sa.getActivatingPlayer();
|
||||
while (tgtPlayers.contains(activator) && !activator.equals(Iterables.getFirst(tgtPlayers, null))) {
|
||||
tgtPlayers.add(pSize - 1, tgtPlayers.remove(0));
|
||||
}
|
||||
|
||||
for (final Player p : tgtPlayers) {
|
||||
if ((tgt == null) || p.canBeTargetedBy(sa)) {
|
||||
|
||||
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import forge.game.Game;
|
||||
@@ -88,9 +89,13 @@ public class RepeatEachEffect extends SpellAbilityEffect {
|
||||
|
||||
if (sa.hasParam("RepeatPlayers")) {
|
||||
final List<Player> repeatPlayers = AbilityUtils.getDefinedPlayers(source, sa.getParam("RepeatPlayers"), sa);
|
||||
boolean optional = false;
|
||||
if (sa.hasParam("RepeatOptionalForEachPlayer")) {
|
||||
optional = true;
|
||||
boolean optional = sa.hasParam("RepeatOptionalForEachPlayer");
|
||||
if (sa.hasParam("StartingWithActivator")) {
|
||||
int size = repeatPlayers.size();
|
||||
Player activator = sa.getActivatingPlayer();
|
||||
while (!activator.equals(Iterables.getFirst(repeatPlayers, null))) {
|
||||
repeatPlayers.add(size - 1, repeatPlayers.remove(0));
|
||||
}
|
||||
}
|
||||
for (Player p : repeatPlayers) {
|
||||
if (optional && !p.getController().confirmAction(repeat, null, sa.getParam("RepeatOptionalMessage"))) {
|
||||
|
||||
Reference in New Issue
Block a user