Prevent Gorilla Shaman refunding mana after there are no more remaining targets

This commit is contained in:
drdev
2014-09-14 16:55:10 +00:00
parent 4e5b5e4d6c
commit 1d40924d0a
2 changed files with 8 additions and 1 deletions

View File

@@ -334,6 +334,9 @@ public class ComputerUtilMana {
if (test) {
refundMana(manaSpentToPay, ai, sa);
}
else {
manaSpentToPay.clear(); //prevent mana spent to pay sticking around such that it can cause an improper refund later
}
handleOfferingsAI(sa, test, cost.isPaid());
return true;
}
@@ -461,6 +464,9 @@ public class ComputerUtilMana {
if (test) {
refundMana(manaSpentToPay, ai, sa);
}
else {
manaSpentToPay.clear(); //prevent mana spent to pay sticking around such that it can cause an improper refund later
}
sa.getHostCard().setColorsPaid(cost.getColorsPaid());
// if (sa instanceof Spell_Permanent) // should probably add this
sa.getHostCard().setSunburstValue(cost.getSunburst());