mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
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:
@@ -788,6 +788,17 @@ public class CountersPutAi extends CountersAi {
|
|||||||
sa.getTargets().add(choice);
|
sa.getTargets().add(choice);
|
||||||
}
|
}
|
||||||
} else {
|
} 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()) {
|
if (sa.isCurse()) {
|
||||||
list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
|
list = ai.getOpponents().getCardsIn(ZoneType.Battlefield);
|
||||||
} else {
|
} else {
|
||||||
@@ -877,6 +888,7 @@ public class CountersPutAi extends CountersAi {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user