mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 04:38:00 +00:00
- Real fix for chooseSacrificeType.
This commit is contained in:
@@ -373,7 +373,6 @@ public class Cost {
|
||||
}
|
||||
|
||||
public final CostPartMana getCostMana() {
|
||||
// TODO: Change where ChangeCost happens
|
||||
for (final CostPart part : this.costParts) {
|
||||
if (part instanceof CostPartMana) {
|
||||
return (CostPartMana) part;
|
||||
|
||||
@@ -425,14 +425,16 @@ public class ComputerUtil {
|
||||
int count = 0;
|
||||
|
||||
while (count < amount) {
|
||||
final Card prefCard = ComputerUtil.getCardPreference(ai, source, "SacCost", typeList);
|
||||
if (prefCard != null) {
|
||||
sacList.add(prefCard);
|
||||
typeList.remove(prefCard);
|
||||
count++;
|
||||
} else {
|
||||
Card prefCard = ComputerUtil.getCardPreference(ai, source, "SacCost", typeList);
|
||||
if (prefCard == null) {
|
||||
prefCard = ComputerUtilCard.getWorstAI(typeList);
|
||||
}
|
||||
if (prefCard == null) {
|
||||
return null;
|
||||
}
|
||||
sacList.add(prefCard);
|
||||
typeList.remove(prefCard);
|
||||
count++;
|
||||
}
|
||||
return sacList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user