diff --git a/forge-ai/src/main/java/forge/ai/ability/DigAi.java b/forge-ai/src/main/java/forge/ai/ability/DigAi.java index 00d8ce5566d..e33409722e7 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DigAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DigAi.java @@ -66,7 +66,8 @@ public class DigAi extends SpellAbilityAi { } final String num = sa.getParam("DigNum"); - if (num != null && num.equals("X") && host.getSVar(num).equals("Count$xPaid")) { + final boolean payXLogic = sa.hasParam("AILogic") && sa.getParam("AILogic").startsWith("PayX"); + if (num != null && (num.equals("X") && host.getSVar(num).equals("Count$xPaid")) || payXLogic) { // By default, set PayX here to maximum value. if (!(sa instanceof AbilitySub) || host.getSVar("PayX").equals("")) { int manaToSave = 0; diff --git a/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt b/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt index 1cd605c539c..57f33bcf090 100644 --- a/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt +++ b/forge-gui/res/cardsfolder/e/epiphany_at_the_drownyard.txt @@ -1,7 +1,7 @@ Name:Epiphany at the Drownyard ManaCost:X U Types:Instant -A:SP$ Dig | Cost$ X U | DigNum$ Y | References$ Y | Reveal$ True | RememberRevealed$ True | NoMove$ True | SubAbility$ DBTwoPiles | SpellDescription$ Reveal the top X+1 cards of your library and separate them into two piles. An opponent chooses one of those piles. Put that pile into your hand and the other into your graveyard. +A:SP$ Dig | Cost$ X U | DigNum$ Y | References$ Y | Reveal$ True | RememberRevealed$ True | NoMove$ True | SubAbility$ DBTwoPiles | AILogic$ PayX | SpellDescription$ Reveal the top X+1 cards of your library and separate them into two piles. An opponent chooses one of those piles. Put that pile into your hand and the other into your graveyard. SVar:DBTwoPiles:DB$ TwoPiles | Chooser$ Opponent | DefinedCards$ Remembered | Separator$ You | ChosenPile$ DBHand | UnchosenPile$ DBGrave | AILogic$ Worst SVar:DBHand:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Hand | SubAbility$ DBCleanup SVar:DBGrave:DB$ ChangeZone | Defined$ Remembered | Origin$ Library | Destination$ Graveyard | SubAbility$ DBCleanup