mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
- Fixed ExileFromTop and ExileFromHand costs for the AI.
This commit is contained in:
@@ -861,12 +861,8 @@ public class ComputerUtil
|
||||
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){
|
||||
CardList typeList = AllZoneUtil.getPlayerGraveyard(AllZone.ComputerPlayer);
|
||||
CardList typeList = AllZoneUtil.getCardsInZone(zone, AllZone.ComputerPlayer);
|
||||
typeList = typeList.getValidCards(type.split(","),activate.getController() ,activate);
|
||||
if (target != null && target.getController().isComputer() && typeList.contains(target))
|
||||
typeList.remove(target); // don't exile the card we're pumping
|
||||
|
||||
@@ -555,7 +555,7 @@ public class Cost_Payment {
|
||||
if (cost.getExileFromTopThis())
|
||||
exileFromTopCard.add(card);
|
||||
else
|
||||
exileFromTopCard = ComputerUtil.chooseExileFromTopType(cost.getExileFromTopType(), card, ability.getTargetCard(), cost.getExileFromTopAmount());
|
||||
exileFromTopCard = AllZoneUtil.getPlayerCardsInLibrary(AllZone.ComputerPlayer, cost.getExileFromTopAmount());
|
||||
|
||||
if (exileFromTopCard.size() != cost.getExileFromTopAmount()){
|
||||
System.out.println("Couldn't find a valid card to exile for: "+card.getName());
|
||||
|
||||
Reference in New Issue
Block a user