guidokessels / xwing-data

An easy-to-use collection of data and images from X-Wing: The Miniatures Game by Fantasy Flight Games.
94 stars 38 forks source link

Properly represent Dual Upgrade Cards #93

Closed philtomblin closed 7 years ago

philtomblin commented 7 years ago

At the moment we have the two sides of each dual upgrade card represented as separate upgrade cards, which isn't really correct. From a squad builder perspective, for example, the player selects both cards but has the option to flip it, to show the two different sides.

I propose to modify the upgrade card schema to allow a card to be either a single upgrade (as now - no breaking fix) or a dual card, to which two card objects are attached.

I will raise a pull request but comments welcome in the meantime...

philtomblin commented 7 years ago

Hmm... I've been looking at this some more and cannot see a clean way of doing this that doesn't make the backend more clunky than simply including the merge logic there, instead of putting it in the data, without breaking backward compatibility.

I'll close this issue but if someone thinks of a nice solution, feel free to re-open it.