mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Improved AI attacking with creatures with "becomes blocked" triggers.
This commit is contained in:
@@ -199,6 +199,10 @@ public class AiAttackController {
|
||||
if ((attacker.getNetToughness() + ComputerUtilCombat.predictToughnessBonusOfAttacker(attacker, null, combat, true)) <= 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if ("TRUE".equals(attacker.getSVar("HasAttackEffect"))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
final Player opp = this.defendingOpponent;
|
||||
if (ComputerUtilCombat.damageIfUnblocked(attacker, opp, combat, true) > 0) {
|
||||
@@ -918,7 +922,8 @@ public class AiAttackController {
|
||||
}
|
||||
boolean hasAttackEffect = attacker.getSVar("HasAttackEffect").equals("TRUE") || attacker.hasStartOfKeyword("Annihilator");
|
||||
// is there a gain in attacking even when the blocker is not killed (Lifelink, Wither,...)
|
||||
boolean hasCombatEffect = attacker.getSVar("HasCombatEffect").equals("TRUE");
|
||||
boolean hasCombatEffect = attacker.getSVar("HasCombatEffect").equals("TRUE")
|
||||
|| "Blocked".equals(attacker.getSVar("HasAttackEffect"));
|
||||
if (!hasCombatEffect) {
|
||||
for (String keyword : attacker.getKeywords()) {
|
||||
if (keyword.equals("Wither") || keyword.equals("Infect") || keyword.equals("Lifelink")) {
|
||||
|
||||
@@ -1762,6 +1762,10 @@ public class ComputerUtilCombat {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (attacker.getName().equals("Elven Warhounds")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
int flankingMagnitude = 0;
|
||||
if (attacker.hasKeyword("Flanking") && !blocker.hasKeyword("Flanking")) {
|
||||
|
||||
Reference in New Issue
Block a user