mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
- Added targetPointer option to GainControlTargetEffect.
This commit is contained in:
parent
7939a921d4
commit
45e00b833a
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue