diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/03_init.rpy | 7 | ||||
-rw-r--r-- | game/battle.rpy | 2 | ||||
-rw-r--r-- | game/quest.rpy | 3 |
3 files changed, 7 insertions, 5 deletions
diff --git a/game/03_init.rpy b/game/03_init.rpy index 90639c4..3c71874 100644 --- a/game/03_init.rpy +++ b/game/03_init.rpy @@ -43,11 +43,12 @@ init python: }""" % (w, q, p) - def battledata(u, s): + def battledata(u, s, a): return """{ "unit": %s, - "sphere": %s - }""" % (json.dumps(u), json.dumps(s)) + "sphere": %s, + "action": %s + }""" % (json.dumps(u), json.dumps(s), json.dumps(a)) def square_composite(cid, path, ei=False): # We need to try to get rarity diff --git a/game/battle.rpy b/game/battle.rpy index 8f5b8eb..6a0bea2 100644 --- a/game/battle.rpy +++ b/game/battle.rpy @@ -108,7 +108,7 @@ label combat: # Maybe we error'ed out and should relog if (response in [FAILUREMSG, OFFLINEMSG, ERR_JSONDECODER, ERR_LOGIN_DEFAULT]): $ renpy.call_screen("msgbox", "Error:\n\n%s" % response) - # Try again (x2) + # Try again (x2) (FIXME: If packet was malformated, might be a bad idea) $ response=loadbattle(Battle["party"]) # Maybe we error'ed out and should relog if (response in [FAILUREMSG, OFFLINEMSG, ERR_JSONDECODER, ERR_LOGIN_DEFAULT]): diff --git a/game/quest.rpy b/game/quest.rpy index b3a5155..2185450 100644 --- a/game/quest.rpy +++ b/game/quest.rpy @@ -28,7 +28,8 @@ init python: return bt def loadbattle(new_arrange): - raw=send_packet("battle", battledata(new_arrange, use_sphere)) + global Battle + raw=send_packet("battle", battledata(new_arrange, Battle["spheres"], use_sphere)) bt=json_decode(raw) if (bt == ERR_JSONDECODER): |