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

@ -84,7 +84,7 @@ public class EvolveAbility extends TriggeredAbilityImpl {
Permanent triggeringCreature = game.getPermanent(event.getTargetId());
if (triggeringCreature != null
&& triggeringCreature.isCreature()
&& triggeringCreature.getControllerId().equals(this.controllerId)) {
&& triggeringCreature.isControlledBy(this.controllerId)) {
Permanent sourceCreature = game.getPermanent(sourceId);
if (sourceCreature != null && isPowerOrThoughnessGreater(sourceCreature, triggeringCreature)) {
this.getEffects().get(0).setTargetPointer(new FixedTarget(event.getTargetId()));