- Targeted spell copies should not allow the player to cancel targeting (e.g. Storm spell copies).

This commit is contained in:
Agetian
2017-03-14 16:22:52 +00:00
parent 4d7976d5d5
commit 3dcf04cc8c

View File

@@ -70,7 +70,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
return;
}
boolean mayChoseNewTargets = true;
boolean mayChooseNewTargets = true;
List<SpellAbility> copies = new ArrayList<SpellAbility>();
if (sa.hasParam("CopyMultipleSpells")) {
@@ -107,7 +107,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
for(Player p : targetedSA.getTargets().getTargetPlayers())
candidates.remove(p);
mayChoseNewTargets = false;
mayChooseNewTargets = false;
for (GameEntity o : candidates) {
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
resetFirstTargetOnCopy(copy, o, targetedSA);
@@ -133,7 +133,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
valid = CardLists.getValidCards(valid, type.split(","), chosenSA.getActivatingPlayer(), chosenSA.getHostCard(), sa);
Card originalTarget = Iterables.getFirst(getTargetCards(chosenSA), null);
valid.remove(originalTarget);
mayChoseNewTargets = false;
mayChooseNewTargets = false;
for (final Card c : valid) {
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
resetFirstTargetOnCopy(copy, c, targetedSA);
@@ -155,7 +155,10 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
}
for(SpellAbility copySA : copies) {
controller.getController().playSpellAbilityForFree(copySA, mayChoseNewTargets);
if (mayChooseNewTargets && copySA.usesTargeting()) {
copySA.getTargetRestrictions().setMandatory(true);
}
controller.getController().playSpellAbilityForFree(copySA, mayChooseNewTargets);
}
} // end resolve