From 7dc285029db11348ae9ef2d90b805a39ba61f918 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 10 Aug 2021 23:51:59 -0300 Subject: Log summon usage (currently not possible) --- battle/summons.py | 7 +++++-- consts.py | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/battle/summons.py b/battle/summons.py index ef1b107..18ce106 100644 --- a/battle/summons.py +++ b/battle/summons.py @@ -19,7 +19,7 @@ import json from utils import (compress, allsummons, stdout, dl_search, Player, Battle) -from consts import (ERR_ERR, ERR_BAD) +from consts import (ERR_ERR, ERR_BAD, SRV_SUMMON) from battle.skills import skill_core from battle.common import conditions #from battle.main import advance_wave, battle_endturn, get_result @@ -36,7 +36,8 @@ def handle_summon(token, summon): except: return ERR_ERR - stdout("Summon: Victory/Defeat Check") + stdout("Summon: Victory/Defeat Check", 2) + Battle[token]["log"].append(["", 0, SRV_SUMMON, summon["summon_id"], "", 0]) # HOLD THAT! Handle victory/defeat conditions check = conditions(token, Battle[token]["spheres"]) @@ -45,6 +46,8 @@ def handle_summon(token, summon): # The check is: if not ERR_ERR or ERR_BAD, then reload battle/result sjson=compress(Battle[token]) + # We should also clear the log - again + Battle[token]["log"] = [] return sjson diff --git a/consts.py b/consts.py index dbe9564..285e283 100644 --- a/consts.py +++ b/consts.py @@ -55,6 +55,7 @@ SPH_DEFUP =7 SRV_SKILL =1000 SRV_WAVE =9901 SRV_SPHERE =9902 +SRV_SUMMON =9903 # Status Conditions SC_ATKUP =1 -- cgit v1.2.3-70-g09d2