diff --git a/forge-ai/src/main/java/forge/ai/SpecialCardAi.java b/forge-ai/src/main/java/forge/ai/SpecialCardAi.java index db77d699d3e..69b5081e164 100644 --- a/forge-ai/src/main/java/forge/ai/SpecialCardAi.java +++ b/forge-ai/src/main/java/forge/ai/SpecialCardAi.java @@ -821,6 +821,10 @@ public class SpecialCardAi { int computerHandSize = ai.getZone(ZoneType.Hand).size(); int maxHandSize = ai.getMaxHandSize(); + if (ai.getCardsIn(ZoneType.Library).isEmpty()) { + return false; // nothing to draw from the library + } + if (!CardLists.filter(ai.getCardsIn(ZoneType.Battlefield), CardPredicates.nameEquals("Yawgmoth's Bargain")).isEmpty()) { // Prefer Yawgmoth's Bargain because AI is generally better with it @@ -1337,6 +1341,10 @@ public class SpecialCardAi { Game game = ai.getGame(); PhaseHandler ph = game.getPhaseHandler(); + if (ai.getCardsIn(ZoneType.Library).isEmpty()) { + return false; // nothing to draw from the library + } + int computerHandSize = ai.getZone(ZoneType.Hand).size(); int maxHandSize = ai.getMaxHandSize(); diff --git a/forge-ai/src/main/java/forge/ai/ability/CopySpellAbilityAi.java b/forge-ai/src/main/java/forge/ai/ability/CopySpellAbilityAi.java index 85ccadaec65..d130c18a666 100644 --- a/forge-ai/src/main/java/forge/ai/ability/CopySpellAbilityAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/CopySpellAbilityAi.java @@ -110,7 +110,8 @@ public class CopySpellAbilityAi extends SpellAbilityAi { @Override protected boolean doTriggerAINoCost(Player aiPlayer, SpellAbility sa, boolean mandatory) { // the AI should not miss mandatory activations (e.g. Precursor Golem trigger) - return mandatory || "Always".equals(sa.getParam("AILogic")); + String logic = sa.getParamOrDefault("AILogic", ""); + return mandatory || logic.contains("Always"); // this includes logic like AlwaysIfViable } @Override diff --git a/forge-ai/src/main/java/forge/ai/ability/ShuffleAi.java b/forge-ai/src/main/java/forge/ai/ability/ShuffleAi.java index 30435464eb2..4f6bd05d10a 100644 --- a/forge-ai/src/main/java/forge/ai/ability/ShuffleAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/ShuffleAi.java @@ -8,6 +8,12 @@ import forge.game.spellability.SpellAbility; public class ShuffleAi extends SpellAbilityAi { @Override protected boolean canPlayAI(Player aiPlayer, SpellAbility sa) { + String logic = sa.getParamOrDefault("AILogic", ""); + if (logic.equals("Always")) { + // We may want to play this for the subability, e.g. Mind's Desire + return true; + } + // not really sure when the compy would use this; maybe only after a // human // deliberately put a card on top of their library @@ -47,7 +53,7 @@ public class ShuffleAi extends SpellAbilityAi { @Override public boolean confirmAction(Player player, SpellAbility sa, PlayerActionConfirmMode mode, String message) { - // ai could analyze parameter denoting the player to shuffle + // ai could analyze parameter denoting the player to shuffle return true; } } diff --git a/forge-gui-mobile/src/forge/screens/planarconquest/LoadConquestScreen.java b/forge-gui-mobile/src/forge/screens/planarconquest/LoadConquestScreen.java index 5694541e2e3..1115a2f4ec1 100644 --- a/forge-gui-mobile/src/forge/screens/planarconquest/LoadConquestScreen.java +++ b/forge-gui-mobile/src/forge/screens/planarconquest/LoadConquestScreen.java @@ -315,7 +315,7 @@ public class LoadConquestScreen extends LaunchScreen { font = FSkinFont.get(12); float cardsWidth = font.getBounds(cards).width + iconSize + SettingsScreen.SETTING_PADDING; float shardsWidth = font.getBounds(shards).width + iconSize + SettingsScreen.SETTING_PADDING; - g.drawText(value.getPlaneswalker().getName() + " - " + value.getCurrentPlane().getName(), font, SettingsScreen.DESC_COLOR, x, y, w - shardsWidth - cardsWidth, h, false, HAlignment.LEFT, false); + g.drawText(value.getPlaneswalker().getName() + " - " + value.getCurrentPlane().getName().replace("_", " "), font, SettingsScreen.DESC_COLOR, x, y, w - shardsWidth - cardsWidth, h, false, HAlignment.LEFT, false); g.drawImage(FSkinImage.SPELLBOOK, x + w - shardsWidth - cardsWidth + iconOffset, y - SettingsScreen.SETTING_PADDING, iconSize, iconSize); g.drawText(cards, font, SettingsScreen.DESC_COLOR, x + w - shardsWidth - cardsWidth + iconSize + SettingsScreen.SETTING_PADDING, y, w, h, false, HAlignment.LEFT, false); g.drawImage(FSkinImage.AETHER_SHARD, x + w - shardsWidth + iconOffset, y - SettingsScreen.SETTING_PADDING, iconSize, iconSize); diff --git a/forge-gui/res/cardsfolder/l/lotus_vale.txt b/forge-gui/res/cardsfolder/l/lotus_vale.txt index 0b60ee818ea..1ad25b249b7 100644 --- a/forge-gui/res/cardsfolder/l/lotus_vale.txt +++ b/forge-gui/res/cardsfolder/l/lotus_vale.txt @@ -4,8 +4,8 @@ Types:Land A:AB$ Mana | Cost$ T | Produced$ Any | Amount$ 3 | SpellDescription$ Add three mana of any one color. R:Event$ Moved | Destination$ Battlefield | ValidCard$ Card.Self | ReplaceWith$ PayBeforeETB | Description$ If CARDNAME would enter the battlefield, sacrifice two untapped lands instead. If you do, put CARDNAME onto the battlefield. If you don't, put it into its owner's graveyard. SVar:PayBeforeETB:DB$ Sacrifice | SacValid$ Land.untapped | Defined$ You | RememberSacrificed$ True | Amount$ 2 | StrictAmount$ True | SubAbility$ MoveToGraveyard -SVar:MoveToGraveyard:DB$ ChangeZone | Origin$ All | Destination$ Graveyard | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | SubAbility$ MoveToBattlefield -SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | SubAbility$ DBCleanup +SVar:MoveToGraveyard:DB$ ChangeZone | Origin$ All | Destination$ Graveyard | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ LT2 | References$ X | SubAbility$ MoveToBattlefield +SVar:MoveToBattlefield:DB$ ChangeZone | Origin$ All | Destination$ Battlefield | Defined$ ReplacedCard | ConditionCheckSVar$ X | ConditionSVarCompare$ GE2 | References$ X | SubAbility$ DBCleanup SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:X:Remembered$Amount SVar:NeedsToPlayVar:Z GE2 diff --git a/forge-gui/res/cardsfolder/m/minds_desire.txt b/forge-gui/res/cardsfolder/m/minds_desire.txt index cfb68eb87f2..db16d6a4b53 100644 --- a/forge-gui/res/cardsfolder/m/minds_desire.txt +++ b/forge-gui/res/cardsfolder/m/minds_desire.txt @@ -2,7 +2,7 @@ Name:Mind's Desire ManaCost:4 U U Types:Sorcery K:Storm -A:SP$ Shuffle | Cost$ 4 U U | SubAbility$ DBExile | SpellDescription$ Shuffle your library. Then exile the top card of your library. Until end of turn, you may play that card without paying its mana cost. (If it has X in its mana cost, X is 0.) +A:SP$ Shuffle | Cost$ 4 U U | SubAbility$ DBExile | AILogic$ Always | SpellDescription$ Shuffle your library. Then exile the top card of your library. Until end of turn, you may play that card without paying its mana cost. (If it has X in its mana cost, X is 0.) SVar:DBExile:DB$ ChangeZone | Defined$ TopOfLibrary | Origin$ Library | Destination$ Exile | RememberChanged$ True | SubAbility$ DBEffect SVar:DBEffect:DB$Effect | RememberObjects$ Remembered | StaticAbilities$ Play | SubAbility$ DBCleanup | ExileOnMoved$ Exile SVar:Play:Mode$ Continuous | MayPlay$ True | MayPlayWithoutManaCost$ True | EffectZone$ Command | Affected$ Card.IsRemembered | AffectedZone$ Exile | Description$ You may play remembered card. diff --git a/forge-gui/res/cardsfolder/m/mirari.txt b/forge-gui/res/cardsfolder/m/mirari.txt index 80784279ed2..c1b674b58c3 100644 --- a/forge-gui/res/cardsfolder/m/mirari.txt +++ b/forge-gui/res/cardsfolder/m/mirari.txt @@ -2,6 +2,6 @@ Name:Mirari ManaCost:5 Types:Legendary Artifact T:Mode$ SpellCast | ValidCard$ Instant,Sorcery | ValidActivatingPlayer$ You | TriggerZones$ Battlefield | OptionalDecider$ You | Execute$ TrigCopy | TriggerDescription$ Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy. -SVar:TrigCopy:AB$CopySpellAbility | Cost$ 3 | Defined$ TriggeredSpellAbility +SVar:TrigCopy:AB$CopySpellAbility | Cost$ 3 | Defined$ TriggeredSpellAbility | AILogic$ AlwaysIfViable SVar:Picture:http://www.wizards.com/global/images/magic/general/mirari.jpg Oracle:Whenever you cast an instant or sorcery spell, you may pay {3}. If you do, copy that spell. You may choose new targets for the copy. diff --git a/forge-gui/res/conquest/planes/Time_Vault/Chronicle of Ages/_events.txt b/forge-gui/res/conquest/planes/Time_Vault/Chronicle of Ages/_events.txt index bb9b17ddb6a..3635b658f8b 100644 --- a/forge-gui/res/conquest/planes/Time_Vault/Chronicle of Ages/_events.txt +++ b/forge-gui/res/conquest/planes/Time_Vault/Chronicle of Ages/_events.txt @@ -4,6 +4,3 @@ Name:Lovisa Coldeyes|Deck:Lovisa Coldeyes.dck|Variant:Commander|Avatar:Lovisa Co Name:Zur the Enchanter|Deck:Zur the Enchanter.dck|Variant:Commander|Avatar:Zur the Enchanter|Desc: Name:Birds of Paradise|Deck:Birds of Paradise.dck|Variant:Vanguard|Avatar:Birds of Paradise|Desc: Name:Rofellos, Llanowar Emissary|Deck:Rofellos, Llanowar Emissary.dck|Variant:Commander|Avatar:Rofellos, Llanowar Emissary|Desc: -Name:Akroma, Angel of Wrath|Deck:Akroma, Angel of Wrath.dck|Variant:Commander|Avatar:Akroma, Angel of Wrath|Desc: -Name:EVENT8|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT9|Deck:Random.dck|Variant:None|Avatar:None|Desc: diff --git a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Akroma, Angel of Fury.dck b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Akroma, Angel of Fury.dck new file mode 100644 index 00000000000..ebeb8aa1052 --- /dev/null +++ b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Akroma, Angel of Fury.dck @@ -0,0 +1,33 @@ +[metadata] +Name=Akroma, Angel of Fury +[Commander] +1 Akroma, Angel of Fury|PLC +[Main] +1 Basalt Gargoyle|TSP +1 Carbonize|SCG +1 Dragon Roost|ONS +1 Dragonspeaker Shaman|SCG +1 Fault Line|USG +1 Fledgling Dragon|JUD +1 Gemstone Caverns|TSP +1 Goblin Sky Raider|ONS +1 Grim Monolith|ULG +1 Heat Ray|USG +1 Imperial Hellkite|LGN +1 Lightning Axe|TSP +1 Lightning Dragon|USG +1 Pardic Dragon|TSP +1 Rimescale Dragon|CSP +1 Rock Slide|VIS +1 Rorix Bladewing|ONS +1 Shock|ONS +14 Snow-Covered Mountain|ICE +1 Spitting Drake|VIS +1 Starstorm|ONS +1 Tarox Bladewing|FUT +1 Thran Dynamo|UDS +1 Thunderbolt|WTH +1 Volcanic Geyser|MIR +1 Worn Powerstone|USG +[Sideboard] + diff --git a/forge-gui/res/conquest/planes/Time_Vault/Chronicle of Ages/Akroma, Angel of Wrath.dck b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Akroma, Angel of Wrath.dck similarity index 100% rename from forge-gui/res/conquest/planes/Time_Vault/Chronicle of Ages/Akroma, Angel of Wrath.dck rename to forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Akroma, Angel of Wrath.dck diff --git a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Diamond Faerie.dck b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Diamond Faerie.dck new file mode 100644 index 00000000000..749126c1059 --- /dev/null +++ b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Diamond Faerie.dck @@ -0,0 +1,36 @@ +[metadata] +Name=Diamond Faerie +[Main] +1 Adarkar Valkyrie|CSP +1 Arctic Flats|CSP +1 Balduvian Frostwaker|CSP +1 Boreal Centaur|CSP +1 Boreal Druid|CSP +1 Boreal Griffin|CSP +1 Boreal Shelf|CSP +1 Centaur Omenreader|FUT +1 Coldsteel Heart|CSP +1 Counterspell|ICE +1 Diamond Faerie|CSP +4 Snow-Covered Forest|CSP +1 Frost Raptor|CSP +1 Frostweb Spider|CSP +1 Glacial Plating|CSP +1 Grand Coliseum|ONS +1 Heidar, Rimewind Master|CSP +1 Into the North|CSP +4 Snow-Covered Island|CSP +1 Ohran Viper|CSP +1 Phyrexian Ironfoot|CSP +1 Phyrexian Snowcrusher|CSP +4 Snow-Covered Plains|CSP +1 Power Sink|USG +1 Rimefeather Owl|CSP +1 Squall Drifter|CSP +1 Swords to Plowshares|ICE +1 Syncopate|ODY +1 Terramorphic Expanse|TSP +1 Thawing Glaciers|ALL +1 Woolly Mammoths|ICE +[Sideboard] + diff --git a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Kaysa.dck b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Kaysa.dck new file mode 100644 index 00000000000..1a4640aab17 --- /dev/null +++ b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Kaysa.dck @@ -0,0 +1,35 @@ +[metadata] +Name=Kaysa +[Commander] +1 Kaysa|ALL +[Main] +1 Decree of Savagery|SCG +1 Defiant Elf|LGN +1 Dryad Arbor|FUT +1 Elvish Aberration|SCG +1 Elvish Champion|INV +1 Elvish Vanguard|ONS +1 Essence Warden|PLC +1 Explosive Growth|INV +11 Forest|INV +1 Gaea's Cradle|USG +1 Heedless One|ONS +1 Llanowar Reborn|FUT +1 Mythic Proportions|ONS +1 Priest of Titania|USG +1 Rancor|ULG +1 Rofellos, Llanowar Emissary|UDS +1 Strength in Numbers|TSP +1 Sylvan Messenger|APC +1 Sylvan Might|ODY +1 Thornweald Archer|FUT +1 Timberwatch Elf|LGN +1 Titania's Chosen|USG +1 Voice of the Woods|ONS +1 Wellwisher|ONS +1 Wirewood Channeler|LGN +1 Wirewood Elf|ONS +1 Wirewood Lodge|ONS +1 Wirewood Pride|ONS +1 Yavimaya Hollow|UDS +[Sideboard] diff --git a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Red Deck Wins.dck b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Red Deck Wins.dck new file mode 100644 index 00000000000..2b7a488e552 --- /dev/null +++ b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Red Deck Wins.dck @@ -0,0 +1,32 @@ +[metadata] +Name=Burn +[Main] +1 Arc Lightning|USG +1 Blazing Salvo|ODY +1 Blistering Firecat|ONS +1 Empty the Warrens|TSP +1 Fault Line|USG +1 Firebolt|ODY +1 Flame Jet|UDS +1 Ghitu Encampment|ULG +1 Grapeshot|TSP +1 Heat Ray|USG +1 Incinerate|MIR +1 Kaervek's Torch|MIR +1 Keldon Megaliths|FUT +1 Lava Blister|ODY +1 Lightning Axe|TSP +1 Lightning Serpent|CSP +1 Molten Disaster|FUT +1 Rift Bolt|TSP +1 Rock Slide|VIS +1 Shock|ONS +1 Shower of Sparks|USG +1 Skred|CSP +13 Snow-Covered Mountain|CSP +1 Starstorm|ONS +1 Steam Blast|USG +1 Sudden Shock|TSP +1 Thunderbolt|WTH +1 Volcanic Geyser|MIR +[Sideboard] diff --git a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Storm.dck b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Storm.dck new file mode 100644 index 00000000000..05ff11e9880 --- /dev/null +++ b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/Storm.dck @@ -0,0 +1,44 @@ +[metadata] +Name=Storm +[Avatar] +1 Titania|VAN +[Main] +1 Ancestral Recall|LEA +1 Ancestral Vision|TSP +1 Arcane Denial|ALL|1 +1 Black Lotus|LEA +1 Brain Freeze|SCG +1 Brainstorm|ICE +1 Cloud of Faeries|ULG +1 Empty the Warrens|TSP +1 Frantic Search|ULG +1 Grand Coliseum|ONS +1 Grapeshot|TSP +1 Helm of Awakening|VIS +2 Island|ICE +1 Lotus Bloom|TSP +1 Lotus Vale|WTH +1 Mind's Desire|SCG +1 Mountain|USG +1 Mox Jet|LEA +1 Mox Ruby|LEA +1 Mox Sapphire|LEA +1 Necropotence|ICE +1 Obsessive Search|TOR +1 Ornithopter|3ED +1 Perilous Research|CSP +1 Phyrexian Walker|VIS +1 Shield Sphere|ALL +1 Snap|ULG +1 Sol Ring|LEA +3 Swamp|USG +1 Tendrils of Agony|SCG +1 Time Spiral|USG +1 Time Walk|LEA +1 Timetwister|LEA +1 Tolarian Academy|USG +1 Treachery|UDS +1 Worn Powerstone|USG +1 Yawgmoth's Will|USG +[Sideboard] + diff --git a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/_events.txt b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/_events.txt index 66c69ba92d0..5f766ca74ba 100644 --- a/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/_events.txt +++ b/forge-gui/res/conquest/planes/Time_Vault/The Memory Lane/_events.txt @@ -1,9 +1,6 @@ -Name:EVENT1|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT2|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT3|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT4|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT5|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT6|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT7|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT8|Deck:Random.dck|Variant:None|Avatar:None|Desc: -Name:EVENT9|Deck:Random.dck|Variant:None|Avatar:None|Desc: +Name:Akroma, Angel of Wrath|Deck:Akroma, Angel of Wrath.dck|Variant:Commander|Avatar:Akroma, Angel of Wrath|Desc: +Name:Akroma, Angel of Fury|Deck:Akroma, Angel of Fury.dck|Variant:Commander|Avatar:Akroma, Angel of Fury|Desc: +Name:Diamond Faerie|Deck:Diamond Faerie.dck|Variant:Planechase|Avatar:Diamond Faerie|Desc: +Name:Storm|Deck:Storm.dck|Variant:Vanguard|Avatar:Titania|Desc: +Name:Red Deck Wins|Deck:Red Deck Wins.dck|Variant:Planechase|Avatar:Blistering Firecat|Desc: +Name:Kaysa|Deck:Kaysa.dck|Variant:Commander|Avatar:Kaysa|Desc: diff --git a/forge-gui/res/conquest/planes/planes.txt b/forge-gui/res/conquest/planes/planes.txt index 2a2d1ab4b5c..591662ecd43 100644 --- a/forge-gui/res/conquest/planes/planes.txt +++ b/forge-gui/res/conquest/planes/planes.txt @@ -14,6 +14,6 @@ Name:Regatha|RegionSize:6|Unreachable:True|Desc: Name:Shandalar|RegionSize:9|Unreachable:True|Desc: Name:Tarkir|RegionSize:9|Desc:A plane dominated by five powerful clans... or five powerful dragon lords.\nConsists of 45 events. Contains cards from KTK, FRF, DTK, CMD, CNS/CN2, some C17. Name:Theros|RegionSize:9|Desc:Mortals tremble before an awe-inspiring pantheon of gods.\nConsists of 45 events. Contains cards from THS, BNG, JOU, HOP, PCA, and more. -Name:Time_Vault|RegionSize:9|Unreachable:True|Desc:A mysterious and legendary Time Vault, allowing one to travel back in time and revisit the ages long past and experience the history of Dominaria.\nConsists of 18 events. Contains cards from ICE, ALL, CSP, MIR, VIS, WTH, USG, ULG, UDS, INV, PLS, APC, ODY, TOR, JUD, ONS, LGN, SCG, TSP, PLC, FUT, and COM.\n\nThe portal to this plane is unstable and will close soon, so hasten your step, planeswalker, while you have the chance... +Name:Time_Vault|RegionSize:6|Unreachable:True|Desc:A mysterious and legendary Time Vault, allowing one to travel back in time and revisit the ages long past and challenge the legends of Dominaria.\nConsists of 12 events. Contains cards from ICE, ALL, CSP, MIR, VIS, WTH, USG, ULG, UDS, INV, PLS, APC, ODY, TOR, JUD, ONS, LGN, SCG, TSP, PLC, FUT, and COM.\n\nThe portal to this plane is unstable and will close soon, so hasten your step, planeswalker, while you have the chance... Name:Ulgrotha|RegionSize:6|Unreachable:True|Desc: Name:Zendikar|RegionSize:9|Desc:This land of primal mana was lethal even before its Eldrazi prisoners escaped.\nConsists of 60 events. Contains cards from ZEN, WWK, ROE, BFZ, OGW, and C16.