- Fixed costChanges not applying to AI spells with a cost of 0.

This commit is contained in:
Sloth
2012-09-01 18:12:19 +00:00
parent cf4b043690
commit f0c164693e

View File

@@ -292,6 +292,10 @@ public class CostPayment {
final Card source = this.ability.getSourceCard(); final Card source = this.ability.getSourceCard();
final ArrayList<CostPart> parts = this.cost.getCostParts(); final ArrayList<CostPart> parts = this.cost.getCostParts();
if (this.getCost().getCostMana() == null) {
parts.add(new CostMana("0", 1));
}
// Set all of the decisions before attempting to pay anything // Set all of the decisions before attempting to pay anything
for (final CostPart part : parts) { for (final CostPart part : parts) {
if (!part.decideAIPayment(this.ability, source, this)) { if (!part.decideAIPayment(this.ability, source, this)) {