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