mirror of
https://github.com/correl/mage.git
synced 2024-12-25 03:00:15 +00:00
restriction effects for untap phase
This commit is contained in:
parent
fe4ba3c590
commit
b82d52d34c
2 changed files with 10 additions and 1 deletions
|
@ -68,5 +68,9 @@ public abstract class RestrictionEffect<T extends RestrictionEffect<T>> extends
|
|||
public boolean canBeBlocked(Permanent attacker, Permanent blocker, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean canBeUntapped(Permanent permanent, Game game) {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ import mage.abilities.SpecialAction;
|
|||
import mage.abilities.SpellAbility;
|
||||
import mage.abilities.TriggeredAbility;
|
||||
import mage.abilities.common.PassAbility;
|
||||
import mage.abilities.effects.RestrictionEffect;
|
||||
import mage.abilities.keyword.*;
|
||||
import mage.abilities.mana.ManaAbility;
|
||||
import mage.abilities.mana.ManaOptions;
|
||||
|
@ -571,7 +572,11 @@ public abstract class PlayerImpl<T extends PlayerImpl<T>> implements Player, Ser
|
|||
public void untap(Game game) {
|
||||
//20091005 - 502.2
|
||||
for (Permanent permanent: game.getBattlefield().getAllActivePermanents(playerId)) {
|
||||
permanent.untap(game);
|
||||
boolean untap = true;
|
||||
for (RestrictionEffect effect : game.getContinuousEffects().getApplicableRestrictionEffects(permanent, game)) {
|
||||
untap &= effect.canBeUntapped(permanent, game);
|
||||
}
|
||||
if (untap) permanent.untap(game);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue