mirror of
https://github.com/magefree/mage.git
synced 2025-12-26 05:22:02 -08:00
Fixed combat information not being preserved in LKI and added unit test
This commit is contained in:
parent
5e67314c96
commit
27d4fb13c3
4 changed files with 49 additions and 4 deletions
|
|
@ -382,8 +382,8 @@ public final class ZonesHandler {
|
|||
} else if (event.getTarget() != null) {
|
||||
card.setFaceDown(info.faceDown, game);
|
||||
Permanent target = event.getTarget();
|
||||
success = game.getPlayer(target.getControllerId()).removeFromBattlefield(target, source, game)
|
||||
&& target.removeFromZone(game, fromZone, source);
|
||||
success = target.removeFromZone(game, fromZone, source)
|
||||
&& game.getPlayer(target.getControllerId()).removeFromBattlefield(target, source, game);
|
||||
} else {
|
||||
card.setFaceDown(info.faceDown, game);
|
||||
success = card.removeFromZone(game, fromZone, source);
|
||||
|
|
|
|||
|
|
@ -1723,7 +1723,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
Zone fromZone = game.getState().getZone(objectId);
|
||||
Player controller = game.getPlayer(controllerId);
|
||||
if (controller != null) {
|
||||
ZoneChangeEvent event = new ZoneChangeEvent(this.copy(), source, controllerId, fromZone, toZone, appliedEffects);
|
||||
ZoneChangeEvent event = new ZoneChangeEvent(this, source, controllerId, fromZone, toZone, appliedEffects);
|
||||
ZoneChangeInfo zoneChangeInfo;
|
||||
if (toZone == Zone.LIBRARY) {
|
||||
zoneChangeInfo = new ZoneChangeInfo.Library(event, flag /* put on top */);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue