mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- fixed a possible NPE in ChangeZoneAi.
This commit is contained in:
@@ -503,7 +503,9 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
|||||||
// need something AI can cast now
|
// need something AI can cast now
|
||||||
CardLists.sortByEvaluateCreature(list);
|
CardLists.sortByEvaluateCreature(list);
|
||||||
for (Card c : list) {
|
for (Card c : list) {
|
||||||
if (ComputerUtilMana.payManaCost(c.getFirstSpellAbility(), ai, true, 0, false)) {
|
SpellAbility spell = c.getFirstSpellAbility();
|
||||||
|
spell.setActivatingPlayer(ai);
|
||||||
|
if (ComputerUtilMana.payManaCost(spell, ai, true, 0, false)) {
|
||||||
card = c;
|
card = c;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user