summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-16 19:13:02 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-16 19:13:02 -0300
commit1a971ce306c52ba85d48658705eae9ae22f50bd6 (patch)
tree582edb1e332d94e3a9fd4d5ce57566d3b4a9e0d5
parent71c6730da213299fa69124cb4b368940152dd628 (diff)
downloadserver-1a971ce306c52ba85d48658705eae9ae22f50bd6.tar.gz
server-1a971ce306c52ba85d48658705eae9ae22f50bd6.tar.bz2
server-1a971ce306c52ba85d48658705eae9ae22f50bd6.tar.xz
server-1a971ce306c52ba85d48658705eae9ae22f50bd6.zip
Summoning can now be learnt, and the first summon - Lurking Danger - has arrived
-rw-r--r--battle/common.py20
-rw-r--r--story.json5
2 files changed, 24 insertions, 1 deletions
diff --git a/battle/common.py b/battle/common.py
index 0a40a57..6fee368 100644
--- a/battle/common.py
+++ b/battle/common.py
@@ -25,7 +25,7 @@ from consts import (SC_ATKUP, SC_DEFDOWN, SC_DEFUP, SC_ATKDOWN,
SFLAG_FIRSTLOOT, SFLAG_DOUBLEEXP, SFLAG_DOUBLEGP,
SPH_WIDEATTACK, SPH_PIERCE, SPH_ASSAULT, SPH_HEAL, SPH_HEALALL, SPH_ATKUP,
SPH_DEFUP, SPH_NONE, SRV_SPHERE, SRV_WAVE)
-import random
+import random, traceback
import player
#############################################
@@ -208,6 +208,22 @@ def advance_wave(token, world, quest_id, next_wave):
Battle[token]["wave"]+=1
return True
+
+##################################################
+# Levels up your summoning skill
+qids = [-1, 7]
+def summonlv(token, qid):
+ try:
+ level = qids.index(qid)
+ stdout("Adjusting player summon level (%d/%d)" % (Player[token]["max_sum"], level), 2)
+ Player[token]["max_sum"] = max(Player[token]["max_sum"], level)
+ except ValueError:
+ stdout("Quest does not affect summoning", 2)
+ except:
+ traceback.print_exc()
+ stdout("Error at summoning level check for quest %d" % qid)
+ return
+
#############################################
# get_result(str, bool, str, int)
def get_result(token, victory, world, quest_id):
@@ -237,6 +253,8 @@ def get_result(token, victory, world, quest_id):
# TODO: HANDLE THIS ERROR (FIXME)
return result
+ # Check if your summoning level has improved
+ summonlv(token, quest_id)
stdout("GR: Rolling", 2)
# Roll each wave
# Base quest experience gain
diff --git a/story.json b/story.json
index 12c1724..dc644b0 100644
--- a/story.json
+++ b/story.json
@@ -135,6 +135,11 @@
]
},
{
+ "quest_id": 7,
+ "pre_dialog": [],
+ "post_dialog": "SQ00007_post"
+ },
+ {
"quest_id": 10,
"pre_dialog": [],
"post_dialog": "SQ00010_post"