From 37cd61c2683e7437f5e2dae9737558b2bc1d750d Mon Sep 17 00:00:00 2001 From: Erzangel Date: Wed, 7 Aug 2024 00:06:53 +0200 Subject: [PATCH] feat: colors, images for later cards & more --- img/skins/heron/061.png | 3 +++ img/skins/heron/065.png | 3 +++ img/skins/heron/070.png | 3 +++ img/skins/heron/071.png | 4 ++-- img/skins/heron/073.png | 3 +++ img/skins/heron/074.png | 3 +++ src/data/heron_skin.json | 20 ++++++++++++++++++++ src/data/translation_fr.json | 18 +++++++++++++----- src/draw_functions.py | 3 ++- src/generate_cards_mvp.py | 10 +++++++++- 10 files changed, 61 insertions(+), 9 deletions(-) create mode 100644 img/skins/heron/061.png create mode 100644 img/skins/heron/065.png create mode 100644 img/skins/heron/070.png create mode 100644 img/skins/heron/073.png create mode 100644 img/skins/heron/074.png diff --git a/img/skins/heron/061.png b/img/skins/heron/061.png new file mode 100644 index 0000000..bf15659 --- /dev/null +++ b/img/skins/heron/061.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e0b74efcf791e5b67555d5f692d4f3d53d9e341224e4fae0265555fd57c55596 +size 52701 diff --git a/img/skins/heron/065.png b/img/skins/heron/065.png new file mode 100644 index 0000000..a61a529 --- /dev/null +++ b/img/skins/heron/065.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3005a12a1ba75bacc9c3c808d4148d8875d2caee5bf2067155ea4833ca554573 +size 280437 diff --git a/img/skins/heron/070.png b/img/skins/heron/070.png new file mode 100644 index 0000000..852a863 --- /dev/null +++ b/img/skins/heron/070.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:89d72d64f6ea739bedc55a79615825e4090c9497cbdbb1ea7dd0471eb9d8be15 +size 43452 diff --git a/img/skins/heron/071.png b/img/skins/heron/071.png index ff4039c..aff75f8 100644 --- a/img/skins/heron/071.png +++ b/img/skins/heron/071.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:79bbdbd9c4b4f573cadc1e1f88f9c261d1e0fd5ef0ae8fa524d5ee5d74ee87b3 -size 451080 +oid sha256:359ed2532860410686c9835f14c476c35a735245a1226e987fd7b50c24c061d6 +size 118585 diff --git a/img/skins/heron/073.png b/img/skins/heron/073.png new file mode 100644 index 0000000..de3d872 --- /dev/null +++ b/img/skins/heron/073.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9bd600e861827c6ab3be78bd91ac3f4e8043360285dce9ac951cd06ffab5dbdc +size 6333 diff --git a/img/skins/heron/074.png b/img/skins/heron/074.png new file mode 100644 index 0000000..fb84dab --- /dev/null +++ b/img/skins/heron/074.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:61efdfa8388ac3b67531bdf4f1227795f2d4ca0306f2870287b6317bb9295854 +size 229608 diff --git a/src/data/heron_skin.json b/src/data/heron_skin.json index b8eed69..8270704 100644 --- a/src/data/heron_skin.json +++ b/src/data/heron_skin.json @@ -296,13 +296,33 @@ "image_path": "../../img/skins/heron/059.png" }, + "61": { + "title": "Forethought", + "image_path": "../../img/skins/heron/061.png" + }, + "65": { + "title": "Starlight Convergence", + "image_path": "../../img/skins/heron/065.png" + }, "68": { "title": "Confisquer", "image_path": "../../img/skins/heron/068.png" }, + "70": { + "title": "Jus de Prune", + "image_path": "../../img/skins/heron/070.png" + }, "71": { "title": "Rosser", "image_path": "../../img/skins/heron/071.png" + }, + "73": { + "title": "Trading Card", + "image_path": "../../img/skins/heron/073.png" + }, + "74": { + "title": "Scout, Nain de DRG", + "image_path": "../../img/skins/heron/074.png" } } diff --git a/src/data/translation_fr.json b/src/data/translation_fr.json index a1528ce..874a11b 100644 --- a/src/data/translation_fr.json +++ b/src/data/translation_fr.json @@ -1,11 +1,14 @@ { "card_type":{ "action":"Action", - "champion":"Champion" + "champion":"Champion", + "item": "Objet" }, "numbers":{ "1": "une", - "2": "deux" + "2": "deux", + "3": "trois", + "4": "quatre" }, "effects":{ "draw":"Piochez une carte.", @@ -25,8 +28,12 @@ "prepare":"Mobilisez un Champion", "prepare_all_champions":"Mobilisez vos Champions.", "prepare_another_champion":"Mobilisez un autre Champion.", - "cheaper_champions_passive":"Le prochain Champion que vous achetez\nvous coûte 1 de moins ce tour-ci.", - "control_opposing_champion_passive":"Prenez le contrôle d'un Champion\nennemi jusqu'à la fin du tour." + "cheaper_champions_passive":"Les Champions que vous achetez ce tour-ci\nvous coûtent 1 de moins.", + "cheaper_champion": "Le prochain Champion que vous achetez\nvous coûte 1 de moins.", + "control_opposing_champion_passive":"Prenez le contrôle d'un Champion\nennemi jusqu'à la fin du tour.", + "buy_for_free_amount":"Vous pouvez acquérir gratuitement\nune carte de coût %a ou moins.", + "damage_all_champions_amount":"Infligez %a dégats à tous\nles Champions adverses.", + "discard_x_and_draw_x":"Vous pouvez vous défausser de\nn'importe quel nombre de cartes\net en piocher autant." }, "per":{ "champion":"pour chaque Champion\nque vous avez en jeu", @@ -34,7 +41,8 @@ "other_guard":"pour chaque autre\nGarde que vous avez en jeu", "other_card_of_same_faction":"pour chaque autre x\nque vous avez en jeu", "champion_of_same_faction":"pour chaque Champion x\nque vous avez en jeu", - "other_knife_played":"pour chaque autre Couteau\nque vous avez en jeu" + "other_knife_played":"pour chaque autre Couteau\nque vous avez en jeu", + "stunned_champion": "pour chaque Champion\nassommé" } } \ No newline at end of file diff --git a/src/draw_functions.py b/src/draw_functions.py index 9c0e8b3..b3dc726 100644 --- a/src/draw_functions.py +++ b/src/draw_functions.py @@ -219,6 +219,7 @@ def create_effect_text(effects: list[Effect], height: float, width: int, has_mut effect_text = "" for [i, e] in enumerate(effects): + print(effects) if effect_text != "": effect_text += " " per = e.get("per") @@ -309,7 +310,7 @@ def create_effect_row(effects: list[Effect], type: str, height: int, width: int) cx=30, cy=height / 2, r=15, - fill="black", + fill="url(#gradient_suicide)", filter="url(#drop-shadow)", ) ) diff --git a/src/generate_cards_mvp.py b/src/generate_cards_mvp.py index bad0ae4..6752ec3 100644 --- a/src/generate_cards_mvp.py +++ b/src/generate_cards_mvp.py @@ -41,7 +41,7 @@ cost_right_offset = 38 background_colors = { "blue": "lightblue", "red": "lightcoral", - "yellow": "rgb(250, 229, 136)", + "yellow": "rgb(247, 227, 175)", "green": "lightgreen", "base": "lightgrey", } @@ -130,6 +130,14 @@ for card_data in cards: gradient_faction_icon.add_stop(1, icon_colors[card_data["faction"]][1], opacity=1) d.append_def(gradient_faction_icon) + # Define linear colored gradient for suicide icon + gradient_suicide = dw.LinearGradient( + 0, 1, 0, 0, gradientUnits="objectBoundingBox", id="gradient_suicide" + ) + gradient_suicide.add_stop(0, "#8a8a8a", opacity=1) + gradient_suicide.add_stop(1, "#ddeedd", opacity=1) + d.append_def(gradient_suicide) + print(card_data) # Draw card background background = dw.Group(id="background") background.append(