feat: prettify the way subeffects are written
release-tag / release-image (push) Successful in 27s

This commit is contained in:
2024-08-09 16:10:50 +02:00
parent 1fb0ddc2a7
commit 2704033e72
+3 -3
View File
@@ -248,7 +248,6 @@ def create_effect_text(card: Card, effects: list[Effect], height: float, width:
translation = translation_fr.get("effects").get( translation = translation_fr.get("effects").get(
e.get("effect"), e.get("effect") e.get("effect"), e.get("effect")
) )
print(e)
if len(effect_text) > 20: if len(effect_text) > 20:
effect_text += "\n" effect_text += "\n"
@@ -256,9 +255,10 @@ def create_effect_text(card: Card, effects: list[Effect], height: float, width:
# Handle sub_effects # Handle sub_effects
if (len(e.get('sub_effects', [])) > 0): if (len(e.get('sub_effects', [])) > 0):
effect_text += "\nSi vous le faites, gagnez:\n" effect_text += "\nSi vous le faites, gagnez "
for se in e.get('sub_effects'): for se in e.get('sub_effects'):
effect_text += str(se) + "\n" effect_text += str(se.get('amount', 1)) + ' ' + translation_fr.get('per_effect').get(se.get('effect'))
effect_text += '.'
if has_mutex and i is not len(effects) - 1: if has_mutex and i is not len(effects) - 1:
effect_text += "\nou" effect_text += "\nou"