1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-06 01:04:10 -09:00
This commit is contained in:
jeffwadsworth 2020-07-06 11:50:40 -05:00
parent 1532daf9c4
commit 29eb93ad15

View file

@ -35,6 +35,11 @@ public class CantAttackYouEffect extends RestrictionEffect {
if (defenderId == null) {
return true;
}
// A planeswalker controlled by the controller is the defender
if (game.getPermanent(defenderId) != null) {
return !game.getPermanent(defenderId).getControllerId().equals(source.getControllerId());
}
// The controller is the defender
return !defenderId.equals(source.getControllerId());
}
}