mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
- Expanded checkDiscardCost.
- Added Phantasmagorian.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user