Skip to content

Commit d6318ec

Browse files
authored
Fix for refundPayment when multiple costs (Card-Forge#9558)
1 parent 8afa17c commit d6318ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

forge-game/src/main/java/forge/game/cost/CostPayment.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,10 @@ public final boolean isFullyPaid() {
123123
public final void refundPayment() {
124124
Card sourceCard = this.ability.getHostCard();
125125
for (final CostPart part : this.paidCostParts) {
126-
if (part.isUndoable()) {
127-
part.refund(sourceCard);
126+
part.refund(sourceCard);
127+
// Clear lists to prevent accumulation across multiple cancelled activations
128+
if (part instanceof CostPartWithList) {
129+
((CostPartWithList) part).resetLists();
128130
}
129131
}
130132

0 commit comments

Comments
 (0)