mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- AiAttackController/AiBlockController: do not count activated abilities that can't target the attacker/blocker when trying to predict P/T bonus from AF Pump (fixes the AI suicide attacking/blocking with cards like Pia Nalaar)
This commit is contained in:
@@ -997,6 +997,9 @@ public class ComputerUtilCombat {
|
|||||||
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!ability.canTarget(blocker)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ability.getApi() == ApiType.Pump) {
|
if (ability.getApi() == ApiType.Pump) {
|
||||||
if (!ability.hasParam("NumAtt")) {
|
if (!ability.hasParam("NumAtt")) {
|
||||||
@@ -1158,6 +1161,9 @@ public class ComputerUtilCombat {
|
|||||||
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!ability.canTarget(blocker)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ability.getApi() == ApiType.Pump) {
|
if (ability.getApi() == ApiType.Pump) {
|
||||||
if (!ability.hasParam("NumDef")) {
|
if (!ability.hasParam("NumDef")) {
|
||||||
@@ -1360,6 +1366,9 @@ public class ComputerUtilCombat {
|
|||||||
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!ability.canTarget(attacker)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ability.getApi() == ApiType.Pump) {
|
if (ability.getApi() == ApiType.Pump) {
|
||||||
if (!ability.hasParam("NumAtt")) {
|
if (!ability.hasParam("NumAtt")) {
|
||||||
@@ -1577,6 +1586,9 @@ public class ComputerUtilCombat {
|
|||||||
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
if (ability.hasParam("ActivationPhases") || ability.hasParam("SorcerySpeed") || ability.hasParam("ActivationZone")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (!ability.canTarget(attacker)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (ability.getApi() == ApiType.Pump) {
|
if (ability.getApi() == ApiType.Pump) {
|
||||||
if (!ability.hasParam("NumDef")) {
|
if (!ability.hasParam("NumDef")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user