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

Art Series Cards missing in scryfall non-playable layouts #25

Open
BDTrooper opened this issue Jun 21, 2024 · 0 comments
Open

Art Series Cards missing in scryfall non-playable layouts #25

BDTrooper opened this issue Jun 21, 2024 · 0 comments

Comments

@BDTrooper
Copy link

dict of such cards have:
'layout': 'art_series'

    def normal_playable_cards(self):
        """Returns a new list of cards with all the special non-playable cards like emblems and tokens removed from
        this list. For magicthegathering.io api removes also cards which are backsides or flipsides of normal cards.

        Returns:
            PCardList: A new list of cards with all the special non-playable cards removed.
        """
        if self.api_type == 'scryfall':
            non_playable_layouts = ['vanguard', 'scheme', 'planar', 'emblem', 'token', 'double_faced_token']
            return self.filtered(lambda card: card.layout not in non_playable_layouts)
        else:
            non_playable_layouts = ['token', 'plane', 'scheme', 'phenomenon', 'vanguard', 'conspiracy']
            face_layouts = ['split', 'flip', 'double-faced', 'aftermath']

            return self.filtered(lambda card: card.layout not in face_layouts and self.name == self.names[0] or
                                 self.layout in non_playable_layouts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant