Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions add_octgnid.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import json
import uuid

runFile = 'tt_encounter.json'
pack_code = 'tt'
runFile = 'hercules.json'
pack_code = 'hercules'

with open('./packs.json') as json_file:
pack_data = json.load(json_file)
Expand Down Expand Up @@ -32,16 +32,16 @@
if 'duplicate_of' not in item.keys():
item['octgn_id'] = pack_octgn_id + pack_id + str('00' + str(item['position']))[-3:]
except KeyError:
print("An exception occurred: " + item['name'])
print("An exception occurred: " + item['code'])

for item in updated_data:
for item1 in updated_data:
try:
if len(item['code']) > 5 and str(item['code'])[4:5] != 'a':
for items in updated_data:
if items['code'] == str(item['code'])[0:5] + 'a':
item['octgn_id'] = items['octgn_id']
if 'duplicate_of' not in item1.keys() and len(item1['code']) > 5 and str(item1['code'])[4:5] != 'a':
for item2 in updated_data:
if item2['code'] == str(item1['code'])[0:5] + 'a':
item1['octgn_id'] = item2['octgn_id']
except KeyError:
print("An exception occurred: " + item['name'])
print("An exception occurred: " + item1['code'])


with open('./pack/' + runFile, 'w') as outfile:
Expand Down
10 changes: 5 additions & 5 deletions pack/drs.json
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
"pack_code": "drs",
"position": 32,
"quantity": 1,
"set_code": "invocation",
"set_code": "doctor_strange_invocation_deck",
"set_position": 1,
"text": "<b>Special</b>: Stun an enemy and deal 7 damage to it. Place this card in the [[Invocation]] deck discard pile.",
"traits": "Invocation.",
Expand All @@ -463,7 +463,7 @@
"pack_code": "drs",
"position": 33,
"quantity": 1,
"set_code": "invocation",
"set_code": "doctor_strange_invocation_deck",
"set_position": 2,
"text": "<b>Special</b>: Confuse the villain and remove 4 threat from a scheme. Place this card in the [[Invocation]] deck discard pile.",
"traits": "Invocation.",
Expand All @@ -479,7 +479,7 @@
"pack_code": "drs",
"position": 34,
"quantity": 1,
"set_code": "invocation",
"set_code": "doctor_strange_invocation_deck",
"set_position": 3,
"text": "<b>Special</b>: Give up to 3 characters each a tough status card. Place this card in the [[Invocation]] deck discard pile.",
"traits": "Invocation.",
Expand All @@ -495,7 +495,7 @@
"pack_code": "drs",
"position": 35,
"quantity": 1,
"set_code": "invocation",
"set_code": "doctor_strange_invocation_deck",
"set_position": 4,
"text": "<b>Special</b>: Choose a status card in play. Replace that status card with a different status card. Place this card in the [[Invocation]] deck discard pile.",
"traits": "Invocation.",
Expand All @@ -511,7 +511,7 @@
"pack_code": "drs",
"position": 36,
"quantity": 1,
"set_code": "invocation",
"set_code": "doctor_strange_invocation_deck",
"set_position": 5,
"text": "<b>Special</b>: Draw 3 cards. Place this card in the [[Invocation]] deck discard pile.",
"traits": "Invocation.",
Expand Down
Loading
Loading