mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
ExchangeControlTargetEffect will now be removed from effects if it don't applies for a target.
This commit is contained in:
parent
04ca228534
commit
d542bffbff
1 changed files with 22 additions and 16 deletions
|
@ -70,6 +70,12 @@ public class ExchangeControlTargetEffect extends ContinuousEffectImpl<ExchangeCo
|
||||||
return new ExchangeControlTargetEffect(this);
|
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
|
@Override
|
||||||
public void init(Ability source, Game game) {
|
public void init(Ability source, Game game) {
|
||||||
Set<UUID> controllers = new HashSet<UUID>();
|
Set<UUID> controllers = new HashSet<UUID>();
|
||||||
|
|
Loading…
Reference in a new issue