aboutsummaryrefslogtreecommitdiff
path: root/data/genesys-banlist.py
blob: 7236da7a3d73edfaf2f7ee1d798305249225caa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import json

cardId = dict()
cards = None
with open('cards.json', 'r') as fp:
    cards = json.load(fp)

result = dict()
result['ban'] = []
result['limit'] = []
result['semiLimit'] = []

for k in cards:
    card = cards[k]
    cardId[k] = cards[k]['id']
    if 'en_name' not in card:
        result['ban'].append(str(cardId[k]))
        continue
    if 'text' in card:
        if 'types' in card['text']:
            if '连接' in card['text']['types'] or '灵摆' in card['text']['types']:
                result['ban'].append(str(cardId[k]))

print(json.dumps(result, indent=4))