add isOwned and isControlled methods. remove some null-checks, remove some unnecessary casts

This commit is contained in:
igoudt 2018-07-04 14:24:11 +02:00
parent e46ad02918
commit 9f06046f22
464 changed files with 567 additions and 562 deletions

View file

@ -94,7 +94,7 @@ public class DontUntapInPlayersNextUntapStepAllEffect extends ContinuousRuleModi
Permanent permanent = game.getPermanent(event.getTargetId());
if (permanent != null) {
Player controller = game.getPlayer(source.getControllerId());
if (!permanent.getControllerId().equals(getTargetPointer().getFirst(game, source))) {
if (!permanent.isControlledBy(getTargetPointer().getFirst(game, source))) {
return false;
}
if (controller != null && !game.isOpponent(controller, permanent.getControllerId())) {