Skip to content

Commit

Permalink
Correct UntapTargetCost similarly to UntapSourceCost per 118.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Grath committed Dec 1, 2024
1 parent 996de81 commit 02db93b
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl;
import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.game.Game;
import mage.game.permanent.Permanent;
import mage.target.TargetPermanent;
Expand Down Expand Up @@ -45,7 +46,10 @@ public boolean pay(Ability ability, Game game, Ability source, UUID controllerId
return false;
}

if (permanent.untap(game)) {
// 118.11 - if a stun counter replaces the untap, the cost has still been paid.
// Fear of Sleep Paralysis ruling - if the stun counter can't be removed, the untap cost hasn't been paid.
int stunCount = permanent.getCounters(game).getCount(CounterType.STUN);
if (permanent.untap(game) || (stunCount > 0 && permanent.getCounters(game).getCount(CounterType.STUN) < stunCount)) {
untapped.add(targetId);
}

Expand Down

0 comments on commit 02db93b

Please sign in to comment.