summaryrefslogtreecommitdiff
path: root/game/battle.rpy
diff options
context:
space:
mode:
Diffstat (limited to 'game/battle.rpy')
-rw-r--r--game/battle.rpy14
1 files changed, 12 insertions, 2 deletions
diff --git a/game/battle.rpy b/game/battle.rpy
index 6a0bea2..1d99471 100644
--- a/game/battle.rpy
+++ b/game/battle.rpy
@@ -84,9 +84,10 @@ label combat:
# TODO: Display Spheres in the right place
$ use_sphere=[AP_NONE, AP_NONE, AP_NONE, AP_NONE, AP_NONE]
$ btl_ready = False
+ $ do_action = ACT_NONE
python:
try:
- renpy.call_screen("battle", _with_none=True)
+ do_action = renpy.call_screen("battle", _with_none=True)
except:
traceback.print_exc()
stdout("FAILED to render battle screen, trying again...")
@@ -103,7 +104,13 @@ label combat:
# TODO: Send to server new arrangement of units
# Update Battle with server response
- $ response=loadbattle(Battle["party"])
+ if (do_action == ACT_TURN):
+ $ response=loadbattle(Battle["party"])
+ elif (do_action == ACT_SUMMON):
+ $ response=Battle
+ else:
+ $ stdout("INVALID ACTION CODE: %d" % do_action)
+ jump combat
# Maybe we error'ed out and should relog
if (response in [FAILUREMSG, OFFLINEMSG, ERR_JSONDECODER, ERR_LOGIN_DEFAULT]):
@@ -142,6 +149,9 @@ label combat:
entry[3])
sdelay(0.1)
print("Attacked Battle[%s][%d]" % (entry[4], entry[5]))
+ elif entry[2] == SRV_SUMMON:
+ # FIXME
+ print("Summoned %d to your aid! Show cutscene" % entry[3])
except:
traceback.print_exc()