1
0
Fork 0
mirror of https://github.com/correl/mage.git synced 2025-04-12 17:00:08 -09:00

Fixed getLastKnownInformation not working for tokens.

This commit is contained in:
magenoxx 2011-08-15 19:08:53 +04:00
parent 0341751610
commit f488b0268a

View file

@ -79,6 +79,7 @@ public class PermanentToken extends PermanentImpl<PermanentToken> {
@Override
public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag) {
if (!game.replaceEvent(new ZoneChangeEvent(this, this.getControllerId(), Zone.BATTLEFIELD, zone))) {
game.rememberLKI(objectId, Zone.BATTLEFIELD, this);
if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) {
game.fireEvent(new ZoneChangeEvent(this, this.getControllerId(), Zone.BATTLEFIELD, zone));
return true;
@ -90,6 +91,7 @@ public class PermanentToken extends PermanentImpl<PermanentToken> {
@Override
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game) {
if (!game.replaceEvent(new ZoneChangeEvent(this, sourceId, this.getControllerId(), Zone.BATTLEFIELD, Zone.EXILED))) {
game.rememberLKI(objectId, Zone.BATTLEFIELD, this);
if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) {
game.fireEvent(new ZoneChangeEvent(this, sourceId, this.getControllerId(), Zone.BATTLEFIELD, Zone.EXILED));
return true;