refactor: use copy() for targetPointer (#11751)

This commit is contained in:
xenohedron 2024-02-03 01:21:16 -05:00 committed by GitHub
parent da2466d87d
commit 6cf05a554c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
42 changed files with 52 additions and 55 deletions

View file

@ -49,7 +49,7 @@ public class CreateDelayedTriggeredAbilityEffect extends OneShotEffect {
DelayedTriggeredAbility delayedAbility = ability.copy();
if (this.copyTargets) {
if (source.getTargets().isEmpty()) {
delayedAbility.getEffects().setTargetPointer(targetPointer);
delayedAbility.getEffects().setTargetPointer(this.getTargetPointer().copy());
} else {
delayedAbility.getTargets().addAll(source.getTargets());
for (Effect effect : delayedAbility.getEffects()) {