mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
- 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:
@@ -709,9 +709,11 @@ public class AiController {
|
||||
}
|
||||
|
||||
// Trying to play a card that has Buyback without a Buyback cost, look for possible additional considerations
|
||||
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
|
||||
// which might potentially cause a stack overflow.
|
||||
|
||||
@@ -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"), /** */
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user