diff --git a/.gitignore b/.gitignore index b7e3178..f9524ce 100644 --- a/.gitignore +++ b/.gitignore @@ -161,4 +161,8 @@ cython_debug/ #.idea/ typings/* -output/* \ No newline at end of file +output/* + +.idea/* + +src/convert/output/**/* \ No newline at end of file diff --git a/img/skins/heron/060.png b/img/skins/heron/060.png new file mode 100644 index 0000000..972d1fa --- /dev/null +++ b/img/skins/heron/060.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:35a9567444c499021b581efdc35367a31fcf41419e0105bbacb3f475f18108f7 +size 1317327 diff --git a/img/skins/heron/061.png b/img/skins/heron/061.png index bf15659..27c8237 100644 --- a/img/skins/heron/061.png +++ b/img/skins/heron/061.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e0b74efcf791e5b67555d5f692d4f3d53d9e341224e4fae0265555fd57c55596 -size 52701 +oid sha256:088125350f659002a2c4017287e3123922d069d230dcc4a828e04b8828693f2e +size 7779738 diff --git a/img/skins/heron/063.png b/img/skins/heron/063.png new file mode 100644 index 0000000..599a820 --- /dev/null +++ b/img/skins/heron/063.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c965626c934b4bad44ec444c524966a990ef694a24ed7212aef602f480a50741 +size 778812 diff --git a/src/card_types.py b/src/card_types.py index 517e93d..0fcd057 100644 --- a/src/card_types.py +++ b/src/card_types.py @@ -14,6 +14,7 @@ class Translation(TypedDict): class SkinData(TypedDict): title: str flavor_text_type: str | None + flavor_text_bottom: str | None image_path: str diff --git a/src/data/heron_skin.json b/src/data/heron_skin.json index 81166ce..10c9d5e 100644 --- a/src/data/heron_skin.json +++ b/src/data/heron_skin.json @@ -13,22 +13,23 @@ }, "3": { "title": "Commandement", - + "flavor_text_bottom": "Haniwas, à l'attaque! Go!", "image_path": "../../img/skins/heron/003.png" }, "4": { "title": "Saki, Pégase de Guerre", "flavor_text_type": "Cowboy", + "flavor_text_bottom": "Howdy, cowboy!", "image_path": "../../img/skins/heron/004.png" }, "5": { "title": "Domination", - + "image_path": "../../img/skins/heron/005.png" }, "6": { "title": "Raiden, le Juste", - + "image_path": "../../img/skins/heron/006.png" }, "7": { @@ -44,6 +45,7 @@ "9": { "title": "Dlanor A. Knox", "flavor_text_type": "Inquisitrice", + "flavor_text_bottom": "Dame Erika vous veut MORT.", "image_path": "../../img/skins/heron/009.png" }, "10": { @@ -53,7 +55,7 @@ }, "11": { "title": "Recrutement", - + "image_path": "../../img/skins/heron/011.png" }, "12": { @@ -68,17 +70,18 @@ }, "14": { "title": "Parole de Puissance", - + "image_path": "../../img/skins/heron/014.png" }, "15": { "title": "Madeline, Mercenaire", "flavor_text_type": "Guerrière", + "flavor_text_bottom": "Salut, c'est Madeline! Dites,\n vous n'auriez pas vu Mauvier?", "image_path": "../../img/skins/heron/015.png" }, "16": { "title": "Pot-de-Vin", - + "image_path": "../../img/skins/heron/016.png" }, "17": { @@ -88,7 +91,7 @@ }, "18": { "title": "Fourberie", - + "image_path": "../../img/skins/heron/018.png" }, "19": { @@ -98,12 +101,12 @@ }, "20": { "title": "Tit job", - + "image_path": "../../img/skins/heron/020.png" }, "21": { "title": "Intimidation", - + "image_path": "../../img/skins/heron/021.png" }, "22": { @@ -118,12 +121,12 @@ }, "24": { "title": "Bénéfice", - + "image_path": "../../img/skins/heron/024.png" }, "25": { "title": "Jester, Maître Assassin", - + "flavor_text_bottom": "Son nom maintient les employés\nde la compagnie éveillés.", "image_path": "../../img/skins/heron/025.png" }, "26": { @@ -139,6 +142,7 @@ "28": { "title": "Cirno", "flavor_text_type": "Baka", + "flavor_text_bottom": "Dansu no chansu ni pankuna\nranbu de anta no mausu wa anguri\n nan chi ~yuu fanki!", "image_path": "../../img/skins/heron/028.png" }, "29": { @@ -153,12 +157,13 @@ }, "31": { "title": "Sombre Récompense", - + "image_path": "../../img/skins/heron/031.png" }, "32": { "title": "Bracken", "flavor_text_type": "Entité", + "flavor_text_bottom": "\"MAIS REND MON POTE\"", "image_path": "../../img/skins/heron/032.png" }, "33": { @@ -173,7 +178,7 @@ }, "35": { "title": "Trick-or-Treat!", - + "image_path": "../../img/skins/heron/035.png" }, "36": { @@ -213,7 +218,7 @@ }, "43": { "title": "Panette, la Berserker", - + "image_path": "../../img/skins/heron/043.png" }, "44": { @@ -238,7 +243,7 @@ }, "48": { "title": "Don de la Nature", - + "image_path": "../../img/skins/heron/048.png" }, "49": { @@ -248,22 +253,22 @@ }, "50": { "title": "Impulsion Temporelle", - + "image_path": "../../img/skins/heron/050.png" }, "51": { "title": "Baiken, Samurai Slasher", - + "flavor_text_bottom": "Il n'y a pas de victoire ou défaite.\nJuste du savoir sur soi-même.", "image_path": "../../img/skins/heron/051.png" }, "52": { "title": "Étincelle de Caine", - + "image_path": "../../img/skins/heron/052.png" }, "53": { "title": "Forme de Loup", - + "image_path": "../../img/skins/heron/053.png" }, "54": { @@ -278,32 +283,40 @@ }, "56": { "title": "Live", - + "image_path": "../../img/skins/heron/056.png" }, "57": { "title": "Superkill", - + "image_path": "../../img/skins/heron/057.png" }, "58": { "title": "Kill", - + "image_path": "../../img/skins/heron/058.png" }, "59": { "title": "Live Forever", - + "image_path": "../../img/skins/heron/059.png" }, + "60": { + "title": "Collection de Bounty", + "image_path": "../../img/skins/heron/060.png" + }, "61": { - "title": "Forethought", + "title": "Dangereuse échappée", "image_path": "../../img/skins/heron/061.png" }, "62": { "title": "Festival de Watanagashi", "image_path": "../../img/skins/heron/062.png" }, + "63": { + "title": "Plus la même", + "image_path": "../../img/skins/heron/063.png" + }, "65": { "title": "Starlight Convergence", "image_path": "../../img/skins/heron/065.png" diff --git a/src/data/translation_fr.json b/src/data/translation_fr.json index d3c8427..27c7502 100644 --- a/src/data/translation_fr.json +++ b/src/data/translation_fr.json @@ -39,7 +39,8 @@ "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." + "discard_x_and_draw_x":"Vous pouvez vous défausser de\nn'importe quel nombre de cartes\net en piocher autant.", + "buy_gem_for_free": "Obtenez une gemme de coût 2\n ou moins gratuitement." }, "per":{ "champion":"pour chaque Champion\nque vous avez en jeu.", diff --git a/src/draw_functions.py b/src/draw_functions.py index 23390bf..9b54581 100644 --- a/src/draw_functions.py +++ b/src/draw_functions.py @@ -6,7 +6,7 @@ import json from itertools import groupby -from card_types import Card, Effect, Translation +from card_types import Card, Effect, Translation, SkinData stats_radius = 20 effect_text_size = 14 @@ -567,7 +567,7 @@ def generate_subeffect_index(effect: Effect): generate_subeffect_index(e) -def create_effects(card: Card, effects: list[Effect], height: int, width: int): +def create_effects(card: Card, effects: list[Effect], height: int, width: int, flavor_text: Optional[str]): for [i, e] in enumerate(effects): e["index"] = str(i) generate_subeffect_index(e) @@ -583,7 +583,7 @@ def create_effects(card: Card, effects: list[Effect], height: int, width: int): effect_types = list(grouped_effects.keys()) if len(grouped_effects) == 1: - if False: + if flavor_text is None: group.append( create_effect_row( card=card, @@ -595,19 +595,17 @@ def create_effects(card: Card, effects: list[Effect], height: int, width: int): ) else: group.append( - dw.Line(sx=10, sy=80, ex=width - 10, ey=80, stroke="black", stroke_width=1) + dw.Line(sx=10, sy=90, ex=width - 10, ey=90, stroke="black", stroke_width=1) ) group.append( create_effect_row( card=card, effects=grouped_effects[effect_types[0]], type=effect_types[0], - height=80, + height=85, width=width, ), ) - flavor_text = "chouette!" - font_width = 0.5 line_width = ( max(*[len(x) for x in flavor_text.split("\n")], len(flavor_text)) * font_width @@ -626,14 +624,15 @@ def create_effects(card: Card, effects: list[Effect], height: int, width: int): dw.Group( [ dw.Text( - text="Funky!", # TODO: mettre en italique & gris + text=flavor_text, # TODO: mettre en italique & gris x=0, y=(-font_size / 2) * flavor_text.count("\n"), text_anchor="middle", fill="black", font_size=font_size, + font_style="italic", font_family="Helvetica", - transform=f"translate({width / 2},{height - 80})" + transform=f"translate({width / 2},{height - 73})" ) ], transform=f"translate({0},{55})" diff --git a/src/generate_cards_mvp.py b/src/generate_cards_mvp.py index 8c8cd2e..eea77fa 100644 --- a/src/generate_cards_mvp.py +++ b/src/generate_cards_mvp.py @@ -271,7 +271,7 @@ for card_data in cards: if effects is not None: effects_height = 265 if card_data["id"] not in fullscreen_card_ids else 220 effects = create_effects( - card=card_data, effects=effects, height=135, width=x_internal_width + card=card_data, effects=effects, height=135, width=x_internal_width, flavor_text=card_skin_data["flavor_text_bottom"] if "flavor_text_bottom" in card_skin_data.keys() else None ) d.append( dw.Group(