Correct UntapTargetCost similarly to UntapSourceCost per 118.11

This commit is contained in:
Grath 2024-12-01 12:21:10 -05:00
parent 996de811da
commit 02db93b75c

View file

@ -4,6 +4,7 @@ import mage.abilities.Ability;
import mage.abilities.costs.Cost; import mage.abilities.costs.Cost;
import mage.abilities.costs.CostImpl; import mage.abilities.costs.CostImpl;
import mage.constants.Outcome; import mage.constants.Outcome;
import mage.counters.CounterType;
import mage.game.Game; import mage.game.Game;
import mage.game.permanent.Permanent; import mage.game.permanent.Permanent;
import mage.target.TargetPermanent; import mage.target.TargetPermanent;
@ -45,7 +46,10 @@ public class UntapTargetCost extends CostImpl {
return false; 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); untapped.add(targetId);
} }