- 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"), /** */