- Added targetPointer option to GainControlTargetEffect.

This commit is contained in:
jeffwadsworth 2013-04-19 11:20:40 -05:00
parent 7939a921d4
commit 45e00b833a

View file

@ -60,6 +60,9 @@ public class GainControlTargetEffect extends ContinuousEffectImpl<GainControlTar
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Permanent permanent = game.getPermanent(source.getFirstTarget()); Permanent permanent = game.getPermanent(source.getFirstTarget());
if (targetPointer != null) {
permanent = game.getPermanent(targetPointer.getFirst(game, source));
}
if (permanent != null) { if (permanent != null) {
return permanent.changeControllerId(source.getControllerId(), game); return permanent.changeControllerId(source.getControllerId(), game);
} }