Fixed miss copy code in Game object (lki, cards), removed unused code. Possible fixes:

* simulated games was able to change objects from another games (ConcurrentModificationException, related to d202278ccd, details in 3a6cdd2615);
* AI: fixed cards disappear in multiplayer games with computer (details in #6738);
This commit is contained in:
Oleg Agafonov 2021-08-12 00:07:40 +04:00
parent 9f882824a0
commit 1664ee01cf
39 changed files with 201 additions and 125 deletions

View file

@ -13,6 +13,7 @@ import mage.constants.SubTypeSet;
import mage.constants.SuperType;
import mage.game.Game;
import mage.game.events.ZoneChangeEvent;
import mage.util.Copyable;
import mage.util.SubTypes;
import java.io.Serializable;
@ -21,7 +22,7 @@ import java.util.Collection;
import java.util.List;
import java.util.Set;
public interface MageObject extends MageItem, Serializable {
public interface MageObject extends MageItem, Serializable, Copyable<MageObject> {
String getName();
@ -136,6 +137,7 @@ public interface MageObject extends MageItem, Serializable {
void adjustTargets(Ability ability, Game game);
// memory object copy (not mtg)
@Override
MageObject copy();
// copied card info (mtg)