Fix cards

This commit is contained in:
Bug Hunter
2021-03-20 03:43:12 +00:00
committed by Michael Kamensky
parent b94f40c7c4
commit be9de2cc09
8 changed files with 16 additions and 16 deletions

View File

@@ -169,6 +169,14 @@ public class AbilityUtils {
Iterables.addAll(cards, saTargeting.getTargets().getTargetCards());
}
}
else if (defined.equals("TargetedSource") && sa instanceof SpellAbility) {
final SpellAbility saTargeting = ((SpellAbility)sa).getSATargetingSA();
if (saTargeting != null) {
for (SpellAbility s : saTargeting.getTargets().getTargetSpells()) {
cards.add(s.getHostCard());
}
}
}
else if (defined.equals("ThisTargetedCard") && sa instanceof SpellAbility) { // do not add parent targeted
if (((SpellAbility)sa).getTargets() != null) {
Iterables.addAll(cards, ((SpellAbility)sa).getTargets().getTargetCards());
@@ -179,7 +187,6 @@ public class AbilityUtils {
if (parent != null) {
Iterables.addAll(cards, parent.getTargets().getTargetCards());
}
}
else if (defined.startsWith("Triggered") && sa instanceof SpellAbility) {
final SpellAbility root = ((SpellAbility)sa).getRootAbility();

View File

@@ -1473,7 +1473,8 @@ public class ChangeZoneEffect extends SpellAbilityEffect {
} else if (srcSA.getParam("Destination").equals("BottomOfLibrary")) {
movedCard = game.getAction().moveToBottomOfLibrary(tgtHost, srcSA, params);
} else if (srcSA.getParam("Destination").equals("Library")) {
movedCard = game.getAction().moveToBottomOfLibrary(tgtHost, srcSA, params);
final int libraryPos = srcSA.hasParam("LibraryPosition") ? AbilityUtils.calculateAmount(tgtHost, srcSA.getParam("LibraryPosition"), srcSA) : 0;
movedCard = game.getAction().moveToLibrary(tgtHost, libraryPos, srcSA, params);
if (srcSA.hasParam("Shuffle") && "True".equals(srcSA.getParam("Shuffle"))) {
tgtHost.getOwner().shuffle(srcSA);
}