send crown_type for opposing team's players (#143)

Co-authored-by: frozenpandaman <7245874+frozenpandaman@users.noreply.github.com>
This commit is contained in:
AIZAWA Hina 2023-09-10 04:29:49 +09:00 committed by GitHub
parent 173288ef46
commit 096bd0b095
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

11
s3s.py
View File

@ -11,7 +11,7 @@ import msgpack
from packaging import version
import iksm, utils
A_VERSION = "0.5.5"
A_VERSION = "0.5.6"
DEBUG = False
@ -484,6 +484,15 @@ def set_scoreboard(battle, tricolor=False):
p_dict["inked"] = player["paint"]
p_dict["species"] = player["species"].lower()
p_dict["rank_in_team"] = i+1
if player.get("crown"):
p_dict["crown_type"] = "x"
if "DRAGON" in player.get("festDragonCert", ""):
if player["festDragonCert"] == "DRAGON":
p_dict["crown_type"] = "100x"
elif player["festDragonCert"] == "DOUBLE_DRAGON":
p_dict["crown_type"] = "333x"
if "result" in player and player["result"] is not None:
p_dict["kill_or_assist"] = player["result"]["kill"]
p_dict["assist"] = player["result"]["assist"]