update with latest non-digital printing
This commit is contained in:
parent
fed6380af6
commit
c3bc96a0a3
|
@ -109,7 +109,7 @@ def write_art(art_names, id, index, digital):
|
|||
def to_compact_write_form(smallJson, art_names, response, category):
|
||||
fieldsInCard = ['name', 'image_uris', 'flavor_name',
|
||||
'reprint', 'frame_effects', 'digital', 'set_type']
|
||||
data = []
|
||||
data = smallJson['data']
|
||||
# write all fields needed in card
|
||||
for card in response['data']:
|
||||
# do not include racist cards
|
||||
|
@ -125,18 +125,18 @@ def to_compact_write_form(smallJson, art_names, response, category):
|
|||
if 'illustration_id' not in card_face or card_face['illustration_id'] in art_names and (art_names[card_face['illustration_id']] < 0 or card['digital']):
|
||||
continue
|
||||
else:
|
||||
ind = len(data)+len(smallJson['data'])
|
||||
ind = len(data)
|
||||
if (card_face['illustration_id'] in art_names):
|
||||
digital_holder = ind
|
||||
digital_holder = art_names[card['illustration_id']]
|
||||
ind = -1
|
||||
write_art(
|
||||
art_names, card_face['illustration_id'], ind, card['digital'])
|
||||
elif 'illustration_id' not in card or card['illustration_id'] in art_names and (art_names[card['illustration_id']] < 0 or card['digital']):
|
||||
continue
|
||||
else:
|
||||
ind = len(data)+len(smallJson['data'])
|
||||
ind = len(data)
|
||||
if (card['illustration_id'] in art_names):
|
||||
digital_holder = ind
|
||||
digital_holder = art_names[card['illustration_id']]
|
||||
ind = -1
|
||||
write_art(art_names, card['illustration_id'], ind, card['digital'])
|
||||
write_card = dict()
|
||||
|
@ -164,12 +164,11 @@ def to_compact_write_form(smallJson, art_names, response, category):
|
|||
data[digital_holder] = write_card
|
||||
else:
|
||||
data.append(write_card)
|
||||
smallJson['data'] += data
|
||||
|
||||
|
||||
def to_compact_write_form_special(smallJson, art_names, response, category):
|
||||
fieldsInBasic = ['image_uris', 'set', 'set_type', 'digital']
|
||||
data = []
|
||||
data = smallJson['data']
|
||||
# write all fields needed in card
|
||||
for card in response['data']:
|
||||
# do not include racist cards
|
||||
|
@ -182,9 +181,9 @@ def to_compact_write_form_special(smallJson, art_names, response, category):
|
|||
if 'illustration_id' not in card or card['illustration_id'] in art_names and (art_names[card['illustration_id']] < 0 or card['digital']):
|
||||
continue
|
||||
else:
|
||||
ind = len(data)+len(smallJson['data'])
|
||||
ind = len(data)
|
||||
if (card['illustration_id'] in art_names):
|
||||
digital_holder = ind
|
||||
digital_holder = art_names[card['illustration_id']]
|
||||
ind = -1
|
||||
write_art(
|
||||
art_names, card['illustration_id'], ind, card['digital'])
|
||||
|
@ -204,8 +203,6 @@ def to_compact_write_form_special(smallJson, art_names, response, category):
|
|||
if card['set_type'] != 'token':
|
||||
smallJson[card['code']] = [card['name'], card['icon_svg_uri']]
|
||||
|
||||
smallJson['data'] += data
|
||||
|
||||
|
||||
# only write images needed
|
||||
def write_image_uris(card_image_uris):
|
||||
|
|
|
@ -18,11 +18,12 @@
|
|||
})(window, document, 'script', 'dataLayer', 'GTM-M3MBVGG')
|
||||
</script>
|
||||
<script>
|
||||
function updateSettingDefault(digital, un, original) {
|
||||
function updateSettingDefault(digital, un, original, original_label) {
|
||||
window.console.log(digital, un, original)
|
||||
document.getElementById('digital').checked = digital
|
||||
document.getElementById('un').checked = un
|
||||
document.getElementById('original').checked = original
|
||||
document.getElementById('original_label').innerText = original_label
|
||||
}
|
||||
</script>
|
||||
<!-- End Google Tag Manager -->
|
||||
|
@ -151,7 +152,7 @@
|
|||
id="counterspell"
|
||||
name="whichguesser"
|
||||
value="counterspell"
|
||||
onchange="updateSettingDefault(true, true, false)"
|
||||
onchange="updateSettingDefault(true, true, false, 'only first printing')"
|
||||
checked
|
||||
/>
|
||||
<label class="radio-label" for="counterspell">
|
||||
|
@ -174,7 +175,7 @@
|
|||
id="burn"
|
||||
name="whichguesser"
|
||||
value="burn"
|
||||
onchange="updateSettingDefault(true, true, false)"
|
||||
onchange="updateSettingDefault(true, true, false, 'only first printing')"
|
||||
/>
|
||||
<label class="radio-label" for="burn">
|
||||
<img
|
||||
|
@ -196,7 +197,7 @@
|
|||
id="beast"
|
||||
name="whichguesser"
|
||||
value="beast"
|
||||
onchange="updateSettingDefault(true, true, false)"
|
||||
onchange="updateSettingDefault(true, true, false, 'only first printing')"
|
||||
/>
|
||||
<label class="radio-label" for="beast">
|
||||
<img
|
||||
|
@ -218,7 +219,7 @@
|
|||
id="basic"
|
||||
name="whichguesser"
|
||||
value="basic"
|
||||
onchange="updateSettingDefault(true, true, true)"
|
||||
onchange="updateSettingDefault(true, true, true, 'only expansions')"
|
||||
/>
|
||||
<label class="radio-label" for="basic">
|
||||
<img
|
||||
|
@ -240,7 +241,7 @@
|
|||
id="commander"
|
||||
name="whichguesser"
|
||||
value="commander"
|
||||
onchange="updateSettingDefault(false, false, false)"
|
||||
onchange="updateSettingDefault(false, false, false, 'only first printing')"
|
||||
/>
|
||||
<label class="radio-label" for="commander">
|
||||
<img
|
||||
|
@ -262,7 +263,7 @@
|
|||
id="artist"
|
||||
name="whichguesser"
|
||||
value="artist"
|
||||
onchange="updateSettingDefault(true, true, true)"
|
||||
onchange="updateSettingDefault(true, true, true, 'only include cards')"
|
||||
/>
|
||||
<label class="radio-label" for="artist">
|
||||
<img
|
||||
|
@ -293,7 +294,9 @@
|
|||
<label for="un">include un-cards</label>
|
||||
<br />
|
||||
<input type="checkbox" name="original" id="original" />
|
||||
<label for="original">only original set printing</label>
|
||||
<label for="original"
|
||||
><span id="original_label">only first printing</span></label
|
||||
>
|
||||
</details>
|
||||
<input type="submit" id="submit" value="Play" />
|
||||
</form>
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user