mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 20:58:03 +00:00
Fix cards
This commit is contained in:
committed by
Michael Kamensky
parent
b94f40c7c4
commit
be9de2cc09
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user