- Removed and defaulted the experimental AI option to avoid counting static attack bonus effects in declare blockers twice.

This commit is contained in:
Agetian
2017-09-17 04:47:27 +00:00
parent 09042f1dbf
commit 3ae20885c4
3 changed files with 9 additions and 23 deletions

View File

@@ -83,17 +83,10 @@ public class AiBlockController {
private List<Card> getSafeBlockers(final Combat combat, final Card attacker, final List<Card> blockersLeft) {
final List<Card> blockers = new ArrayList<>();
// -- Experimental feature in testing (set withoutAttackerStaticAbilities to "true" after extensive testing --
// -- and remove the following block of conditional code and the related AI profile preference) --
// -- We don't check attacker static abilities at this point since the attackers have already attacked and, thus, --
// -- their P/T modifiers are active and are counted as a part of getNetPower/getNetToughness --
boolean withoutStAbs = false;
if (ai.getController().isAI()) {
withoutStAbs = ((PlayerControllerAi)ai.getController()).getAi().getBooleanProperty(AiProps.EXPERIMENTAL_AVOID_ST_ATK_BONUS_2X_COUNT);
}
// We don't check attacker static abilities at this point since the attackers have already attacked and, thus,
// their P/T modifiers are active and are counted as a part of getNetPower/getNetToughness
for (final Card b : blockersLeft) {
if (!ComputerUtilCombat.canDestroyBlocker(ai, b, attacker, combat, false, withoutStAbs)) {
if (!ComputerUtilCombat.canDestroyBlocker(ai, b, attacker, combat, false, true)) {
blockers.add(b);
}
}
@@ -105,17 +98,10 @@ public class AiBlockController {
private List<Card> getKillingBlockers(final Combat combat, final Card attacker, final List<Card> blockersLeft) {
final List<Card> blockers = new ArrayList<>();
// -- Experimental feature in testing (set withoutAttackerStaticAbilities to "true" after extensive testing --
// -- and remove the following block of conditional code and the related AI profile preference) --
// -- We don't check attacker static abilities at this point since the attackers have already attacked and, thus, --
// -- their P/T modifiers are active and are counted as a part of getNetPower/getNetToughness --
boolean withoutStAbs = false;
if (ai.getController().isAI()) {
withoutStAbs = ((PlayerControllerAi)ai.getController()).getAi().getBooleanProperty(AiProps.EXPERIMENTAL_AVOID_ST_ATK_BONUS_2X_COUNT);
}
// We don't check attacker static abilities at this point since the attackers have already attacked and, thus,
// their P/T modifiers are active and are counted as a part of getNetPower/getNetToughness
for (final Card b : blockersLeft) {
if (ComputerUtilCombat.canDestroyAttacker(ai, attacker, b, combat, false, withoutStAbs)) {
if (ComputerUtilCombat.canDestroyAttacker(ai, attacker, b, combat, false, true)) {
blockers.add(b);
}
}

View File

@@ -87,9 +87,9 @@ public enum AiProps { /** */
COMBAT_ASSAULT_ATTACK_EVASION_PREDICTION ("true"), /** */
COMBAT_ATTRITION_ATTACK_EVASION_PREDICTION ("true"), /** */
CONSERVATIVE_ENERGY_PAYMENT_ONLY_IN_COMBAT ("true"), /** */
CONSERVATIVE_ENERGY_PAYMENT_ONLY_DEFENSIVELY ("true"), /** */
CONSERVATIVE_ENERGY_PAYMENT_ONLY_DEFENSIVELY ("true"); /** */
// Experimental features, must be removed after extensive testing and, ideally, defaulting
EXPERIMENTAL_AVOID_ST_ATK_BONUS_2X_COUNT ("false"); /** */
// <-- there are currently no options here -->
private final String strDefaultVal;

View File

@@ -151,4 +151,4 @@ CONSERVATIVE_ENERGY_PAYMENT_ONLY_DEFENSIVELY=false
# -- Experimental feature toggles which only exist until the testing procedure for the relevant --
# -- features is over. These toggles will be removed later, or may be reintroduced under a --
# -- different name if necessary --
EXPERIMENTAL_AVOID_ST_ATK_BONUS_2X_COUNT=true
# <-- There are currently no experimental options here -->