Skip to content

Commit

Permalink
refactor: fixed wrong copy code of some fields
Browse files Browse the repository at this point in the history
  • Loading branch information
JayDi85 committed Jan 22, 2025
1 parent 3f79ffa commit e6ae7e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Mage/src/main/java/mage/abilities/AbilityImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ protected AbilityImpl(final AbilityImpl 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();
Expand All @@ -131,8 +131,8 @@ protected AbilityImpl(final AbilityImpl 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;
Expand Down
2 changes: 1 addition & 1 deletion Mage/src/main/java/mage/players/PlayerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public void restore(Player player) {
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();

Expand Down

0 comments on commit e6ae7e9

Please sign in to comment.