mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 19:58:00 +00:00
- Targeted spell copies should not allow the player to cancel targeting (e.g. Storm spell copies).
This commit is contained in:
@@ -70,7 +70,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean mayChoseNewTargets = true;
|
boolean mayChooseNewTargets = true;
|
||||||
List<SpellAbility> copies = new ArrayList<SpellAbility>();
|
List<SpellAbility> copies = new ArrayList<SpellAbility>();
|
||||||
|
|
||||||
if (sa.hasParam("CopyMultipleSpells")) {
|
if (sa.hasParam("CopyMultipleSpells")) {
|
||||||
@@ -107,7 +107,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
|||||||
for(Player p : targetedSA.getTargets().getTargetPlayers())
|
for(Player p : targetedSA.getTargets().getTargetPlayers())
|
||||||
candidates.remove(p);
|
candidates.remove(p);
|
||||||
|
|
||||||
mayChoseNewTargets = false;
|
mayChooseNewTargets = false;
|
||||||
for (GameEntity o : candidates) {
|
for (GameEntity o : candidates) {
|
||||||
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
|
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
|
||||||
resetFirstTargetOnCopy(copy, o, targetedSA);
|
resetFirstTargetOnCopy(copy, o, targetedSA);
|
||||||
@@ -133,7 +133,7 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
|||||||
valid = CardLists.getValidCards(valid, type.split(","), chosenSA.getActivatingPlayer(), chosenSA.getHostCard(), sa);
|
valid = CardLists.getValidCards(valid, type.split(","), chosenSA.getActivatingPlayer(), chosenSA.getHostCard(), sa);
|
||||||
Card originalTarget = Iterables.getFirst(getTargetCards(chosenSA), null);
|
Card originalTarget = Iterables.getFirst(getTargetCards(chosenSA), null);
|
||||||
valid.remove(originalTarget);
|
valid.remove(originalTarget);
|
||||||
mayChoseNewTargets = false;
|
mayChooseNewTargets = false;
|
||||||
for (final Card c : valid) {
|
for (final Card c : valid) {
|
||||||
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
|
SpellAbility copy = CardFactory.copySpellAbilityAndSrcCard(card, chosenSA.getHostCard(), chosenSA, true);
|
||||||
resetFirstTargetOnCopy(copy, c, targetedSA);
|
resetFirstTargetOnCopy(copy, c, targetedSA);
|
||||||
@@ -155,7 +155,10 @@ public class CopySpellAbilityEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for(SpellAbility copySA : copies) {
|
for(SpellAbility copySA : copies) {
|
||||||
controller.getController().playSpellAbilityForFree(copySA, mayChoseNewTargets);
|
if (mayChooseNewTargets && copySA.usesTargeting()) {
|
||||||
|
copySA.getTargetRestrictions().setMandatory(true);
|
||||||
|
}
|
||||||
|
controller.getController().playSpellAbilityForFree(copySA, mayChooseNewTargets);
|
||||||
}
|
}
|
||||||
} // end resolve
|
} // end resolve
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user