mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
Fix copied SA using old replacingObjects
This commit is contained in:
committed by
Hans Mackowiak
parent
398917d010
commit
9b8020bb30
@@ -92,14 +92,13 @@ public class SacrificeEffect extends SpellAbilityEffect {
|
|||||||
CardZoneTable zoneMovements = AbilityKey.addCardZoneTableParams(params, sa);
|
CardZoneTable zoneMovements = AbilityKey.addCardZoneTableParams(params, sa);
|
||||||
|
|
||||||
if (valid.equals("Self") && game.getZoneOf(host) != null) {
|
if (valid.equals("Self") && game.getZoneOf(host) != null) {
|
||||||
if (host.getController().equals(activator) && game.getZoneOf(host).is(ZoneType.Battlefield)) {
|
if (host.getController().equals(activator) && game.getZoneOf(host).is(ZoneType.Battlefield) &&
|
||||||
if (!optional || activator.getController().confirmAction(sa, null,
|
(!optional || activator.getController().confirmAction(sa, null,
|
||||||
Localizer.getInstance().getMessage("lblDoYouWantSacrificeThis", host.getName()), null)) {
|
Localizer.getInstance().getMessage("lblDoYouWantSacrificeThis", host.getName()), null))) {
|
||||||
if (game.getAction().sacrifice(new CardCollection(host), sa, true, params) != null && remSacrificed) {
|
if (game.getAction().sacrifice(new CardCollection(host), sa, true, params) != null && remSacrificed) {
|
||||||
host.addRemembered(host);
|
host.addRemembered(host);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
CardCollectionView choosenToSacrifice = null;
|
CardCollectionView choosenToSacrifice = null;
|
||||||
for (final Player p : getTargetPlayers(sa)) {
|
for (final Player p : getTargetPlayers(sa)) {
|
||||||
|
|||||||
@@ -1248,6 +1248,9 @@ public abstract class SpellAbility extends CardTraitBase implements ISpellAbilit
|
|||||||
clone.mayChooseNewTargets = false;
|
clone.mayChooseNewTargets = false;
|
||||||
|
|
||||||
clone.triggeringObjects = AbilityKey.newMap(this.triggeringObjects);
|
clone.triggeringObjects = AbilityKey.newMap(this.triggeringObjects);
|
||||||
|
if (!lki) {
|
||||||
|
clone.replacingObjects = AbilityKey.newMap();
|
||||||
|
}
|
||||||
|
|
||||||
clone.setPayCosts(getPayCosts().copy());
|
clone.setPayCosts(getPayCosts().copy());
|
||||||
if (manaPart != null) {
|
if (manaPart != null) {
|
||||||
|
|||||||
Reference in New Issue
Block a user