Fix copied SA using old replacingObjects

This commit is contained in:
tool4EvEr
2025-09-18 21:01:42 +02:00
committed by Hans Mackowiak
parent 398917d010
commit 9b8020bb30
2 changed files with 8 additions and 6 deletions

View File

@@ -92,12 +92,11 @@ public class SacrificeEffect extends SpellAbilityEffect {
CardZoneTable zoneMovements = AbilityKey.addCardZoneTableParams(params, sa);
if (valid.equals("Self") && game.getZoneOf(host) != null) {
if (host.getController().equals(activator) && game.getZoneOf(host).is(ZoneType.Battlefield)) {
if (!optional || activator.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblDoYouWantSacrificeThis", host.getName()), null)) {
if (game.getAction().sacrifice(new CardCollection(host), sa, true, params) != null && remSacrificed) {
host.addRemembered(host);
}
if (host.getController().equals(activator) && game.getZoneOf(host).is(ZoneType.Battlefield) &&
(!optional || activator.getController().confirmAction(sa, null,
Localizer.getInstance().getMessage("lblDoYouWantSacrificeThis", host.getName()), null))) {
if (game.getAction().sacrifice(new CardCollection(host), sa, true, params) != null && remSacrificed) {
host.addRemembered(host);
}
}
} else {

View File

@@ -1248,6 +1248,9 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
clone.mayChooseNewTargets = false;
clone.triggeringObjects = AbilityKey.newMap(this.triggeringObjects);
if (!lki) {
clone.replacingObjects = AbilityKey.newMap();
}
clone.setPayCosts(getPayCosts().copy());
if (manaPart != null) {