🍱 补充新角色的有效词条

This commit is contained in:
KimigaiiWuyi 2023-10-09 00:29:05 +08:00
parent 8e68a43d6a
commit e780c8725b
3 changed files with 39 additions and 15 deletions

View File

@ -1,6 +1,6 @@
import re
import json
from typing import List, Tuple
from typing import Tuple
import aiofiles
from PIL import Image
@ -150,20 +150,22 @@ async def contrast_char_info(bot: Bot, ev: Event):
elif len(contrast_list) >= 4:
return await bot.send('不支持对比四个及以上的面板...')
img_list: List[Image.Image] = []
img_list = []
max_y = 0
for i in contrast_list:
im = await _get_char_info(bot, ev, i)
if isinstance(im, str):
return await bot.send(im)
elif isinstance(im, Tuple):
if isinstance(im[0], bytes):
data = im[0]
if isinstance(data, bytes):
return await bot.send('输入了错误的格式...参考格式: 对比面板 公子 公子换可莉圣遗物')
elif isinstance(im[0], str):
return await bot.send(im[0])
elif isinstance(data, str):
return await bot.send(data)
else:
img_list.append(im[0])
max_y = max(max_y, im[0].size[1])
assert isinstance(data, Image.Image)
img_list.append(data)
max_y = max(max_y, data.size[1])
base_img = Image.new('RGBA', (950 * len(img_list), max_y))
for index, img in enumerate(img_list):

View File

@ -350,15 +350,43 @@
"白术": [
"血量",
"元素充能效率",
"精通",
"元素精通",
"暴击率",
"暴击伤害"
],
"卡维": [
"元素充能效率",
"精通",
"元素精通",
"暴击率",
"暴击伤害",
"攻击力"
],
"绮良良": [
"元素充能效率",
"元素精通",
"血量"
],
"琳妮特": [
"元素精通",
"暴击率",
"暴击伤害",
"元素充能效率"
],
"林尼": [
"攻击力",
"暴击率",
"暴击伤害"
],
"菲米尼": [
"攻击力",
"暴击率",
"暴击伤害",
"元素充能效率"
],
"那维莱特": [
"血量",
"暴击率",
"暴击伤害",
"元素充能效率"
]
}

View File

@ -1,9 +1,3 @@
from typing import Dict
from gsuid_core.data_store import get_res_path
from gsuid_core.utils.database.dal import SQLA
is_wal = False
active_sqla: Dict[str, SQLA] = {}
db_url = str(get_res_path().parent / 'GsData.db')