mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Fix NPE in AI decision on giving attacking creature protection.
This commit is contained in:
@@ -1083,9 +1083,7 @@ public class AiAttackController {
|
||||
if (choices.contains("artifacts")) {
|
||||
artifact = "artifacts";
|
||||
}
|
||||
if (!choices.contains(color)) {
|
||||
color = null;
|
||||
}
|
||||
if (choices.contains(color)) {
|
||||
for (Card c : oppList) {
|
||||
if (!c.isArtifact()) {
|
||||
artifact = null;
|
||||
@@ -1121,6 +1119,9 @@ public class AiAttackController {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
color = null;
|
||||
}
|
||||
if (color != null) {
|
||||
return color;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user