From 2e9b8a0e1eb8d67903f4ac16b48486f08fdb720f Mon Sep 17 00:00:00 2001 From: Erzangel Date: Sat, 3 Aug 2024 12:23:06 +0200 Subject: [PATCH] feat(wip): draw flavor text in a placeholder spot --- src/data/heron_skin.json | 2 ++ src/generate_cards_mvp.py | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/src/data/heron_skin.json b/src/data/heron_skin.json index 5ad314b..7269816 100644 --- a/src/data/heron_skin.json +++ b/src/data/heron_skin.json @@ -19,6 +19,7 @@ "4": { "title": "Saki, Pégase de Guerre", "flavor_text_type": "Cowboy", + "flavor_text_bottom": "Howdy!", "image_path": "../../img/skins/heron/004.png" }, "5": { @@ -204,6 +205,7 @@ "41": { "title": "Battler, Maître du jeu", "flavor_text_type": "Sorcier Infini", + "flavor_text_bottom": "Please excuse my dope ass swag", "image_path": "../../img/skins/heron/041.png" }, "42": { diff --git a/src/generate_cards_mvp.py b/src/generate_cards_mvp.py index 7550b52..53cc964 100644 --- a/src/generate_cards_mvp.py +++ b/src/generate_cards_mvp.py @@ -244,6 +244,20 @@ for card_data in cards: ) ) + # If it has a flavor text, draw flavor text + if "flavor_text_bottom" in card_skin_data: + d.append( + dw.Text( + text='"' + card_skin_data["flavor_text_bottom"] + '"', + font_size=8, + x=x_width/2, + y=y_height-20, + text_anchor="middle", + fill="black", + font_family="Helvetica", + ) + ) + # If champion, draw champion shield with defense if card_data["card_type"] == "champion": shield = draw_champion_shield(card_data, border_width_x)