- Minor logic tweak (Buyback) + AI property

- hasXInAnyCostPart doesn't need a SA parameter now that it's in Cost.
- Fixed a minor mistype on mobile Forge.
This commit is contained in:
Agetian
2018-12-04 16:17:03 +03:00
parent a2ca811136
commit 1d7188b8f5
6 changed files with 21 additions and 2 deletions

View File

@@ -709,8 +709,10 @@ public class AiController {
}
// Trying to play a card that has Buyback without a Buyback cost, look for possible additional considerations
if (card.hasKeyword(Keyword.BUYBACK) && !sa.isBuyBackAbility() && !canPlaySpellWithoutBuyback(card, sa)) {
return AiPlayDecision.NeedsToPlayCriteriaNotMet;
if (getBooleanProperty(AiProps.TRY_TO_PRESERVE_BUYBACK_SPELLS)) {
if (card.hasKeyword(Keyword.BUYBACK) && !sa.isBuyBackAbility() && !canPlaySpellWithoutBuyback(card, sa)) {
return AiPlayDecision.NeedsToPlayCriteriaNotMet;
}
}
// When processing a new SA, clear the previously remembered cards that have been marked to avoid re-entry

View File

@@ -58,6 +58,7 @@ public enum AiProps { /** */
THRESHOLD_TOKEN_CHUMP_TO_SAVE_PLANESWALKER ("135"), /** */
THRESHOLD_NONTOKEN_CHUMP_TO_SAVE_PLANESWALKER ("110"), /** */
CHUMP_TO_SAVE_PLANESWALKER_ONLY_ON_LETHAL ("true"), /** */
TRY_TO_PRESERVE_BUYBACK_SPELLS ("true"), /** */
MIN_SPELL_CMC_TO_COUNTER ("0"), /** */
CHANCE_TO_COUNTER_CMC_1 ("50"), /** */
CHANCE_TO_COUNTER_CMC_2 ("75"), /** */

View File

@@ -244,6 +244,10 @@ BOUNCE_ALL_ELSEWHERE_NONCREAT_EVAL_DIFF=3
# library to put some into the graveyard.
INTUITION_ALTERNATIVE_LOGIC=true
# If enabled, the AI will run some additional checks in order to try to preserve spells that have Buyback and not
# use them unless absolutely necessary (or unless multiple copies are in hand).
TRY_TO_PRESERVE_BUYBACK_SPELLS=true
# How big of a difference is allowed between the revealed card CMC and the currently castable CMC to still put the
# card on top of the library
EXPLORE_MAX_CMC_DIFF_TO_PUT_IN_GRAVEYARD=2

View File

@@ -245,6 +245,10 @@ BOUNCE_ALL_ELSEWHERE_NONCREAT_EVAL_DIFF=3
# library to put some into the graveyard.
INTUITION_ALTERNATIVE_LOGIC=true
# If enabled, the AI will run some additional checks in order to try to preserve spells that have Buyback and not
# use them unless absolutely necessary (or unless multiple copies are in hand).
TRY_TO_PRESERVE_BUYBACK_SPELLS=true
# How big of a difference is allowed between the revealed card CMC and the currently castable CMC to still put the
# card on top of the library
EXPLORE_MAX_CMC_DIFF_TO_PUT_IN_GRAVEYARD=2

View File

@@ -245,6 +245,10 @@ BOUNCE_ALL_ELSEWHERE_NONCREAT_EVAL_DIFF=5
# library to put some into the graveyard.
INTUITION_ALTERNATIVE_LOGIC=true
# If enabled, the AI will run some additional checks in order to try to preserve spells that have Buyback and not
# use them unless absolutely necessary (or unless multiple copies are in hand).
TRY_TO_PRESERVE_BUYBACK_SPELLS=true
# How big of a difference is allowed between the revealed card CMC and the currently castable CMC to still put the
# card on top of the library
EXPLORE_MAX_CMC_DIFF_TO_PUT_IN_GRAVEYARD=2

View File

@@ -245,6 +245,10 @@ BOUNCE_ALL_ELSEWHERE_NONCREAT_EVAL_DIFF=3
# library to put some into the graveyard.
INTUITION_ALTERNATIVE_LOGIC=true
# If enabled, the AI will run some additional checks in order to try to preserve spells that have Buyback and not
# use them unless absolutely necessary (or unless multiple copies are in hand).
TRY_TO_PRESERVE_BUYBACK_SPELLS=false
# How big of a difference is allowed between the revealed card CMC and the currently castable CMC to still put the
# card on top of the library
EXPLORE_MAX_CMC_DIFF_TO_PUT_IN_GRAVEYARD=1