Closed Nightfirecat closed 6 years ago
For testing this PR, I've been using variations of the following maindeck and sideboard fields to test a variety of types, colors, unrecognized cards, unparseable lines, duplicate entries, etc. Feel free to use it or use your own testing decks.
Also, this PR is what's available at https://nightfirecat.github.io/decklist
main:
1 Lim-Dûl's Vault
1 mother of runes
1 thalia, guardian of thraben
1 snapcaster mage
1 brainstorm
1 thoughtseize
1 inquisition of kozilek
1 lightning bolt
1 pyroblast
1 Tarmogoyf
2x Tarmogoyf
3 [FUT] Tarmogoyf
1 meddling mage
1 kolaghan's command
1 karn liberated
3 underground sea
1 sensei's divining top
15 plains
SB: 1 misty rainforest
Sideboard
1 Tarmogoyf
2 tarmogoof
3 lose hope
side:
1 liliana of the veil
1liliana of the veil
1liliana of the veil
1 tarmogoof
1 tarmogoof
2 underground sea
5 conflux
1 plains
1 island
1 swamp
1 mountain
1 forest
1 flooded strand
1 polluted delta
1 scalding tarn
1 verdant catacombs
@april Could you review this when you have some time?
Thank you so much for the shitton of work that went into this. Sorry for taking so darned long to merge it!
BTW, you mind if I credit you on Twitter?
I'm happy to be credited for it, I'm @Nightfirecat
there as well.
In addition to adding the StarCityGames decksheet format, a number of under-the-covers changes occurred to facilitate generalizing the codebase to allow multiple decksheet layouts. Some of these changes are as follows:
cards
array) in decklist layout rather than simple name-quantity arrays.name
attributes updated for ease of selection.eslint
directives have been added to main.js and decklist.js to minimize errorsWith all that said, there are some other possible features that have not been included in this PR, such as:
Finally, due to the update to parsing, there are some changes to existing behavior--primarily small changes in behavior of how unrecognized cards are sorted in lists. As much as possible, the new parsing code behaves similarly to existing code, with the caveat that sorting is not necessarily stable, which likely explains the previously-mentioned sorting discrepancies.
Closes april/decklist#8 Fixes april/decklist#32 Fixes april/decklist#38 Supersedes april/decklist#35 Supersedes april/decklist#39 Supersedes april/decklist#40