april / decklist

The code behind decklist.org, which generates DCI Registration Sheets.
https://decklist.org/
MIT License
44 stars 20 forks source link

Sorting by CMC just sorts alphabetically #69

Open mlex121 opened 4 years ago

mlex121 commented 4 years ago

When I put in my Jund Sacrifice decklist and hit sort by CMC I get all of the cards sorted in alphabetical order instead. I've seen this issue before with my Dredge decklist too.

Screenshot included for clarity: decklist-org-sort-by-cmc-broken

If it helps, this is the maindeck and sideboard I used:

3 Beanstalk Giant
4 Blood Crypt
1 Castle Locthwain
4 Casualties of War
4 Cauldron Familiar
4 Fabled Passage
5 Forest
4 Gilded Goose
3 Korvold, Fae-Cursed King
1 Massacre Girl
4 Mayhem Devil
1 Mountain
3 Murderous Rider
4 Overgrown Tomb
4 Stomping Ground
2 Swamp
1 Thrashing Brontodon
4 Trail of Crumbs
4 Witch's Oven
2 Duress
3 Lovestruck Beast
1 Massacre Girl
4 Noxious Grasp
2 Shifting Ceratops
1 Thrashing Brontodon
2 Wicked Wolf
mlex121 commented 4 years ago

Doing a bit of investigating, it looks like in recent iterations of your minified card database the m value (I'm assuming this is mana cost) is 99 for every card. It looks like this changed in the following commit: https://github.com/april/decklist/commit/e8c03531349f04eed60e5c8c1a8ccb51282f65c6#diff-bdfbee1a8ea3d6e692992108bd5c18b1

mlex121 commented 4 years ago

Talking about this file: js/cards/decklist-cards-min.js

Nightfirecat commented 4 years ago

This would be fixed by #65