mirror of
https://github.com/correl/mage.git
synced 2024-11-15 19:19:33 +00:00
* 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:
parent
7897485539
commit
02b14f63c7
1 changed files with 3 additions and 2 deletions
|
@ -86,13 +86,14 @@ class CloneLegionEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Player controller = game.getPlayer(source.getControllerId());
|
||||
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)) {
|
||||
if (permanent != null) {
|
||||
EmptyToken token = new EmptyToken();
|
||||
CardUtil.copyTo(token).from(permanent);
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), targetPlayer.getId());
|
||||
token.putOntoBattlefield(1, game, source.getSourceId(), controller.getId());
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue