From fe6c23cbab31c545901512393d28687e556f32d1 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 24 Dec 2020 13:21:53 -0300 Subject: Fix bugs on Card Composite --- game/03_init.rpy | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'game') diff --git a/game/03_init.rpy b/game/03_init.rpy index a8c178e..0740c27 100644 --- a/game/03_init.rpy +++ b/game/03_init.rpy @@ -75,7 +75,7 @@ init python: (0, 0), ExtraImage(path), (0, 0), "gfx/square/%d.png" % r) - def card_composite(cid, path): + def card_composite(cid, path, ei=False): # We need to try to get rarity try: r=allunits[int(cid)]["rare"] @@ -89,12 +89,20 @@ init python: except: e=0 - return Composite( + if not ei: + return Composite( (640, 960), (0, 0), "gfx/cards/bg.png", (0, 0), path, (0, 0), "gfx/cards/"+str(r)+".png", (0, 0), "gfx/cards/ele/"+str(e)+".png") + else: + return Composite( + (640, 960), + (0, 0), "gfx/cards/bg.png", + (0, 0), ExtraImage(path), + (0, 0), "gfx/cards/"+str(r)+".png", + (0, 0), "gfx/cards/ele/"+str(e)+".png") # size,) # TODO: square_ and gfx/square/units @@ -339,7 +347,7 @@ init python: if ext in [".png", ".jpg", ".jpeg", ".gif", ".webp"]: # Maybe it is an unit if img.startswith("unit_"): - new_img(img, card_composite(img.replace("unit_", ""), path[1])) + new_img(img, card_composite(img.replace("unit_", ""), path[1], ei=True), isimage=False) elif img.startswith("square_"): new_img(img, square_composite(img.replace("square_", ""), path[1], ei=True), isimage=False) else: -- cgit v1.2.3-70-g09d2