mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 02:08:00 +00:00
Better way to handle AllCreatureTypes
This commit is contained in:
@@ -1206,9 +1206,10 @@ public class CardFactoryUtil {
|
|||||||
// Figure out how to count each class separately.
|
// Figure out how to count each class separately.
|
||||||
for (Card card : adventurers) {
|
for (Card card : adventurers) {
|
||||||
Set<String> creatureTypes = card.getType().getCreatureTypes();
|
Set<String> creatureTypes = card.getType().getCreatureTypes();
|
||||||
|
boolean anyType = creatureTypes.contains("AllCreatureTypes");
|
||||||
creatureTypes.retainAll(partyTypes);
|
creatureTypes.retainAll(partyTypes);
|
||||||
|
|
||||||
if (creatureTypes.size() == 4 || card.hasKeyword("Changeling")) {
|
if (anyType || creatureTypes.size() == 4) {
|
||||||
wildcard.add(card);
|
wildcard.add(card);
|
||||||
|
|
||||||
if (wildcard.size() >= 4) {
|
if (wildcard.size() >= 4) {
|
||||||
|
|||||||
Reference in New Issue
Block a user