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