summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-10 23:51:59 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-10 23:51:59 -0300
commit7dc285029db11348ae9ef2d90b805a39ba61f918 (patch)
tree79a0157c5b68a928f1ca2ef95ef3e435406f03f4
parentdcc36cfe809796d5ae2c08516d52647677838100 (diff)
downloadserver-7dc285029db11348ae9ef2d90b805a39ba61f918.tar.gz
server-7dc285029db11348ae9ef2d90b805a39ba61f918.tar.bz2
server-7dc285029db11348ae9ef2d90b805a39ba61f918.tar.xz
server-7dc285029db11348ae9ef2d90b805a39ba61f918.zip
Log summon usage (currently not possible)
-rw-r--r--battle/summons.py7
-rw-r--r--consts.py1
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