* Clone Legion - Fixed that the created tokens came into play under control of the target player instead of the controller.

This commit is contained in:
LevelX2 2015-04-18 09:42:25 +02:00
parent 7897485539
commit 02b14f63c7

View file

@ -86,13 +86,14 @@ class CloneLegionEffect extends OneShotEffect {
@Override @Override
public boolean apply(Game game, Ability source) { public boolean apply(Game game, Ability source) {
Player controller = game.getPlayer(source.getControllerId());
Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source)); Player targetPlayer = game.getPlayer(targetPointer.getFirst(game, source));
if (targetPlayer != null) { if (controller != null && targetPlayer != null) {
for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), targetPlayer.getId(), game)) { for (Permanent permanent : game.getBattlefield().getAllActivePermanents(new FilterCreaturePermanent(), targetPlayer.getId(), game)) {
if (permanent != null) { if (permanent != null) {
EmptyToken token = new EmptyToken(); EmptyToken token = new EmptyToken();
CardUtil.copyTo(token).from(permanent); CardUtil.copyTo(token).from(permanent);
token.putOntoBattlefield(1, game, source.getSourceId(), targetPlayer.getId()); token.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
} }
} }
return true; return true;