From e58c4bd6ae000d50f9a081dda9b3953c82281b06 Mon Sep 17 00:00:00 2001 From: KimigaiiWuyi <444835641@qq.com> Date: Sun, 8 Jun 2025 05:56:11 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=8D=B1=20=E6=9B=B4=E6=96=B0=E9=83=A8?= =?UTF-8?q?=E5=88=86=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../genshinuid_enka/effect/char_effect.json | 84 +++++++++++++++++++ .../genshinuid_enka/effect/weapon_effect.json | 31 +++++++ GenshinUID/genshinuid_enka/mono/Character.py | 1 + GenshinUID/genshinuid_enka/mono/Fight.py | 3 + GenshinUID/genshinuid_help/get_help.py | 4 +- GenshinUID/genshinuid_resin/__init__.py | 13 ++- GenshinUID/tools/download_icon.py | 6 +- GenshinUID/utils/map/data/char_alias.json | 13 +++ 8 files changed, 146 insertions(+), 9 deletions(-) diff --git a/GenshinUID/genshinuid_enka/effect/char_effect.json b/GenshinUID/genshinuid_enka/effect/char_effect.json index 7d717528..614fa321 100644 --- a/GenshinUID/genshinuid_enka/effect/char_effect.json +++ b/GenshinUID/genshinuid_enka/effect/char_effect.json @@ -1,4 +1,88 @@ { + "丝柯克": { + "normal": { + "normal_skill": { + "50": "", + "70": "" + }, + "normal_talent": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "6": "" + } + }, + "fight": { + "fight_skill": { + "50": "E:extraBonus+70;Q:extraBonus+60", + "70": "" + }, + "fight_talent": { + "1": "", + "2": "addAtk+70", + "3": "", + "4": "addAtk+40", + "5": "", + "6": "" + }, + "group_skill": { + "50": "", + "70": "" + }, + "group_talent": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "6": "" + } + } + }, + "塔利雅": { + "normal": { + "normal_skill": { + "50": "", + "70": "" + }, + "normal_talent": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "6": "" + } + }, + "fight": { + "fight_skill": { + "50": "", + "70": "" + }, + "fight_talent": { + "1": "", + "2": "shieldBonus+25", + "3": "", + "4": "", + "5": "", + "6": "" + }, + "group_skill": { + "50": "", + "70": "" + }, + "group_talent": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "6": "" + } + } + }, "爱可菲": { "normal": { "normal_skill": { diff --git a/GenshinUID/genshinuid_enka/effect/weapon_effect.json b/GenshinUID/genshinuid_enka/effect/weapon_effect.json index f2122502..f87055ed 100644 --- a/GenshinUID/genshinuid_enka/effect/weapon_effect.json +++ b/GenshinUID/genshinuid_enka/effect/weapon_effect.json @@ -1,4 +1,35 @@ { + "苍耀": { + "normal": { + "normal_effect": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "" + } + }, + "fight": { + "fight_effect": { + "1": "addAtk+48;critDmg+40", + "2": "addAtk+60;critDmg+50", + "3": "addAtk+72;critDmg+60", + "4": "addAtk+84;critDmg+70", + "5": "addAtk+96;critDmg+80" + }, + "group_effect": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "" + }, + "time": 12, + "extra": { + + } + } + }, "香韵奏者": { "normal": { "normal_effect": { diff --git a/GenshinUID/genshinuid_enka/mono/Character.py b/GenshinUID/genshinuid_enka/mono/Character.py index b4875e6f..c6c0d6ea 100644 --- a/GenshinUID/genshinuid_enka/mono/Character.py +++ b/GenshinUID/genshinuid_enka/mono/Character.py @@ -392,6 +392,7 @@ class Character: prop['sp'] = [] prop['baseArea'] = 1 prop['powerPlus'] = 1 + prop['extraBonus'] = 0 if prop['baseHp'] + prop['addHp'] == prop['hp']: prop['exHp'] = prop['addHp'] prop['exAtk'] = prop['addAtk'] diff --git a/GenshinUID/genshinuid_enka/mono/Fight.py b/GenshinUID/genshinuid_enka/mono/Fight.py index ead5d476..3f791b15 100644 --- a/GenshinUID/genshinuid_enka/mono/Fight.py +++ b/GenshinUID/genshinuid_enka/mono/Fight.py @@ -352,6 +352,8 @@ class Fight: base_area_plus = await self.get_base_area_plus(char) + extra_bonus = char.fight_prop['extraBonus'] + 1 + # 对草神进行特殊计算 if '灭净三业' in power.name or '业障除' in power.name: base = await self.get_sp_base(power, char) @@ -367,6 +369,7 @@ class Fight: # 基本乘区 = 有效数值(例如攻击力) * 倍率 + 固定值 + 激化区 + 额外加成值 + 特殊加成值 base_area = base + reaction_power + add_dmg + char.sp.addDmg + base_area *= extra_bonus if base_area_plus != 1: base_area_plus -= 1 base_area = base_area_plus * base_area diff --git a/GenshinUID/genshinuid_help/get_help.py b/GenshinUID/genshinuid_help/get_help.py index 66b6d981..14be44ab 100644 --- a/GenshinUID/genshinuid_help/get_help.py +++ b/GenshinUID/genshinuid_help/get_help.py @@ -1,9 +1,9 @@ +import json from pathlib import Path from typing import Dict, Union import aiofiles from PIL import Image -from msgspec import json as msgjson from gsuid_core.help.model import PluginHelp from gsuid_core.help.draw_plugin_help import get_help from gsuid_core.sv import get_plugin_available_prefix @@ -26,7 +26,7 @@ BANNER_BG = Image.open(TEXT_PATH / 'banner_bg.jpg') async def get_help_data() -> Dict[str, PluginHelp]: async with aiofiles.open(HELP_DATA, 'rb') as file: - return msgjson.decode(await file.read(), type=Dict[str, PluginHelp]) + return json.loads(await file.read()) async def get_core_help() -> Union[bytes, str]: diff --git a/GenshinUID/genshinuid_resin/__init__.py b/GenshinUID/genshinuid_resin/__init__.py index 7341ff35..1f43c887 100644 --- a/GenshinUID/genshinuid_resin/__init__.py +++ b/GenshinUID/genshinuid_resin/__init__.py @@ -61,7 +61,7 @@ async def notice_job(force: bool = False): msg_list, 'direct', user_id, bot_id, '', '' ) await asyncio.sleep(0.5) - logger.info('[推送检查] 私聊推送完成') + logger.info('✅[推送检查] 私聊推送完成') for gid in result[bot_id]['group']: msg_list = [ MessageSegment.text('✅[原神] 推送提醒:\n'), @@ -72,12 +72,17 @@ async def notice_job(force: bool = False): msg_list.append(MessageSegment.text(msg)) msg_list.append(MessageSegment.text(MR_NOTICE)) await bot.target_send( - msg_list, 'group', gid, bot_id, '', '' + msg_list, + 'group', + gid, + bot_id, + '', + '', ) await asyncio.sleep(0.5) - logger.info('[推送检查] 群聊推送完成') + logger.info('✅[推送检查] 群聊推送完成') else: - logger.info('[推送检查] 已关闭全局推送, 停止任务...') + logger.info('✅[推送检查] 已关闭全局推送, 停止任务...') @sv_get_resin.on_fullmatch(('每日', 'mr', '实时便笺', '便笺', '便签')) diff --git a/GenshinUID/tools/download_icon.py b/GenshinUID/tools/download_icon.py index d153a587..ba95ebf2 100644 --- a/GenshinUID/tools/download_icon.py +++ b/GenshinUID/tools/download_icon.py @@ -14,7 +14,7 @@ with open(MAP_PATH / 'enName2AvatarID_mapping_5.6.0.json') as f: suffix = 'webp' -char_list = ['Escoffier', 'Ifa'] +char_list = ['SkirkNew', 'Dahlia'] base = 'https://api.hakush.in/gi/UI' # title = 'https://enka.network/ui/{}' # hakush = 'https://api.hakush.in/gi/UI/' @@ -134,5 +134,5 @@ def download_namecard_pic(start: int = 10000002): if __name__ == '__main__': - download_namecard_pic(10000063) - # main() + # download_namecard_pic(10000063) + main() diff --git a/GenshinUID/utils/map/data/char_alias.json b/GenshinUID/utils/map/data/char_alias.json index 4615c807..e94a1627 100644 --- a/GenshinUID/utils/map/data/char_alias.json +++ b/GenshinUID/utils/map/data/char_alias.json @@ -951,5 +951,18 @@ "哥门", "ifa", "一法" + ], + "塔利雅": [ + "塔利亚", + "塔莉亚", + "塔莉娅", + "塔利娅" + ], + "丝柯克": [ + "skk", + "斯柯克", + "蛇", + "柯克", + "思科克" ] } \ No newline at end of file