1
0
Fork 0
mirror of https://github.com/ldericher/fftcgtool synced 2025-01-15 23:03:00 +00:00
fftcgtool/fftcg/opus.py
2021-08-04 03:39:19 +02:00

22 lines
567 B
Python

import roman
from .cards import Cards
class Opus(Cards):
def __init__(self, number):
if isinstance(number, int):
number = f"Opus {roman.toRoman(number)}"
params = {
"text": "",
"element": ["fire"],
"set": [number],
}
Cards.__init__(self, params)
# sort every element alphabetically
self.sort(key=lambda x: x.get_code())
self.sort(key=lambda x: x.get_name())
self.sort(key=lambda x: "Multi" if len(x.get_elements()) > 1 else x.get_elements()[0])