- Real fix for chooseSacrificeType.

This commit is contained in:
Sloth
2013-03-02 16:12:48 +00:00
parent 8ecdd641b3
commit 46d290ae02
2 changed files with 8 additions and 7 deletions

View File

@@ -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;

View File

@@ -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;
}