summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-12 23:59:52 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-12 23:59:52 -0300
commit67196111dc6b463e3141bc0cbfa0649c030854f3 (patch)
tree6b23c83a98d6455f99af716aeaa62cc25757dcb0
parent2d959502464f8aa609f175e32575c3bd3635b2ad (diff)
downloadserver-67196111dc6b463e3141bc0cbfa0649c030854f3.tar.gz
server-67196111dc6b463e3141bc0cbfa0649c030854f3.tar.bz2
server-67196111dc6b463e3141bc0cbfa0649c030854f3.tar.xz
server-67196111dc6b463e3141bc0cbfa0649c030854f3.zip
You now need `max_sum` to be set in order to summon something.
This value cannot be changed right now (summons cannot be learned) Means you're struck with default summon "(0)". I am wondering how the summons unlock quests will be. Will they unlock with main story, or will they be a side quest? Remains to be seen...
-rw-r--r--battle/summons.py7
-rw-r--r--sql.py4
2 files changed, 9 insertions, 2 deletions
diff --git a/battle/summons.py b/battle/summons.py
index 52aa203..7324d5c 100644
--- a/battle/summons.py
+++ b/battle/summons.py
@@ -66,9 +66,14 @@ def summon(args, token):
# Create summon object
summon=allsummons[summon_id]
+ # Verify the lock
+ if (Player[token]["max_sum"] < summon_id):
+ stdout("Cannot summon \"%s\": Not unlocked" % (summon["name"]), 2)
+ raise Exception("Locked summon")
+
# Verify the cost
if Battle[token]["bp"] < summon["cost"]:
- stdout("Cannot summon \"%s\": Insufficient BP (%d/%d)" % (summon["name"], Battle[token]["bp"], summon["cost"]))
+ stdout("Cannot summon \"%s\": Insufficient BP (%d/%d)" % (summon["name"], Battle[token]["bp"], summon["cost"]), 2)
raise Exception("Insufficient BP")
stdout("All fine thus far")
diff --git a/sql.py b/sql.py
index b62ffe5..21aa065 100644
--- a/sql.py
+++ b/sql.py
@@ -58,7 +58,8 @@ def save_player(token, mask=SQL_NONE):
#stdout(str(Player[token]))
sqlx="""UPDATE%s `player` SET
status = %d, quest = %d, gp = %d, crystals = %d,
- exp = %d, level = %d, ap = %d, max_ap = %d, aptime = %d
+ exp = %d, level = %d, ap = %d, max_ap = %d, aptime = %d,
+ max_sum = %d
WHERE `userid`=%d""" % (m,
Player[token]["status"],
Player[token]["quest"],
@@ -69,6 +70,7 @@ def save_player(token, mask=SQL_NONE):
Player[token]["ap"],
Player[token]["max_ap"],
Player[token]["aptime"],
+ Player[token]["max_sum"],
Player[token]["userid"])
stdout(sqlx, 2)