diff options
author | Jesusaves <cpntb1@ymail.com> | 2020-12-25 11:34:43 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2020-12-25 11:34:43 -0300 |
commit | 61a0b9b9fec3a390dca60db81e18f26ae2e821b7 (patch) | |
tree | af01c66d6167c8f2ac6ed66c294c3cafb3d00dba | |
parent | 2577c43010c346470fca09d415b2b2a1d6fe2003 (diff) | |
download | client-61a0b9b9fec3a390dca60db81e18f26ae2e821b7.tar.gz client-61a0b9b9fec3a390dca60db81e18f26ae2e821b7.tar.bz2 client-61a0b9b9fec3a390dca60db81e18f26ae2e821b7.tar.xz client-61a0b9b9fec3a390dca60db81e18f26ae2e821b7.zip |
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 =(
-rw-r--r-- | game/battle.rpy | 42 | ||||
-rw-r--r-- | game/gui/battle.rpy | 43 | ||||
-rw-r--r-- | game/story.rpy | 2 |
3 files changed, 43 insertions, 44 deletions
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 diff --git a/game/gui/battle.rpy b/game/gui/battle.rpy index e71acae..bdfb642 100644 --- a/game/gui/battle.rpy +++ b/game/gui/battle.rpy @@ -89,49 +89,6 @@ screen battle(): # Background add "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} - #################################################### # Render HUD frame: diff --git a/game/story.rpy b/game/story.rpy index 32c2a71..b83cf7c 100644 --- a/game/story.rpy +++ b/game/story.rpy @@ -43,7 +43,7 @@ label SQ00001_prologue: play music MUSIC_PROLOGUE01.id() fadein 0.5 scene black with None window hide - centered "{cps=36}{b}Somewhere distant{/b}{/cps}" + centered "{cps=36}{b}Somewhere distant{/b}{/cps}{w=2.0}{nw}" scene bg darklands with Dissolve(2.0) centered "{b}Somewhere distant{/b}\n\n{fast}{cps=36}Darklands{/cps}" show dialog_deadlyshock at toffscreenright with None |