- 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

@@ -5,7 +5,6 @@ A:SP$ ChangeZone | Cost$ X 2 U B | Origin$ Hand | Destination$ Exile | ValidTgts
SVar:DBExile:DB$ ChangeZoneAll | Origin$ Hand,Library,Graveyard | Destination$ Exile | Defined$ Targeted | Search$ True | ChangeType$ Card.sharesNameWith Remembered | Shuffle$ True | SubAbility$ DBCleanup SVar:DBExile:DB$ ChangeZoneAll | Origin$ Hand,Library,Graveyard | Destination$ Exile | Defined$ Targeted | Search$ True | ChangeType$ Card.sharesNameWith Remembered | Shuffle$ True | SubAbility$ DBCleanup
SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True SVar:DBCleanup:DB$ Cleanup | ClearRemembered$ True
SVar:X:Count$xPaid SVar:X:Count$xPaid
SVar:RemAIDeck:True
SVar:Picture:http://www.wizards.com/global/images/magic/general/reap_intellect.jpg SVar:Picture:http://www.wizards.com/global/images/magic/general/reap_intellect.jpg
Oracle:Target opponent reveals his or her hand. You choose up to X nonland cards from it and exile them. For each card exiled this way, search that player's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library. Oracle:Target opponent reveals his or her hand. You choose up to X nonland cards from it and exile them. For each card exiled this way, search that player's graveyard, hand, and library for any number of cards with the same name as that card and exile them. Then that player shuffles his or her library.
SetInfo:DGM Mythic SetInfo:DGM Mythic

View File

@@ -260,7 +260,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
for (final Player p : pDefined) { for (final Player p : pDefined) {
List<Card> list = p.getCardsIn(origin); List<Card> list = p.getCardsIn(origin);
if ((type != null) && p == ai) { if (type != null && p == ai) {
// AI only "knows" about his information // AI only "knows" about his information
list = CardLists.getValidCards(list, type, source.getController(), source); list = CardLists.getValidCards(list, type, source.getController(), source);
list = CardLists.filter(list, new Predicate<Card>() { 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()) { if (list.isEmpty()) {
return false; return false;
} }
@@ -356,7 +366,7 @@ public class ChangeZoneAi extends SpellAbilityAi {
// this works for hidden because the mana is paid first. // this works for hidden because the mana is paid first.
final String type = sa.getParam("ChangeType"); 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. // Set PayX here to maximum value.
final int xPay = ComputerUtilMana.determineLeftoverMana(sa, ai); final int xPay = ComputerUtilMana.determineLeftoverMana(sa, ai);
source.setSVar("PayX", Integer.toString(xPay)); source.setSVar("PayX", Integer.toString(xPay));