Fix crash after removing target when copying divided spell (#8714)

Co-authored-by: tool4EvEr <tool4EvEr@>
This commit is contained in:
tool4ever
2025-09-15 14:27:21 +02:00
committed by GitHub
parent 10d359e7d7
commit 79fd4a3f8d
10 changed files with 27 additions and 35 deletions

View File

@@ -298,13 +298,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
boolean activateForCost = ComputerUtil.activateForCost(sa, ai);
if (sa.hasParam("Origin")) {
try {
origin = ZoneType.listValueOf(sa.getParam("Origin"));
} catch (IllegalArgumentException ex) {
// This happens when Origin is something like
// "Graveyard,Library" (Doomsday)
return new AiAbilityDecision(0, AiPlayDecision.CantPlayAi);
}
origin = ZoneType.listValueOf(sa.getParam("Origin"));
}
final String destination = sa.getParam("Destination");