- Fix for Reveillark being (majorly) broken for AI

This commit is contained in:
jendave
2011-08-06 13:36:33 +00:00
parent cfc1ff5c59
commit c0c19293ca

View File

@@ -13646,23 +13646,29 @@ public class CardFactory_Creatures {
return c.isCreature() && c.getNetAttack() <=2; return c.isCreature() && c.getNetAttack() <=2;
} }
}); });
if (graveList.size() == 0)
return;
PlayerZone battlefield = AllZone.getZone(Constant.Zone.Battlefield, player);
if( player.equals(AllZone.HumanPlayer)) { if( player.equals(AllZone.HumanPlayer)) {
if(graveList.size() > 0) {
for(int i = 0; i < 2; i++) { for(int i = 0; i < 2; i++) {
if(graveList.size() == 0) break;
Card c = AllZone.Display.getChoiceOptional("Select creature", graveList.toArray()); Card c = AllZone.Display.getChoiceOptional("Select creature", graveList.toArray());
if(c == null) break; if(c == null) break;
AllZone.GameAction.moveTo(AllZone.getZone(Constant.Zone.Battlefield, player), c); AllZone.GameAction.moveTo(battlefield, c);
graveList.remove(c); graveList.remove(c);
} }
} }
}
else{ //computer else{ //computer
if(graveList.size() > 0) { for(int i=0; i < 2; i++) {
int end = graveList.size(); if(graveList.size() == 0) break;
graveList.shuffle();
for(int i=0;i<end;i++) { Card c = CardFactoryUtil.AI_getBestCreature(graveList);
AllZone.GameAction.moveTo(AllZone.getZone(Constant.Zone.Battlefield, player), graveList.get(i)); AllZone.GameAction.moveTo(battlefield, c);
} graveList.remove(c);
} }
} }
}//resolve() }//resolve()