From 47b5ba268c5dd2bbd6aa35c6c11dbf3526fdfd5e Mon Sep 17 00:00:00 2001 From: Agetian Date: Thu, 16 Nov 2023 16:53:30 +0300 Subject: [PATCH] - AI hint for Sakura Tribe-Elder blocking. (#4177) - AI hint for Visions of Dread. --- forge-ai/src/main/java/forge/ai/AiBlockController.java | 4 +++- forge-gui/res/cardsfolder/s/sakura_tribe_elder.txt | 1 + forge-gui/res/cardsfolder/v/visions_of_dread.txt | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/forge-ai/src/main/java/forge/ai/AiBlockController.java b/forge-ai/src/main/java/forge/ai/AiBlockController.java index 545ccf96097..04fb2c2bf43 100644 --- a/forge-ai/src/main/java/forge/ai/AiBlockController.java +++ b/forge-ai/src/main/java/forge/ai/AiBlockController.java @@ -252,8 +252,10 @@ public class AiBlockController { } } // 4.Blockers that have a big upside when dying + // 4a.Blockers that are profitable to sacrifice even in the event of an unfavorable block for (Card b : blockers) { - if (b.hasSVar("SacMe") && Integer.parseInt(b.getSVar("SacMe")) > 3) { + if ((b.hasSVar("SacMe") && Integer.parseInt(b.getSVar("SacMe")) > 3) || + (b.hasSVar("SacMeAfterBlock") && !attacker.hasKeyword(Keyword.TRAMPLE) && !attacker.hasKeyword(Keyword.BANDING))) { blocker = b; if (!ComputerUtilCombat.canDestroyAttacker(ai, attacker, blocker, combat, false)) { blockedButUnkilled.add(attacker); diff --git a/forge-gui/res/cardsfolder/s/sakura_tribe_elder.txt b/forge-gui/res/cardsfolder/s/sakura_tribe_elder.txt index e78c3ad780d..ea4f8a93127 100644 --- a/forge-gui/res/cardsfolder/s/sakura_tribe_elder.txt +++ b/forge-gui/res/cardsfolder/s/sakura_tribe_elder.txt @@ -3,4 +3,5 @@ ManaCost:1 G Types:Creature Snake Shaman PT:1/1 A:AB$ ChangeZone | Cost$ Sac<1/CARDNAME> | Origin$ Library | Destination$ Battlefield | Tapped$ True | ChangeType$ Land.Basic | ChangeNum$ 1 | SpellDescription$ Search your library for a basic land card, put it onto the battlefield tapped, then shuffle. +SVar:SacMeAfterBlock:TRUE Oracle:Sacrifice Sakura-Tribe Elder: Search your library for a basic land card, put that card onto the battlefield tapped, then shuffle. diff --git a/forge-gui/res/cardsfolder/v/visions_of_dread.txt b/forge-gui/res/cardsfolder/v/visions_of_dread.txt index af5d8001f62..d241a8390ae 100644 --- a/forge-gui/res/cardsfolder/v/visions_of_dread.txt +++ b/forge-gui/res/cardsfolder/v/visions_of_dread.txt @@ -6,4 +6,6 @@ SVar:DBChangeZone:DB$ ChangeZone | Defined$ ChosenCard | Origin$ Graveyard | Gai K:Flashback:8 B B:ReduceCost$ X:This spell costs {X} less to cast this way, where X is the greatest mana value of a commander you own on the battlefield or in the command zone. SVar:X:Count$ValidBattlefield,Command Card.IsCommander+YouOwn$GreatestCMC DeckHas:Ability$Graveyard +SVar:NeedsToPlayVar:Z GE1 +SVar:Z:Count$ValidGraveyard Creature.OppOwn Oracle:Target opponent puts a creature card of their choice from their graveyard onto the battlefield under your control.\nFlashback {8}{B}{B}. This spell costs {X} less to cast this way, where X is the greatest mana value of a commander you own on the battlefield or in the command zone. (You may cast this card from your graveyard for its flashback cost. Then exile it.)