* Fixed a bug of Exchange control were activated abilities got the wrong controller.

This commit is contained in:
LevelX2 2014-12-27 02:18:29 +01:00
parent 6c93ba1285
commit 18e4bc7f18
4 changed files with 60 additions and 3 deletions

View file

@ -133,6 +133,7 @@ public class ExchangeControlTargetEffect extends ContinuousEffectImpl {
continue;
}
permanent.changeControllerId(lockedControllers.get(permanent.getId()), game);
permanent.getAbilities().setControllerId(lockedControllers.get(permanent.getId()));
}
if (!toDelete.isEmpty()) {
for(UUID uuid: toDelete) {

View file

@ -1292,11 +1292,10 @@ public abstract class GameImpl implements Game, Serializable {
}
applier.apply(this, permanent);
Ability newAbility = source.copy();
CopyEffect newEffect = new CopyEffect(duration, permanent, copyToPermanent.getId());
newEffect.newId();
newEffect.setApplier(applier);
Ability newAbility = source.copy();
newEffect.init(newAbility, this);
// handle copies of copies