mirror of
https://github.com/magefree/mage.git
synced 2025-12-20 02:30:08 -08:00
Correct UntapTargetCost similarly to UntapSourceCost per 118.11
This commit is contained in:
parent
996de811da
commit
02db93b75c
1 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue