mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
- Fixed targeted SpellAbility for some cards with counter effect (please review)
This commit is contained in:
@@ -997,6 +997,8 @@ public class AbilityUtils {
|
|||||||
if (instanceSA != null) {
|
if (instanceSA != null) {
|
||||||
sas.add(instanceSA);
|
sas.add(instanceSA);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sas.add(targetSpell);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,10 +36,6 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
|
|||||||
final ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination"));
|
final ZoneType destination = ZoneType.smartValueOf(sa.getParam("Destination"));
|
||||||
final List<ZoneType> origin = ZoneType.listValueOf(sa.getParam("Origin"));
|
final List<ZoneType> origin = ZoneType.listValueOf(sa.getParam("Origin"));
|
||||||
|
|
||||||
if(origin.contains(ZoneType.Library) && sa.hasParam("Search")) {
|
|
||||||
sa.getActivatingPlayer().incLibrarySearched();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<Card> cards = new ArrayList<Card>();
|
List<Card> cards = new ArrayList<Card>();
|
||||||
|
|
||||||
List<Player> tgtPlayers = getTargetPlayers(sa);
|
List<Player> tgtPlayers = getTargetPlayers(sa);
|
||||||
@@ -56,7 +52,6 @@ public class ChangeZoneAllEffect extends SpellAbilityEffect {
|
|||||||
// Search library using changezoneall effect need a param "Search"
|
// Search library using changezoneall effect need a param "Search"
|
||||||
if (sa.getActivatingPlayer().hasKeyword("LimitSearchLibrary")) {
|
if (sa.getActivatingPlayer().hasKeyword("LimitSearchLibrary")) {
|
||||||
for (final Player p : tgtPlayers) {
|
for (final Player p : tgtPlayers) {
|
||||||
cards.addAll(p.getCardsIn(origin));
|
|
||||||
cards.removeAll(p.getCardsIn(ZoneType.Library));
|
cards.removeAll(p.getCardsIn(ZoneType.Library));
|
||||||
int fetchNum = Math.min(p.getCardsIn(ZoneType.Library).size(), 4);
|
int fetchNum = Math.min(p.getCardsIn(ZoneType.Library).size(), 4);
|
||||||
cards.addAll(p.getCardsIn(ZoneType.Library, fetchNum));
|
cards.addAll(p.getCardsIn(ZoneType.Library, fetchNum));
|
||||||
|
|||||||
Reference in New Issue
Block a user