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

@ -60,7 +60,7 @@ public class DoWhenCostPaid extends OneShotEffect {
int bookmark = game.bookmarkState();
if (cost.pay(source, game, source, player.getId(), false)) {
if (ability.getTargets().isEmpty()) {
ability.getEffects().setTargetPointer(getTargetPointer());
ability.getEffects().setTargetPointer(this.getTargetPointer().copy());
}
game.fireReflexiveTriggeredAbility(ability, source);
player.resetStoredBookmark(game);