ExchangeControlTargetEffect will now be removed from effects if it don't applies for a target.

This commit is contained in:
LevelX2 2012-10-04 18:20:10 +02:00
parent 04ca228534
commit d542bffbff

View file

@ -70,6 +70,12 @@ public class ExchangeControlTargetEffect extends ContinuousEffectImpl<ExchangeCo
return new ExchangeControlTargetEffect(this);
}
@Override
public boolean isInactive(Ability source, Game game) {
// if there are no more creatures that are effected, the effect can be removed
return this.lockedControllers != null && this.lockedControllers.size() > 0;
}
@Override
public void init(Ability source, Game game) {
Set<UUID> controllers = new HashSet<UUID>();