mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
- Fixed a bug in CharmAI.
This commit is contained in:
@@ -24,7 +24,8 @@ public class CharmAi extends SpellAbilityAi {
|
|||||||
final int min = sa.hasParam("MinCharmNum") ? Integer.parseInt(sa.getParam("MinCharmNum")) : num;
|
final int min = sa.hasParam("MinCharmNum") ? Integer.parseInt(sa.getParam("MinCharmNum")) : num;
|
||||||
boolean timingRight = sa.isTrigger(); //is there a reason to play the charm now?
|
boolean timingRight = sa.isTrigger(); //is there a reason to play the charm now?
|
||||||
|
|
||||||
|
// reset the chosen list. Otherwise it will be locked in forever
|
||||||
|
sa.setChosenList(null);
|
||||||
List<AbilitySub> chosenList = chooseOptionsAi(sa, ai, timingRight, num, min, false);
|
List<AbilitySub> chosenList = chooseOptionsAi(sa, ai, timingRight, num, min, false);
|
||||||
|
|
||||||
if (chosenList.isEmpty()) {
|
if (chosenList.isEmpty()) {
|
||||||
@@ -51,7 +52,7 @@ public class CharmAi extends SpellAbilityAi {
|
|||||||
return choices.subList(1, choices.size());
|
return choices.subList(1, choices.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
AiController aic = ((PlayerControllerAi)ai.getController()).getAi();
|
AiController aic = ((PlayerControllerAi) ai.getController()).getAi();
|
||||||
for (int i = 0; i < num; i++) {
|
for (int i = 0; i < num; i++) {
|
||||||
AbilitySub thisPick = null;
|
AbilitySub thisPick = null;
|
||||||
for (SpellAbility sub : choices) {
|
for (SpellAbility sub : choices) {
|
||||||
|
|||||||
Reference in New Issue
Block a user