mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
Merge branch 'aicombat' into 'master'
Fix predictToughnessBonusOfAttacker logic See merge request core-developers/forge!5653
This commit is contained in:
@@ -208,7 +208,7 @@ public class AiAttackController {
|
||||
*/
|
||||
public final boolean isEffectiveAttacker(final Player ai, final Card attacker, final Combat combat, final GameEntity defender) {
|
||||
// if the attacker will die when attacking don't attack
|
||||
if ((attacker.getNetToughness() + ComputerUtilCombat.predictToughnessBonusOfAttacker(attacker, null, combat, true)) <= 0) {
|
||||
if (attacker.getNetToughness() + ComputerUtilCombat.predictToughnessBonusOfAttacker(attacker, null, combat, true) <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1478,7 +1478,7 @@ public class ComputerUtilCombat {
|
||||
|
||||
// DealDamage triggers
|
||||
if (ApiType.DealDamage.equals(sa.getApi())) {
|
||||
if ("TriggeredAttacker".equals(sa.getParam("Defined"))) {
|
||||
if (!sa.hasParam("Defined") || !sa.getParam("Defined").startsWith("TriggeredAttacker")) {
|
||||
continue;
|
||||
}
|
||||
int damage = AbilityUtils.calculateAmount(source, sa.getParam("NumDmg"), sa);
|
||||
|
||||
Reference in New Issue
Block a user