main
beiyanpiki 1 year ago
parent b4acd6f0cd
commit 58ff187e6c

@ -0,0 +1 @@
{"std":[],"exp":["c2a18ad00ecc2f2d2c1a13088fb22340","4af357308b6e109a6fd2a3462913db61","ad629454c252e4e0cc1b761f235c28f0"],"sm":[]}

@ -1 +0,0 @@
["c2a18ad00ecc2f2d2c1a13088fb22340","4af357308b6e109a6fd2a3462913db61","ad629454c252e4e0cc1b761f235c28f0"]

@ -5,24 +5,28 @@ exp_banned = [
['CSM1aC', '128'],
['CSM1cC', '137'],
]
exp_banned_effect = []
with open('../output/sets_min.json', 'r') as f:
contents = f.read()
table = json.loads(contents)
f.close()
banned_effect = []
for ban_card in exp_banned:
found = False
for coll in table:
for card in coll['cards']:
if card['collection_attr']['set_symbol'] == ban_card[0] and card['collection_attr']['card_no'] == ban_card[
1]:
banned_effect.append(card['effect_id'])
exp_banned_effect.append(card['effect_id'])
found = True
break
if found:
break
with open('../output/exp_banned.json', 'w') as f:
f.write(json.dumps(banned_effect, separators=(',', ':')))
with open('../output/banned.json', 'w') as f:
f.write(json.dumps({
'std': [],
'exp': exp_banned_effect,
'sm': [],
}, separators=(',', ':')))

Loading…
Cancel
Save