summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-08-13 00:07:06 -0300
committerJesusaves <cpntb1@ymail.com>2021-08-13 00:07:06 -0300
commit01aa8be7e734001a4954bbd149de49c4572e3b3d (patch)
tree6d1f044de9d783fd379fc3102f50006d01eb26fc
parent67196111dc6b463e3141bc0cbfa0649c030854f3 (diff)
downloadserver-01aa8be7e734001a4954bbd149de49c4572e3b3d.tar.gz
server-01aa8be7e734001a4954bbd149de49c4572e3b3d.tar.bz2
server-01aa8be7e734001a4954bbd149de49c4572e3b3d.tar.xz
server-01aa8be7e734001a4954bbd149de49c4572e3b3d.zip
Add a couple asserts to validate the summon
-rw-r--r--battle/summons.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/battle/summons.py b/battle/summons.py
index 7324d5c..ca74b62 100644
--- a/battle/summons.py
+++ b/battle/summons.py
@@ -62,6 +62,8 @@ def summon(args, token):
# [summon_id]
# Validation
summon_id=int(ss[0])
+ assert summon_id > 0, "Summon ID understated"
+ assert summon_id < 127, "Summon ID overstated"
# Create summon object
summon=allsummons[summon_id]