- Enabled Reap Intellect for the AI.

This commit is contained in:
Sloth
2013-06-04 11:58:39 +00:00
parent 05c87fe58c
commit 22bd56f4c8
2 changed files with 12 additions and 3 deletions

View File

@@ -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));