Fix AI not choosing to fight when putting counters from a trigger (#3126)

* - Fix the name of the swamp tribal town.

* - Fix AILogic$ Fight when checked from a trigger.

* - Move the code to a better location.

* - Only return in the FightAi branch if canFightAi succeeded.

* - Remove a comment for now, since the AI logic check is different compared to the one in checkApiLogic.
This commit is contained in:
Agetian
2023-05-17 13:31:58 +03:00
committed by GitHub
parent 39df71e3a1
commit 345db4e2c7

View File

@@ -788,6 +788,17 @@ public class CountersPutAi extends CountersAi {
sa.getTargets().add(choice);
}
} else {
String logic = sa.getParam("AILogic");
if ("Fight".equals(logic) || "PowerDmg".equals(logic)) {
int nPump = 0;
if (type.equals("P1P1")) {
nPump = amount;
}
if (FightAi.canFightAi(ai, sa, nPump, nPump)) {
return true;
}
}
if (sa.isCurse()) {
list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
} else {
@@ -877,6 +888,7 @@ public class CountersPutAi extends CountersAi {
}
}
}
return true;
}