mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
NPE fix
This commit is contained in:
@@ -776,7 +776,7 @@ public class AiAttackController {
|
|||||||
//TODO: if there are other ways to tap this creature (like mana creature), then don't need to attack
|
//TODO: if there are other ways to tap this creature (like mana creature), then don't need to attack
|
||||||
mustAttackDef = defender;
|
mustAttackDef = defender;
|
||||||
} else {
|
} else {
|
||||||
combat.getAttackConstraints().getRequirements().get(attacker).getSortedRequirements();
|
if (combat.getAttackConstraints().getRequirements().get(attacker) == null) continue;
|
||||||
// check defenders in order of maximum requirements
|
// check defenders in order of maximum requirements
|
||||||
for (Pair<GameEntity, Integer> e : combat.getAttackConstraints().getRequirements().get(attacker).getSortedRequirements()) {
|
for (Pair<GameEntity, Integer> e : combat.getAttackConstraints().getRequirements().get(attacker).getSortedRequirements()) {
|
||||||
if (e.getRight() == 0) continue;
|
if (e.getRight() == 0) continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user