summaryrefslogtreecommitdiff
path: root/game/battle.rpy
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2020-12-25 12:10:01 -0300
committerJesusaves <cpntb1@ymail.com>2020-12-25 12:10:01 -0300
commit0248a71aaa842a728e4375cad0bafdad737c0430 (patch)
tree53e21ef3dc5d19f3f8e9e3894ee660781c87dae9 /game/battle.rpy
parent61a0b9b9fec3a390dca60db81e18f26ae2e821b7 (diff)
downloadclient-0248a71aaa842a728e4375cad0bafdad737c0430.tar.gz
client-0248a71aaa842a728e4375cad0bafdad737c0430.tar.bz2
client-0248a71aaa842a728e4375cad0bafdad737c0430.tar.xz
client-0248a71aaa842a728e4375cad0bafdad737c0430.zip
Fork code, replace some ifs with showifs in screen, add dummy structures.
Hopefully, code will be more stable from now on. It might still crash, but then I'll be sure the bug is on the draggroups.
Diffstat (limited to 'game/battle.rpy')
-rw-r--r--game/battle.rpy13
1 files changed, 9 insertions, 4 deletions
diff --git a/game/battle.rpy b/game/battle.rpy
index bf7d8e9..2e9dd18 100644
--- a/game/battle.rpy
+++ b/game/battle.rpy
@@ -64,17 +64,20 @@ label combat:
en1=Battle["enemy"][0]
show_img("mob_"+str(en1["unit_id"]), False) # Validate
except:
- en1={"hp": 0}
+ en1=copy.copy(ERR_MOBSTRUCT)
try:
en2=Battle["enemy"][1]
show_img("mob_"+str(en2["unit_id"]), False) # Validate
except:
- en2={"hp": 0}
+ en2=copy.copy(ERR_MOBSTRUCT)
try:
en3=Battle["enemy"][2]
show_img("mob_"+str(en3["unit_id"]), False) # Validate
except:
- en3={"hp": 0}
+ en3=copy.copy(ERR_MOBSTRUCT)
+
+ while len(Battle["party"]) < 4:
+ Battle["party"].append(copy.copy(ERR_PLAYERSTRUCT))
$stdout("================= call begin")
# TODO: Swap units support
@@ -87,7 +90,9 @@ label combat:
except:
traceback.print_exc()
stdout("FAILED to render battle screen, trying again...")
- sdelay(0.5)
+ renpy.hide_screen("battle")
+ sdelay(1.5)
+ raise
renpy.jump("combat")
stdout("================= call ended")