summaryrefslogtreecommitdiff
path: root/game/battle.rpy
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-25 11:34:43 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-25 11:34:43 -0300
commit61a0b9b9fec3a390dca60db81e18f26ae2e821b7 (patch)
treeaf01c66d6167c8f2ac6ed66c294c3cafb3d00dba /game/battle.rpy
parent2577c43010c346470fca09d415b2b2a1d6fe2003 (diff)
downloadclient-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 =(
Diffstat (limited to 'game/battle.rpy')
-rw-r--r--game/battle.rpy42
1 files changed, 42 insertions, 0 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