aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/generate_latex.py16
1 files changed, 6 insertions, 10 deletions
diff --git a/scripts/generate_latex.py b/scripts/generate_latex.py
index 6b35d8fc..c8407eca 100755
--- a/scripts/generate_latex.py
+++ b/scripts/generate_latex.py
@@ -76,7 +76,7 @@ def generate_card(card_name: str, card: MutableMapping):
movement = card['movement']
# stats = f'\\faHeart: {health}\\\\ \\faShoePrints: {movement}'
- stats = [f'Health: {health}', f'Movement: {movement}']
+ stats = f'Health: {health}\\\\ Movement: {movement}'
attack = card.get('attack', None)
if attack:
@@ -84,9 +84,8 @@ def generate_card(card_name: str, card: MutableMapping):
if "Range" in attack:
attack_sym = '\\ding{246}'
# stats += f'\\\\ {attack_sym}: {attack}'
- stats.append(f'Attack: {attack}')
+ stats += f'\\\\ Attack: {attack}'
- stats_str = '\\\\ '.join(stats)
if 'effect' in card or 'full_action' in card:
ability_block = ""
@@ -100,12 +99,9 @@ def generate_card(card_name: str, card: MutableMapping):
ability_block += '\\\\ '
ability_block += f'\\faRotateRight: {full_action}'
- if len(stats) == 2:
- card_content += f'\cardsplitcontenttwolines{{{stats_str}}}{{{ability_block}}}'
- else:
- card_content += f'\cardsplitcontent{{{stats_str}}}{{{ability_block}}}'
+ card_content += f'\cardsplitcontent{{{stats}}}{{{ability_block}}}'
else:
- card_content += f'\cardcontent{{{stats_str}}}'
+ card_content += f'\cardcontent{{{stats}}}'
card_content += '\n'
@@ -121,8 +117,8 @@ def generate_card(card_name: str, card: MutableMapping):
elif card['type'] == 'equipment':
# card_content += f'\cardsplitcontent{{\\faRecycle: {card["durability"]}}}{{{card["effect"]}}}'
- card_content += f'\cardsplitcontentsingleline{{Durability: {card["durability"]}}}{{{card["effect"]}}}\n'
- card_content += f'\cardplaycost{{{card["play"]}}}\n'
+ card_content += f'\cardsplitcontent{{Durability: {card["durability"]}}}{{{card["effect"]}}}\n'
+ card_content += f'\cardplaycost{{{card["play"]}}}'
else:
print('WARNING: unknown card type {card["type"]}!')