mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Re-added Shockland AI.
This commit is contained in:
@@ -387,6 +387,7 @@ public class ComputerUtilCost {
|
||||
boolean payForOwnOnly = "OnlyOwn".equals(sa.getParam("UnlessAI"));
|
||||
boolean payOwner = sa.hasParam("UnlessAI") ? sa.getParam("UnlessAI").startsWith("Defined") : false;
|
||||
boolean payNever = "Never".equals(sa.getParam("UnlessAI"));
|
||||
boolean shockland = "Shockland".equals(sa.getParam("UnlessAI"));
|
||||
boolean isMine = sa.getActivatingPlayer().equals(payer);
|
||||
|
||||
if (payNever) { return false; }
|
||||
@@ -397,6 +398,16 @@ public class ComputerUtilCost {
|
||||
if (!payer.equals(player)) {
|
||||
return false;
|
||||
}
|
||||
} else if (shockland) {
|
||||
if (payer.getLife() > 3 && payer.canPayLife(2)) {
|
||||
final int landsize = payer.getLandsInPlay().size();
|
||||
for (Card c : payer.getCardsIn(ZoneType.Hand)) {
|
||||
if (landsize == c.getCMC()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// AI will only pay when it's not already payed and only opponents abilities
|
||||
|
||||
Reference in New Issue
Block a user