refactor: fixed wrong copy code of some fields

This commit is contained in:
Oleg Agafonov 2025-01-22 19:35:43 +04:00
parent 3f79ffa21a
commit e6ae7e9114
2 changed files with 4 additions and 4 deletions

View file

@ -116,7 +116,7 @@ public abstract class AbilityImpl implements Ability {
this.manaCosts = ability.manaCosts.copy();
this.manaCostsToPay = ability.manaCostsToPay.copy();
this.costs = ability.costs.copy();
this.watchers = CardUtil.deepCopyObject(ability.getWatchers());
this.watchers = CardUtil.deepCopyObject(ability.watchers);
this.subAbilities = CardUtil.deepCopyObject(ability.subAbilities);
this.modes = ability.getModes().copy();
@ -131,8 +131,8 @@ public abstract class AbilityImpl implements Ability {
this.canFizzle = ability.canFizzle;
this.targetAdjuster = ability.targetAdjuster;
this.costAdjuster = ability.costAdjuster;
this.hints = CardUtil.deepCopyObject(ability.getHints());
this.icons = CardUtil.deepCopyObject(ability.getIcons());
this.hints = CardUtil.deepCopyObject(ability.hints);
this.icons = CardUtil.deepCopyObject(ability.icons);
this.customOutcome = ability.customOutcome;
this.identifier = ability.identifier;
this.activated = ability.activated;

View file

@ -366,7 +366,7 @@ public abstract class PlayerImpl implements Player, Serializable {
this.canPlotFromTopOfLibrary = player.canPlotFromTopOfLibrary();
this.drawsFromBottom = player.isDrawsFromBottom();
this.drawsOnOpponentsTurn = player.isDrawsOnOpponentsTurn();
this.alternativeSourceCosts = CardUtil.deepCopyObject(player.getAlternativeSourceCosts());
this.alternativeSourceCosts = CardUtil.deepCopyObject(((PlayerImpl) player).alternativeSourceCosts);
this.topCardRevealed = player.isTopCardRevealed();