Script fixes (#4774)

This commit is contained in:
tool4ever
2024-03-02 08:42:05 +01:00
committed by GitHub
parent 50d6a950c4
commit 587d66457b
9 changed files with 15 additions and 14 deletions

View File

@@ -110,6 +110,10 @@ public class CloneEffect extends SpellAbilityEffect {
return;
}
if ("UntilTargetedUntaps".equals(sa.getParam("Duration")) && !cardToCopy.isTapped()) {
return;
}
// find target of cloning i.e. card becoming a clone
if (sa.hasParam("CloneTarget")) {
cloneTargets = AbilityUtils.getDefinedCards(host, sa.getParam("CloneTarget"), sa);
@@ -127,7 +131,6 @@ public class CloneEffect extends SpellAbilityEffect {
}
for (Card tgtCard : cloneTargets) {
game.getTriggerHandler().clearActiveTriggers(tgtCard, null);
if (sa.hasParam("CloneZone") &&
!tgtCard.isInZone(ZoneType.smartValueOf(sa.getParam("CloneZone")))) {
continue;
@@ -137,9 +140,7 @@ public class CloneEffect extends SpellAbilityEffect {
continue;
}
if ("UntilTargetedUntaps".equals(sa.getParam("Duration")) && !cardToCopy.isTapped()) {
continue;
}
game.getTriggerHandler().clearActiveTriggers(tgtCard, null);
final Long ts = game.getNextTimestamp();
tgtCard.addCloneState(CardFactory.getCloneStates(cardToCopy, tgtCard, sa), ts);