mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
* Sun Titan fix
This commit is contained in:
@@ -4143,25 +4143,18 @@ public class CardFactory_Creatures {
|
|||||||
if(graveList.size() == 0) return;
|
if(graveList.size() == 0) return;
|
||||||
|
|
||||||
if(card.getController().equals(Constant.Player.Human)) {
|
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) {
|
if(o != null) {
|
||||||
ability.setTargetCard((Card) o);
|
ability.setTargetCard((Card) o);
|
||||||
AllZone.Stack.add(ability);
|
AllZone.Stack.add(ability);
|
||||||
}
|
}
|
||||||
} else//computer
|
} else//computer
|
||||||
{
|
{
|
||||||
CardList list = new CardList(grave.getCards());
|
Card best = CardFactoryUtil.AI_getBestCreature(graveList);
|
||||||
list = list.filter(new CardListFilter(){
|
|
||||||
public boolean addCard(Card crd)
|
|
||||||
{
|
|
||||||
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Card best = CardFactoryUtil.AI_getBestCreature(list);
|
|
||||||
|
|
||||||
if(best == null) {
|
if(best == null) {
|
||||||
list.shuffle();
|
graveList.shuffle();
|
||||||
best = list.get(0);
|
best = graveList.get(0);
|
||||||
}
|
}
|
||||||
ability.setTargetCard(best);
|
ability.setTargetCard(best);
|
||||||
AllZone.Stack.add(ability);
|
AllZone.Stack.add(ability);
|
||||||
|
|||||||
@@ -1652,25 +1652,18 @@ public class CombatUtil {
|
|||||||
if(graveList.size() == 0) return;
|
if(graveList.size() == 0) return;
|
||||||
|
|
||||||
if(sun.getController().equals(Constant.Player.Human)) {
|
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) {
|
if(o != null) {
|
||||||
ability2.setTargetCard((Card) o);
|
ability2.setTargetCard((Card) o);
|
||||||
AllZone.Stack.add(ability2);
|
AllZone.Stack.add(ability2);
|
||||||
}
|
}
|
||||||
} else//computer
|
} else//computer
|
||||||
{
|
{
|
||||||
CardList list = new CardList(grave.getCards());
|
Card best = CardFactoryUtil.AI_getBestCreature(graveList);
|
||||||
list = list.filter(new CardListFilter(){
|
|
||||||
public boolean addCard(Card crd)
|
|
||||||
{
|
|
||||||
return crd.isPermanent() && CardUtil.getConvertedManaCost(crd.getManaCost()) <=3;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Card best = CardFactoryUtil.AI_getBestCreature(list);
|
|
||||||
|
|
||||||
if(best == null) {
|
if(best == null) {
|
||||||
list.shuffle();
|
graveList.shuffle();
|
||||||
best = list.get(0);
|
best = graveList.get(0);
|
||||||
}
|
}
|
||||||
ability2.setTargetCard(best);
|
ability2.setTargetCard(best);
|
||||||
AllZone.Stack.add(ability2);
|
AllZone.Stack.add(ability2);
|
||||||
|
|||||||
Reference in New Issue
Block a user