- Fixed ExileFromTop and ExileFromHand costs for the AI.

This commit is contained in:
jendave
2011-08-07 00:26:26 +00:00
parent 54f1c93d0a
commit b2c1d18cd3
2 changed files with 2 additions and 6 deletions

View File

@@ -861,12 +861,8 @@ public class ComputerUtil
return chooseExileFrom(Constant.Zone.Graveyard, type, activate, target, amount); return chooseExileFrom(Constant.Zone.Graveyard, type, activate, target, amount);
} }
static public CardList chooseExileFromTopType(String type, Card activate, Card target, int amount){
return chooseExileFrom(Constant.Zone.Library, type, activate, target, amount);
}
static public CardList chooseExileFrom(String zone, String type, Card activate, Card target, int amount){ static public CardList chooseExileFrom(String zone, String type, Card activate, Card target, int amount){
CardList typeList = AllZoneUtil.getPlayerGraveyard(AllZone.ComputerPlayer); CardList typeList = AllZoneUtil.getCardsInZone(zone, AllZone.ComputerPlayer);
typeList = typeList.getValidCards(type.split(","),activate.getController() ,activate); typeList = typeList.getValidCards(type.split(","),activate.getController() ,activate);
if (target != null && target.getController().isComputer() && typeList.contains(target)) if (target != null && target.getController().isComputer() && typeList.contains(target))
typeList.remove(target); // don't exile the card we're pumping typeList.remove(target); // don't exile the card we're pumping

View File

@@ -555,7 +555,7 @@ public class Cost_Payment {
if (cost.getExileFromTopThis()) if (cost.getExileFromTopThis())
exileFromTopCard.add(card); exileFromTopCard.add(card);
else else
exileFromTopCard = ComputerUtil.chooseExileFromTopType(cost.getExileFromTopType(), card, ability.getTargetCard(), cost.getExileFromTopAmount()); exileFromTopCard = AllZoneUtil.getPlayerCardsInLibrary(AllZone.ComputerPlayer, cost.getExileFromTopAmount());
if (exileFromTopCard.size() != cost.getExileFromTopAmount()){ if (exileFromTopCard.size() != cost.getExileFromTopAmount()){
System.out.println("Couldn't find a valid card to exile for: "+card.getName()); System.out.println("Couldn't find a valid card to exile for: "+card.getName());