mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +00:00
Prevent Gorilla Shaman refunding mana after there are no more remaining targets
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -231,8 +231,9 @@ public class ManaPool implements Iterable<Mana> {
|
||||
|
||||
paidAbs.add(saPayment); // assumes some part on the mana produced by the ability will get used
|
||||
for (final Mana mana : abManaPart.getLastManaProduced()) {
|
||||
if( tryPayCostWithMana(saPaidFor, manaCost, mana) )
|
||||
if (tryPayCostWithMana(saPaidFor, manaCost, mana)) {
|
||||
saPaidFor.getPayingMana().add(0, mana);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user