diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-24 13:21:53 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-24 13:21:53 -0300 |
commit | fe6c23cbab31c545901512393d28687e556f32d1 (patch) | |
tree | 4545e9d77eacad8ff8906f7bb9b4e050483604a1 | |
parent | 4bc40d16b5fa2a3b821063b52ae06251c4e51bd0 (diff) | |
download | client-fe6c23cbab31c545901512393d28687e556f32d1.tar.gz client-fe6c23cbab31c545901512393d28687e556f32d1.tar.bz2 client-fe6c23cbab31c545901512393d28687e556f32d1.tar.xz client-fe6c23cbab31c545901512393d28687e556f32d1.zip |
Fix bugs on Card Composite
-rw-r--r-- | game/03_init.rpy | 14 |
1 files changed, 11 insertions, 3 deletions
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: |