forked from External/mage
* Fixed some target pointer handling.
This commit is contained in:
parent
88dd301f82
commit
c02c5a175b
14 changed files with 140 additions and 108 deletions
|
|
@ -1,15 +1,14 @@
|
|||
package mage.target.targetpointer;
|
||||
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
import mage.abilities.Ability;
|
||||
import mage.cards.Card;
|
||||
import mage.constants.Zone;
|
||||
import mage.game.Game;
|
||||
import mage.game.permanent.Permanent;
|
||||
|
||||
public class FixedTarget implements TargetPointer {
|
||||
|
||||
|
|
@ -65,10 +64,7 @@ public class FixedTarget implements TargetPointer {
|
|||
public void init(Game game, Ability source) {
|
||||
if (!initialized) {
|
||||
initialized = true;
|
||||
Card card = game.getCard(targetId);
|
||||
if (card != null) {
|
||||
this.zoneChangeCounter = card.getZoneChangeCounter(game);
|
||||
}
|
||||
this.zoneChangeCounter = game.getState().getZoneChangeCounter(targetId);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -121,4 +117,10 @@ public class FixedTarget implements TargetPointer {
|
|||
return permanent;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FixedTarget getFixedTarget(Game game, Ability source) {
|
||||
init(game, source);
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue