mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Fix for Reveillark being (majorly) broken for AI
This commit is contained in:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user