mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 11:18:01 +00:00
- Enabled Reap Intellect for the AI.
This commit is contained in:
@@ -260,7 +260,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
for (final Player p : pDefined) {
|
||||
List<Card> list = p.getCardsIn(origin);
|
||||
|
||||
if ((type != null) && p == ai) {
|
||||
if (type != null && p == ai) {
|
||||
// AI only "knows" about his information
|
||||
list = CardLists.getValidCards(list, type, source.getController(), source);
|
||||
list = CardLists.filter(list, new Predicate<Card>() {
|
||||
@@ -276,6 +276,16 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
});
|
||||
}
|
||||
|
||||
String num = sa.getParam("ChangeNum");
|
||||
if (num != null) {
|
||||
if (num.contains("X") && source.getSVar("X").equals("Count$xPaid")) {
|
||||
// Set PayX here to maximum value.
|
||||
int xPay = ComputerUtilMana.determineLeftoverMana(sa, ai);
|
||||
xPay = Math.min(xPay, list.size());
|
||||
source.setSVar("PayX", Integer.toString(xPay));
|
||||
}
|
||||
}
|
||||
|
||||
if (list.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
@@ -356,7 +366,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
|
||||
|
||||
// this works for hidden because the mana is paid first.
|
||||
final String type = sa.getParam("ChangeType");
|
||||
if ((type != null) && type.contains("X") && source.getSVar("X").equals("Count$xPaid")) {
|
||||
if (type != null && type.contains("X") && source.getSVar("X").equals("Count$xPaid")) {
|
||||
// Set PayX here to maximum value.
|
||||
final int xPay = ComputerUtilMana.determineLeftoverMana(sa, ai);
|
||||
source.setSVar("PayX", Integer.toString(xPay));
|
||||
|
||||
Reference in New Issue
Block a user