mirror of
https://github.com/magefree/mage.git
synced 2026-01-26 21:29:17 -08:00
Fixed getLastKnownInformation not working for tokens.
This commit is contained in:
parent
0341751610
commit
f488b0268a
1 changed files with 2 additions and 0 deletions
|
|
@ -79,6 +79,7 @@ public class PermanentToken extends PermanentImpl<PermanentToken> {
|
||||||
@Override
|
@Override
|
||||||
public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag) {
|
public boolean moveToZone(Zone zone, UUID sourceId, Game game, boolean flag) {
|
||||||
if (!game.replaceEvent(new ZoneChangeEvent(this, this.getControllerId(), Zone.BATTLEFIELD, zone))) {
|
if (!game.replaceEvent(new ZoneChangeEvent(this, this.getControllerId(), Zone.BATTLEFIELD, zone))) {
|
||||||
|
game.rememberLKI(objectId, Zone.BATTLEFIELD, this);
|
||||||
if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) {
|
if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) {
|
||||||
game.fireEvent(new ZoneChangeEvent(this, this.getControllerId(), Zone.BATTLEFIELD, zone));
|
game.fireEvent(new ZoneChangeEvent(this, this.getControllerId(), Zone.BATTLEFIELD, zone));
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -90,6 +91,7 @@ public class PermanentToken extends PermanentImpl<PermanentToken> {
|
||||||
@Override
|
@Override
|
||||||
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game) {
|
public boolean moveToExile(UUID exileId, String name, UUID sourceId, Game game) {
|
||||||
if (!game.replaceEvent(new ZoneChangeEvent(this, sourceId, this.getControllerId(), Zone.BATTLEFIELD, Zone.EXILED))) {
|
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)) {
|
if (game.getPlayer(controllerId).removeFromBattlefield(this, game)) {
|
||||||
game.fireEvent(new ZoneChangeEvent(this, sourceId, this.getControllerId(), Zone.BATTLEFIELD, Zone.EXILED));
|
game.fireEvent(new ZoneChangeEvent(this, sourceId, this.getControllerId(), Zone.BATTLEFIELD, Zone.EXILED));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue