diff --git a/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java b/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java index 5d7451671a3..9a6dc7a5e40 100644 --- a/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java +++ b/forge-ai/src/main/java/forge/ai/ability/DestroyAi.java @@ -222,9 +222,9 @@ public class DestroyAi extends SpellAbilityAi { else if (CardLists.getNotType(list, "Land").isEmpty()) { choice = ComputerUtilCard.getBestLandAI(list); - if ("LandForLand".equals(logic)) { + if ("LandForLand".equals(logic) || "GhostQuarter".equals(logic)) { // Strip Mine, Wasteland - cut short if the relevant logic fails - if (!doLandForLandRemovalLogic(sa, ai, choice)) { + if (!doLandForLandRemovalLogic(sa, ai, choice, logic)) { return false; } } @@ -402,7 +402,7 @@ public class DestroyAi extends SpellAbilityAi { return true; } - public boolean doLandForLandRemovalLogic(SpellAbility sa, Player ai, Card tgtLand) { + public boolean doLandForLandRemovalLogic(SpellAbility sa, Player ai, Card tgtLand, String logic) { if (tgtLand == null) { return false; } Player tgtPlayer = tgtLand.getController(); @@ -445,6 +445,12 @@ public class DestroyAi extends SpellAbilityAi { boolean tempoCheck = numLandsOTB >= amountNoTempoCheck || ((numLandsInHand >= amountLandsInHand || isHighPriority) && ((numLandsInHand + numLandsOTB >= amountNoTimingCheck) || timingCheck)); - return tempoCheck; + // For Ghost Quarter, only use it if you have either more lands in play than your opponent + // or the same number of lands but an extra land in hand (otherwise the AI plays too suboptimally) + if ("GhostQuarter".equals(logic)) { + return tempoCheck && (numLandsOTB > oppLands.size() || (numLandsOTB == oppLands.size() && numLandsInHand > 0)); + } else { + return tempoCheck; + } } } diff --git a/forge-gui/res/cardsfolder/g/ghost_quarter.txt b/forge-gui/res/cardsfolder/g/ghost_quarter.txt index f57fcd4560a..62c3e1eab59 100644 --- a/forge-gui/res/cardsfolder/g/ghost_quarter.txt +++ b/forge-gui/res/cardsfolder/g/ghost_quarter.txt @@ -2,7 +2,7 @@ Name:Ghost Quarter ManaCost:no cost Types:Land A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C} to your mana pool. -A:AB$ Destroy | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Land | TgtPrompt$ Select target land. | SubAbility$ DBChange | AILogic$ LandForLand | AITgts$ Land.nonBasic | SpellDescription$ Destroy target land. Its controller may search his or her library for a basic land card, put it onto the battlefield, then shuffle his or her library. +A:AB$ Destroy | Cost$ T Sac<1/CARDNAME> | ValidTgts$ Land | TgtPrompt$ Select target land. | SubAbility$ DBChange | AILogic$ GhostQuarter | AITgts$ Land.nonBasic | SpellDescription$ Destroy target land. Its controller may search his or her library for a basic land card, put it onto the battlefield, then shuffle his or her library. SVar:DBChange:DB$ChangeZone | Optional$ True | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ 1 | DefinedPlayer$ TargetedController | ShuffleNonMandatory$ True SVar:RemRandomDeck:True SVar:Picture:http://www.wizards.com/global/images/magic/general/ghost_quarter.jpg