Git Product home page Git Product logo

mtgdeckconverter's People

Contributors

luziferius avatar

Stargazers

 avatar

Watchers

 avatar

mtgdeckconverter's Issues

Implement heuristics for card guesses.

Some formats require specific information that may not be present in others. E.g. XMage requires both the set abbreviation and the collector’s number. If only the English name of a card is known, the required bits have to be guessed based on some heuristics.

Provide some configurable heuristics to do user-configurable best-effort guesses:

    • Prefer oldest or newest printing.
    • Exclude paper sets / Exclude online sets.
    • Prefer / exclude printing from masters sets
    • Prefer / exclude promotional cards
    • Prefer / exclude foil cards
    • Prefer / exclude white bordered cards
    • Select a random print

Provide a translation layer for incompatible set abbreviations. (Mostly affects promotional cards)

It seems that many platforms use their own convention for promotional cards or card sets.

When translating decks, the promotional sets have to be translated as well, as the target application may not understand the set abbreviations of the source application.

For example, TappedOut uses "000" for special promotional printings: http://tappedout.net/mtg-set/promo-set/, whilst Scryfall has a set for each individual promotional printing.

TappedOut set list: http://tappedout.net/magic-cards/
Scryfall set list: https://scryfall.com/sets

To solve this, some kind of translation layer is required.

Some promotional sets can be translated between TappedOut and Scryfall 1:1, as both sites have the same set, which only differs in the set abbreviation.

But the TappedOut "000" set needs some special handling.
A giant lookup table will solve this, but will be brittle as it has to be maintained manually.
If possible, a dynamic solution should be created for this case.

XMage: Prerelease Promo cards

Stamped cards given as a Prerelease event promo are grouped in the PTC pseudo-set in XMage. See the source code here: https://github.com/magefree/mage/blob/master/Mage.Sets/src/mage/sets/PrereleaseEvents.java

TappedOut CSV exports contain this information in the Foil column by indicating the foiling to be pre.

To Support Prerelease promos:

  • Update the Card data class. Instead of a foil boolean, use a speciality enumeration.
    @dataclass
    class Card:
    """This is a single MTG card"""
    english_name: str = None
    set_abbreviation: str = None
    # Most cards have integer collector numbers, but some require further disambiguation in the form of appended letters
    # To support collector numbers like "86a", the collector number is handled as a string.
    collector_number: str = None
    # Returned by TappedOut.
    language: str = "EN"
    foil: bool = False
    condition: str = None
  • Update the CSV parser to set the card speciality instead of the foil boolean.
  • Include a translation layer in the XMage exporter that looks at the card and replaces the set abbreviation with PTC if the card is a Prerelease promo.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.