- Expanded checkDiscardCost.

- Added Phantasmagorian.
This commit is contained in:
Sloth
2012-12-03 15:47:49 +00:00
parent c438325d63
commit 03ca3d4872
5 changed files with 30 additions and 5 deletions

View File

@@ -215,8 +215,14 @@ public class CostUtil {
if (typeList.size() > ai.getMaxHandSize()) {
continue;
}
if (ComputerUtil.getCardPreference(ai, source, "DiscardCost", typeList) == null) {
return false;
int num = AbilityFactory.calculateAmount(source, disc.getAmount(), null);
for (int i = 0; i < num; i++) {
Card pref = ComputerUtil.getCardPreference(ai, source, "DiscardCost", typeList);
if (pref == null) {
return false;
} else {
typeList.remove(pref);
}
}
}
}