- Fix AI for Epiphany at the Drownyard.

This commit is contained in:
Agetian
2019-06-06 17:16:27 +03:00
parent 9233f778c5
commit 5ee562333a
2 changed files with 3 additions and 2 deletions

View File

@@ -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;

View File

@@ -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