* Sun Titan fix

This commit is contained in:
jendave
2011-08-06 05:31:20 +00:00
parent 97beef82b8
commit 0b65c2a7de
2 changed files with 8 additions and 22 deletions

View File

@@ -4143,25 +4143,18 @@ public class CardFactory_Creatures {
if(graveList.size() == 0) return;
if(card.getController().equals(Constant.Player.Human)) {
Object o = AllZone.Display.getChoiceOptional("Select target card", grave.getCards());
Object o = AllZone.Display.getChoiceOptional("Select target card", graveList.toArray());
if(o != null) {
ability.setTargetCard((Card) o);
AllZone.Stack.add(ability);
}
} else//computer
{
CardList list = new CardList(grave.getCards());
list = list.filter(new CardListFilter(){
public boolean addCard(Card crd)
{
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
}
});
Card best = CardFactoryUtil.AI_getBestCreature(list);
Card best = CardFactoryUtil.AI_getBestCreature(graveList);
if(best == null) {
list.shuffle();
best = list.get(0);
graveList.shuffle();
best = graveList.get(0);
}
ability.setTargetCard(best);
AllZone.Stack.add(ability);

View File

@@ -1652,25 +1652,18 @@ public class CombatUtil {
if(graveList.size() == 0) return;
if(sun.getController().equals(Constant.Player.Human)) {
Object o = AllZone.Display.getChoiceOptional("Select target card", grave.getCards());
Object o = AllZone.Display.getChoiceOptional("Select target card", graveList.toArray());
if(o != null) {
ability2.setTargetCard((Card) o);
AllZone.Stack.add(ability2);
}
} else//computer
{
CardList list = new CardList(grave.getCards());
list = list.filter(new CardListFilter(){
public boolean addCard(Card crd)
{
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
}
});
Card best = CardFactoryUtil.AI_getBestCreature(list);
Card best = CardFactoryUtil.AI_getBestCreature(graveList);
if(best == null) {
list.shuffle();
best = list.get(0);
graveList.shuffle();
best = graveList.get(0);
}
ability2.setTargetCard(best);
AllZone.Stack.add(ability2);