feat: flavor text, new card skins, gitignore updates
release-tag / release-image (push) Has been cancelled
release-tag / release-image (push) Has been cancelled
This commit is contained in:
@@ -162,3 +162,7 @@ cython_debug/
|
||||
|
||||
typings/*
|
||||
output/*
|
||||
|
||||
.idea/*
|
||||
|
||||
src/convert/output/**/*
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -13,12 +13,13 @@
|
||||
},
|
||||
"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": {
|
||||
@@ -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": {
|
||||
@@ -74,6 +76,7 @@
|
||||
"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": {
|
||||
@@ -123,7 +126,7 @@
|
||||
},
|
||||
"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": {
|
||||
@@ -159,6 +163,7 @@
|
||||
"32": {
|
||||
"title": "Bracken",
|
||||
"flavor_text_type": "Entité",
|
||||
"flavor_text_bottom": "\"MAIS REND MON POTE\"",
|
||||
"image_path": "../../img/skins/heron/032.png"
|
||||
},
|
||||
"33": {
|
||||
@@ -253,7 +258,7 @@
|
||||
},
|
||||
"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": {
|
||||
@@ -296,14 +301,22 @@
|
||||
|
||||
"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"
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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})"
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user