mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- AI should only sac Ghost Quarter if it either has more lands in play than the opponent, or equal amount of lands but at least one replacement land in hand, otherwise the AI tends to play too suboptimally.
This commit is contained in:
@@ -222,9 +222,9 @@ public class DestroyAi extends SpellAbilityAi {
|
|||||||
else if (CardLists.getNotType(list, "Land").isEmpty()) {
|
else if (CardLists.getNotType(list, "Land").isEmpty()) {
|
||||||
choice = ComputerUtilCard.getBestLandAI(list);
|
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
|
// Strip Mine, Wasteland - cut short if the relevant logic fails
|
||||||
if (!doLandForLandRemovalLogic(sa, ai, choice)) {
|
if (!doLandForLandRemovalLogic(sa, ai, choice, logic)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -402,7 +402,7 @@ public class DestroyAi extends SpellAbilityAi {
|
|||||||
return true;
|
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; }
|
if (tgtLand == null) { return false; }
|
||||||
|
|
||||||
Player tgtPlayer = tgtLand.getController();
|
Player tgtPlayer = tgtLand.getController();
|
||||||
@@ -445,6 +445,12 @@ public class DestroyAi extends SpellAbilityAi {
|
|||||||
boolean tempoCheck = numLandsOTB >= amountNoTempoCheck
|
boolean tempoCheck = numLandsOTB >= amountNoTempoCheck
|
||||||
|| ((numLandsInHand >= amountLandsInHand || isHighPriority) && ((numLandsInHand + numLandsOTB >= amountNoTimingCheck) || timingCheck));
|
|| ((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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ Name:Ghost Quarter
|
|||||||
ManaCost:no cost
|
ManaCost:no cost
|
||||||
Types:Land
|
Types:Land
|
||||||
A:AB$ Mana | Cost$ T | Produced$ C | SpellDescription$ Add {C} to your mana pool.
|
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:DBChange:DB$ChangeZone | Optional$ True | Origin$ Library | Destination$ Battlefield | ChangeType$ Land.Basic | ChangeNum$ 1 | DefinedPlayer$ TargetedController | ShuffleNonMandatory$ True
|
||||||
SVar:RemRandomDeck:True
|
SVar:RemRandomDeck:True
|
||||||
SVar:Picture:http://www.wizards.com/global/images/magic/general/ghost_quarter.jpg
|
SVar:Picture:http://www.wizards.com/global/images/magic/general/ghost_quarter.jpg
|
||||||
|
|||||||
Reference in New Issue
Block a user