diff options
Diffstat (limited to 'game/battle.rpy')
-rw-r--r-- | game/battle.rpy | 32 |
1 files changed, 19 insertions, 13 deletions
diff --git a/game/battle.rpy b/game/battle.rpy index 1539203..fbc2cae 100644 --- a/game/battle.rpy +++ b/game/battle.rpy @@ -27,6 +27,22 @@ init python: return ERR_JSONDECODER return bt + def bt_handlelog(entry): + if entry[2] in [SPH_NONE, SPH_PIERCE, SPH_ASSAULT, SPH_HEAL]: + hit_someone_verbose(Battle[entry[4]][entry[5]], + 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]) + show_img("summon_%d" % entry[3], False) + renpy.show("summon_%d" % entry[3], at_list=[truecenter, tzoomin], tag="summon", zorder=29150, layer="overlay") + renpy.pause(2.0) + renpy.hide("summon", layer="overlay") + #renpy.with_statement(Dissolve(1.0)) + return + label combat: # Implement combat view $stdout("================= prepare for combat") @@ -148,19 +164,9 @@ label combat: # TODO: Highlight caster # TODO: Unmark cards # TODO: SRV_WAVE (ends waves) SRV_SPHERE (updates spheres) - if entry[2] in [SPH_NONE, SPH_PIERCE, SPH_ASSAULT, SPH_HEAL]: - hit_someone_verbose(Battle[entry[4]][entry[5]], - 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]) - show_img("summon_%d" % entry[3], False) - renpy.show("summon_%d" % entry[3], at_list=[truecenter, tzoomin], tag="summon", zorder=29150, layer="overlay") - renpy.pause(2.0) - renpy.hide("summon", layer="overlay") - #renpy.with_statement(Dissolve(1.0)) + # TODO: SRV_NONE (saves action in tmp memory) + # (then at next non-none, bt_handlelog() tmp memory) + bt_handlelog(entry) except: traceback.print_exc() |