mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
- Fixed chooseSacrificeType.
This commit is contained in:
@@ -199,11 +199,11 @@ public class CostSacrifice extends CostPartWithList {
|
|||||||
if (this.isTargetingThis()) {
|
if (this.isTargetingThis()) {
|
||||||
this.getList().add(source);
|
this.getList().add(source);
|
||||||
} else if (this.getAmount().equals("All")) {
|
} else if (this.getAmount().equals("All")) {
|
||||||
List<Card> typeList = new ArrayList<Card>(activator.getCardsIn(ZoneType.Battlefield));
|
/*List<Card> typeList = new ArrayList<Card>(activator.getCardsIn(ZoneType.Battlefield));
|
||||||
typeList = CardLists.getValidCards(typeList, this.getType().split(";"), activator, source);
|
typeList = CardLists.getValidCards(typeList, this.getType().split(";"), activator, source);
|
||||||
if (activator.hasKeyword("You can't sacrifice creatures to cast spells or activate abilities.")) {
|
if (activator.hasKeyword("You can't sacrifice creatures to cast spells or activate abilities.")) {
|
||||||
typeList = CardLists.getNotType(typeList, "Creature");
|
typeList = CardLists.getNotType(typeList, "Creature");
|
||||||
}
|
}*/
|
||||||
// Does the AI want to use Sacrifice All?
|
// Does the AI want to use Sacrifice All?
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -431,15 +431,9 @@ public class ComputerUtil {
|
|||||||
typeList.remove(prefCard);
|
typeList.remove(prefCard);
|
||||||
count++;
|
count++;
|
||||||
} else {
|
} else {
|
||||||
break;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CardLists.sortByPowerAsc(typeList);
|
|
||||||
|
|
||||||
for (int i = count; i < amount; i++) {
|
|
||||||
sacList.add(typeList.get(i));
|
|
||||||
}
|
|
||||||
return sacList;
|
return sacList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user