getTargetableCards: Fix AI NPE

This commit is contained in:
Bug Hunter
2021-04-28 21:13:19 +00:00
committed by Hans Mackowiak
parent 5f5357d28a
commit 8e4c40ba2a
2 changed files with 4 additions and 6 deletions

View File

@@ -232,8 +232,8 @@ public class CardLists {
public static CardCollection getTargetableCards(Iterable<Card> cardList, SpellAbility source) {
CardCollection result = CardLists.filter(cardList, CardPredicates.isTargetableBy(source));
// Filter more cards that can only be detected along with other candiates
if (source.getTargets().isEmpty() && source.getMinTargets() >= 2) {
// Filter more cards that can only be detected along with other candidates
if (source.getTargets().isEmpty() && source.usesTargeting() && source.getMinTargets() >= 2) {
CardCollection removeList = new CardCollection();
TargetRestrictions tr = source.getTargetRestrictions();
for (final Card card : cardList) {