mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Splinter Twin - Fixed that no token was created if the enchnated permanent left battlefield meanwhile (fixes #1429).
This commit is contained in:
parent
0f4294a66c
commit
0e4de763d8
2 changed files with 77 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ import mage.constants.Outcome;
|
|||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
import mage.game.permanent.token.EmptyToken;
|
||||
import mage.target.targetpointer.FixedTarget;
|
||||
import mage.util.CardUtil;
|
||||
import mage.util.functions.ApplyToPermanent;
|
||||
import mage.util.functions.EmptyApplyToPermanent;
|
||||
|
|
@ -125,7 +126,13 @@ public class PutTokenOntoBattlefieldCopyTargetEffect extends OneShotEffect {
|
|||
|
||||
@Override
|
||||
public boolean apply(Game game, Ability source) {
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(getTargetPointer().getFirst(game, source));
|
||||
UUID targetId;
|
||||
if (getTargetPointer() instanceof FixedTarget) {
|
||||
targetId = ((FixedTarget) getTargetPointer()).getTarget();
|
||||
} else {
|
||||
targetId = getTargetPointer().getFirst(game, source);
|
||||
}
|
||||
Permanent permanent = game.getPermanentOrLKIBattlefield(targetId);
|
||||
Card copyFrom;
|
||||
ApplyToPermanent applier = new EmptyApplyToPermanent();
|
||||
if (permanent != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue