ManaEffect: fix for adding from cost with generic half

This commit is contained in:
tool4EvEr
2022-02-23 15:43:03 +01:00
parent a70e75f04e
commit 885b32f85a
6 changed files with 23 additions and 16 deletions

View File

@@ -217,7 +217,7 @@ public class CreatureEvaluator implements Function<Card, Integer> {
value += addValue(14, "paired");
}
if (!c.getEncodedCards().isEmpty()) {
if (!c.hasEncodedCard()) {
value += addValue(24, "encoded");
}

View File

@@ -1333,7 +1333,7 @@ public class AttachAi extends SpellAbilityAi {
CardCollection preferred = CardLists.filter(list, new Predicate<Card>() {
@Override
public boolean apply(final Card card) {
return card.getAttachedCards().isEmpty();
return !card.hasCardAttachments();
}
});
return preferred.isEmpty() ? Aggregates.random(list) : Aggregates.random(preferred);