From 8d760561430552877a60b9c8d294b3f50c536b3a Mon Sep 17 00:00:00 2001 From: eli fessler Date: Wed, 28 Sep 2022 00:15:13 -1000 Subject: [PATCH] add support for sending battles as `exempted_lose` --- s3s.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/s3s.py b/s3s.py index 677947a..df42602 100755 --- a/s3s.py +++ b/s3s.py @@ -11,7 +11,7 @@ from PIL import Image from io import BytesIO import iksm, utils#, utils_ss -A_VERSION = "0.1.4" +A_VERSION = "0.1.5" DEBUG = False @@ -487,11 +487,13 @@ def prepare_battle_result(battle, ismonitoring, overview_data=None): ## RESULT ## ############ - result = battle["judgement"][-4:] + result = battle["judgement"] if result == "WIN": payload["result"] = "win" - elif result == "LOSE": # gets EXEMPTED_LOSE and DEEMED_LOSE too + elif result == "LOSE" or result == "DEEMED_LOSE": payload["result"] = "lose" + elif result == "EXEMPTED_LOSE": + payload["result"] = "exempted_lose" # doesn't count toward stats elif result == "DRAW": payload["result"] = "draw"