From 61a0b9b9fec3a390dca60db81e18f26ae2e821b7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 25 Dec 2020 11:34:43 -0300 Subject: Optmize a bit the python tidbits from battle screen: The fetcher for images and data structure loader is now outside screen code. And, I just got an "ERROR SHOWING VICTORY BOX", so.... ...Yup, bugs. This will not be enough =( --- game/battle.rpy | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'game/battle.rpy') diff --git a/game/battle.rpy b/game/battle.rpy index 44a3aba..bf7d8e9 100644 --- a/game/battle.rpy +++ b/game/battle.rpy @@ -33,6 +33,48 @@ label combat: $ hud_clear() $ show_img("bg battle", False) scene bg battle + # Load variables + python: + try: + fx1="unit_"+str(Battle["party"][0]["unit_id"]) + show_img(fx1, False) # Validate + except: + fx1="" + try: + fx2="unit_"+str(Battle["party"][1]["unit_id"]) + show_img(fx2, False) # Validate + except: + fx2="" + try: + fx3="unit_"+str(Battle["party"][2]["unit_id"]) + show_img(fx3, False) # Validate + except: + fx3="" + try: + fx4="unit_"+str(Battle["party"][3]["unit_id"]) + show_img(fx4, False) # Validate + except: + fx4="" + try: + fx5="unit_"+str(Battle["party"][4]["unit_id"]) + show_img(fx5, False) # Validate + except: + fx5="" + try: + en1=Battle["enemy"][0] + show_img("mob_"+str(en1["unit_id"]), False) # Validate + except: + en1={"hp": 0} + try: + en2=Battle["enemy"][1] + show_img("mob_"+str(en2["unit_id"]), False) # Validate + except: + en2={"hp": 0} + try: + en3=Battle["enemy"][2] + show_img("mob_"+str(en3["unit_id"]), False) # Validate + except: + en3={"hp": 0} $stdout("================= call begin") # TODO: Swap units support -- cgit v1.2.3-60-g2f50