From 2c4a0278c1ae34f4cd2c7b5072947dfb06a0b9b0 Mon Sep 17 00:00:00 2001 From: Erzangel Date: Sun, 26 May 2024 22:28:46 +0200 Subject: [PATCH] feat: display text for draw card --- output/heron/001.svg | 2 +- output/heron/010.svg | 2 +- output/heron/013.svg | 2 +- src/generate_cards_mvp.py | 6 +++++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/output/heron/001.svg b/output/heron/001.svg index 80ff7d3..e9417e8 100644 --- a/output/heron/001.svg +++ b/output/heron/001.svg @@ -1,2 +1,2 @@ -Arkus, Imperial DragonChampion856Garde6 \ No newline at end of file +Arkus, Imperial DragonChampion85Piochez une carte.6Garde6 \ No newline at end of file diff --git a/output/heron/010.svg b/output/heron/010.svg index c7297a7..6484309 100644 --- a/output/heron/010.svg +++ b/output/heron/010.svg @@ -1,2 +1,2 @@ -Rallier les TroupesAction, Charme455Mobilisez un champion. \ No newline at end of file +Rallier les TroupesAction, Charme455Mobilisez un champion. \ No newline at end of file diff --git a/output/heron/013.svg b/output/heron/013.svg index 048c4c5..a22a097 100644 --- a/output/heron/013.svg +++ b/output/heron/013.svg @@ -1,2 +1,2 @@ -CaprisunAction, 20cl126 \ No newline at end of file +CaprisunAction, 20cl126 \ No newline at end of file diff --git a/src/generate_cards_mvp.py b/src/generate_cards_mvp.py index a28e9f7..87326b2 100644 --- a/src/generate_cards_mvp.py +++ b/src/generate_cards_mvp.py @@ -142,7 +142,11 @@ for card_data in cards: # Draw row 1 stats draw_effects_resources_for_row(dwg, base_effects, row_1_base_y, x_width) # Draw row 1 text - effect_text_1 = "" + for effect in base_effects: + effect_text_1 = "" + if effect.get('effect') == 'draw': + effect_text_1 = "Piochez une carte." + dwg.add(dwg.text(effect_text_1, insert=(x_width/2, row_1_base_y + 57), text_anchor='middle', fill='black', font_size=str(effect_text_size) + 'px', font_family='Helvetica')) if other_effects: