Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use legality[legacy] to determine if a card is "playable" or not, not layout #11630

Closed
bakert opened this issue Aug 27, 2023 · 2 comments
Closed
Labels
triage Used by bot to label unlabeled tasks, will be removed automatically upon labeling

Comments

@bakert
Copy link
Member

bakert commented Aug 27, 2023

Scryfall recently added "Virtuous // Royal" (a token) as layout=flip breaking the previous clean division between "layouts that are playable" and "layouts that are not playable". This was what they suggested was the best way to determine if a card might be useful to us. Obviously we will have to check for banned as well as legal, but presumably tokens and things have some other value than legal/banned that mean we can ignore them.

@github-actions github-actions bot added the triage Used by bot to label unlabeled tasks, will be removed automatically upon labeling label Aug 27, 2023
@silasary
Copy link
Member

Non-game pieces will have legacy: "not_legal". Note that this would exclude Gleemox, a card that ostensibly has the potential to become PD Legal.

@bakert
Copy link
Member Author

bakert commented Sep 6, 2023

After much chat on the Scryfall discord we did this with:

-            if p.get('type_line') == 'Card':
+            # Exclude "Card"s which is a whole group of weird things, and also any tokens that have a playable layout.
+            if re.search(r'\b(token|card)\b', p.get('type_line', ''), re.IGNORECASE):
                 continue

@bakert bakert closed this as completed Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Used by bot to label unlabeled tasks, will be removed automatically upon labeling
Projects
None yet
Development

No branches or pull requests

2 participants