1
0
Fork 0
mirror of https://github.com/ldericher/fftcgtool synced 2025-01-15 15:02:59 +00:00

Fix for multi-element cards

This commit is contained in:
Jörn-Michael Miehe 2020-11-07 14:11:52 +01:00
parent beda50e01d
commit 8208247a74

12
card.py
View file

@ -17,6 +17,7 @@ class Card:
self._name = "[cardback]" self._name = "[cardback]"
self._rarity = "X" self._rarity = "X"
self._element = "None" self._element = "None"
self._elements = None
self._description = "None" self._description = "None"
self._iurl = BACKURL self._iurl = BACKURL
@ -28,6 +29,17 @@ class Card:
self._rarity = data["rarity"][0] self._rarity = data["rarity"][0]
self._element = data["element"] self._element = data["element"]
# handle multi element cards
if len(data["elements"]) > 1:
self._element = "Multi"
self._elements = data["elements"]
# fix db typos
if self._serial == "12-052":
self._rarity = "H"
elif self._serial == "12-049":
self._rarity = "H"
self._description = "\n\n".join(data["abilities"]) self._description = "\n\n".join(data["abilities"])
self._iurl = FACEURL.format(self.get_id()) # official url self._iurl = FACEURL.format(self.get_id()) # official url
#self._iurl = data["image"] # ffdecks url #self._iurl = data["image"] # ffdecks url