mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Experimental: attempting to improve the AI choice for all-in assault for battlefield situations where the defender will have several, but not enough, defenders with evasion (e.g. Flying).
- Currently only enabled for the Experimental AI profile for the testing period.
This commit is contained in:
@@ -424,10 +424,21 @@ public class AiAttackController {
|
||||
|
||||
final Player opp = this.defendingOpponent;
|
||||
|
||||
CardCollection accountedBlockers = new CardCollection(this.blockers);
|
||||
for (Card attacker : attackers) {
|
||||
if (!CombatUtil.canBeBlocked(attacker, this.blockers, null)
|
||||
if (!CombatUtil.canBeBlocked(attacker, accountedBlockers, null)
|
||||
|| attacker.hasKeyword("You may have CARDNAME assign its combat damage as though it weren't blocked.")) {
|
||||
unblockedAttackers.add(attacker);
|
||||
} else {
|
||||
if (ai.getController().isAI()) {
|
||||
AiController aic = ((PlayerControllerAi)ai.getController()).getAi();
|
||||
if (aic.getBooleanProperty(AiProps.COMBAT_ASSAULT_ATTACK_EVASION_PREDICTION)) {
|
||||
// Attempt to identify which blockers will already be taken (blocking other things),
|
||||
// such that Flying, Shadow, Reach, and other mechanics can be properly accounted for.
|
||||
List<Card> potentialBestBlockers = CombatUtil.getPotentialBestBlockers(attacker, accountedBlockers, null);
|
||||
accountedBlockers.removeAll(potentialBestBlockers);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,7 +53,8 @@ public enum AiProps { /** */
|
||||
STRIPMINE_HIGH_PRIORITY_ON_SKIPPED_LANDDROP ("false"),
|
||||
TOKEN_GENERATION_ABILITY_CHANCE ("100"), /** */
|
||||
TOKEN_GENERATION_ALWAYS_IF_FROM_PLANESWALKER ("true"), /** */
|
||||
TOKEN_GENERATION_ALWAYS_IF_OPP_ATTACKS ("true"); /** */
|
||||
TOKEN_GENERATION_ALWAYS_IF_OPP_ATTACKS ("true"),
|
||||
COMBAT_ASSAULT_ATTACK_EVASION_PREDICTION ("false"); /** */
|
||||
|
||||
private final String strDefaultVal;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user