feat : account for draw amount 2
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<text x="0" y="9" font-size="24" text-anchor="middle" fill="black" font-weight="bold" font-family="Helvetica">6</text>
|
||||
</g>
|
||||
<g id="d1">
|
||||
<text x="137.0" y="26.0" font-size="14" text-anchor="middle" fill="black" font-family="Helvetica">Piochez une carte.</text>
|
||||
<text x="137.0" y="26.0" font-size="14" text-anchor="middle" fill="black" font-family="Helvetica">Piochez deux cartes.</text>
|
||||
</g>
|
||||
<g id="d2">
|
||||
<circle cx="0" cy="0" r="15.0" fill="green" x="0" y="0" />
|
||||
|
||||
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
@@ -30,7 +30,7 @@
|
||||
<text x="0" y="9" font-size="24" text-anchor="middle" fill="white" font-weight="bold" font-family="Helvetica">5</text>
|
||||
</g>
|
||||
<g id="d3">
|
||||
<text x="137.0" y="70.66666666666667" font-size="14" text-anchor="middle" fill="black" font-family="Helvetica">Piochez une carte.</text>
|
||||
<text x="137.0" y="70.66666666666667" font-size="14" text-anchor="middle" fill="black" font-family="Helvetica">Piochez deux cartes.</text>
|
||||
<use xlink:href="#d1" x="107.0" y="33.0" />
|
||||
<use xlink:href="#d2" x="167.0" y="33.0" />
|
||||
</g>
|
||||
|
||||
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
@@ -6,6 +6,7 @@ from typing import TypedDict
|
||||
class Translation(TypedDict):
|
||||
card_type: dict[str, str]
|
||||
effects: dict[str, str]
|
||||
numbers: dict[str, str]
|
||||
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -3,8 +3,13 @@
|
||||
"action":"Action",
|
||||
"champion":"Champion"
|
||||
},
|
||||
"numbers":{
|
||||
"1": "une",
|
||||
"2": "deux"
|
||||
},
|
||||
"effects":{
|
||||
"draw":"Piochez une carte.",
|
||||
"draw_n":"Piochez %a cartes.",
|
||||
"stun":"Assomez le champion ciblé.",
|
||||
"stack_next_card_bought":"Mettez la prochaine carte dont vous faites l'acquisition\nau dessus de votre pioche.",
|
||||
"sacrifice":"Vous pouvez sacrifier une carte de votre main ou de votre défausse.",
|
||||
|
||||
+15
-3
@@ -202,9 +202,21 @@ def create_effect_row(effects: list[Effect], type: str, height: int, width: int)
|
||||
for e in effect_with_text:
|
||||
if effect_text != "":
|
||||
effect_text += " "
|
||||
translation = translation_fr.get("effects").get(
|
||||
e.get("effect"), e.get("effect")
|
||||
)
|
||||
|
||||
if e.get("amount", 1) > 1:
|
||||
|
||||
translation = (
|
||||
translation_fr.get("effects")
|
||||
.get(e.get("effect") + "_n", e.get("effect"))
|
||||
.replace(
|
||||
"%a",
|
||||
str(translation_fr.get("numbers").get(str(e.get("amount", "")))),
|
||||
)
|
||||
)
|
||||
else:
|
||||
translation = translation_fr.get("effects").get(
|
||||
e.get("effect"), e.get("effect")
|
||||
)
|
||||
effect_text += translation
|
||||
|
||||
group.append(
|
||||
|
||||
Reference in New Issue
Block a user