mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 02:38:02 +00:00
PlayEffect: don't cast to CardCollection
This commit is contained in:
@@ -78,7 +78,9 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
if (sa.hasParam("ValidZone")) {
|
if (sa.hasParam("ValidZone")) {
|
||||||
zone = ZoneType.smartValueOf(sa.getParam("ValidZone"));
|
zone = ZoneType.smartValueOf(sa.getParam("ValidZone"));
|
||||||
}
|
}
|
||||||
tgtCards = (CardCollection)AbilityUtils.filterListByType(game.getCardsIn(zone), sa.getParam("Valid"), sa);
|
tgtCards = new CardCollection(
|
||||||
|
AbilityUtils.filterListByType(game.getCardsIn(zone), sa.getParam("Valid"), sa)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else if (sa.hasParam("AnySupportedCard")) {
|
else if (sa.hasParam("AnySupportedCard")) {
|
||||||
List<PaperCard> cards = Lists.newArrayList(StaticData.instance().getCommonCards().getUniqueCards());
|
List<PaperCard> cards = Lists.newArrayList(StaticData.instance().getCommonCards().getUniqueCards());
|
||||||
@@ -110,7 +112,11 @@ public class PlayEffect extends SpellAbilityEffect {
|
|||||||
}
|
}
|
||||||
if (sa.hasParam("ChoiceNum")) {
|
if (sa.hasParam("ChoiceNum")) {
|
||||||
final int choicenum = AbilityUtils.calculateAmount(source, sa.getParam("ChoiceNum"), sa);
|
final int choicenum = AbilityUtils.calculateAmount(source, sa.getParam("ChoiceNum"), sa);
|
||||||
tgtCards = (CardCollection)activator.getController().chooseCardsForEffect(choice, sa, source + " - Choose up to " + Lang.nounWithNumeral(choicenum, "card"), 0, choicenum, true);
|
tgtCards = new CardCollection(
|
||||||
|
activator.getController().chooseCardsForEffect(choice, sa,
|
||||||
|
source + " - Choose up to " + Lang.nounWithNumeral(choicenum, "card"), 0, choicenum, true
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tgtCards = choice;
|
tgtCards = choice;
|
||||||
|
|||||||
Reference in New Issue
Block a user