diff --git a/GenshinUID/genshinuid_enka/draw_char_card.py b/GenshinUID/genshinuid_enka/draw_char_card.py index e9043d03..678b905c 100644 --- a/GenshinUID/genshinuid_enka/draw_char_card.py +++ b/GenshinUID/genshinuid_enka/draw_char_card.py @@ -4,7 +4,6 @@ from .mono.Character import Character from .dmg_calc.dmg_calc import draw_dmg_img -from .draw_char_curve import draw_char_curve_card from .etc.etc import TEXT_PATH, get_all_artifacts_value from ..utils.fonts.genshin_fonts import gs_font_18, gs_font_50 from .draw_normal import ( @@ -18,12 +17,8 @@ async def draw_char_img( char: Character, charUrl: Optional[str] = None, - is_curve: bool = False, ) -> Union[str, Tuple[Image.Image, Optional[bytes]]]: - if is_curve: - res = await draw_char_curve_card(char, charUrl) - else: - res = await draw_char_card(char, charUrl) + res = await draw_char_card(char, charUrl) return res, char.char_bytes diff --git a/GenshinUID/genshinuid_enka/draw_char_curve.py b/GenshinUID/genshinuid_enka/draw_char_curve.py deleted file mode 100644 index a7f5dcd3..00000000 --- a/GenshinUID/genshinuid_enka/draw_char_curve.py +++ /dev/null @@ -1,81 +0,0 @@ -from typing import Optional - -from PIL import Image, ImageDraw - -from .etc.etc import TEXT_PATH -from .mono.Character import Character -from .curve_calc.curve_calc import draw_char_curve_data -from ..utils.fonts.genshin_fonts import genshin_font_origin -from .draw_normal import ( - get_bg_card, - get_char_img, - get_artifacts_card, - get_char_card_base, -) - - -async def get_adv_card() -> Image.Image: - adv_img = Image.open(TEXT_PATH / 'adv.png') - return adv_img - - -async def draw_char_curve_card( - char: Character, char_url: Optional[str] -) -> Image.Image: - await get_artifacts_card(char, Image.new('RGB', (1, 1))) - curve_img, curve_len = await draw_char_curve_data( - char.char_name, char.card_prop - ) - curve2_img, curve2_len = await draw_char_curve_data( - char.char_name, char.fight_prop - ) - char_img = await get_char_img(char, char_url) - adv_img = await get_adv_card() - img = await get_bg_card( - char.char_element, curve_len + curve2_len + 460, char_img - ) - img.paste(char_img, (0, 0), char_img) - char_info_1 = await get_char_card_base(char) - img.paste(char_info_1, (0, 0), char_info_1) - img.paste(curve_img, (0, 1085), curve_img) - img.paste(curve2_img, (0, 1085 + curve_len), curve2_img) - img.paste(adv_img, (0, 1085 + curve_len + curve2_len), adv_img) - img_text = ImageDraw.Draw(img) - # 顶栏 - img_text.text( - (475, 2240), - '曲线(上)为正常面板,曲线(下)为触发各种战斗buff后面板', - (255, 255, 255), - genshin_font_origin(32), - anchor='mm', - ) - # 角色评分 - img_text.text( - (785, 2380), - f'{round(char.artifacts_all_score, 1)}', - (255, 255, 255), - genshin_font_origin(50), - anchor='mm', - ) - img_text.text( - (785, 2542), - f'{str(char.percent)+"%"}', - (255, 255, 255), - genshin_font_origin(50), - anchor='mm', - ) - img_text.text( - (785, 2490), - f'{char.seq_str}', - (255, 255, 255), - genshin_font_origin(18), - anchor='mm', - ) - - img = img.convert('RGB') - ''' - result_buffer = BytesIO() - img.save(result_buffer, format='JPEG', subsampling=0, quality=90) - res = result_buffer.getvalue() - ''' - return img diff --git a/GenshinUID/genshinuid_enka/get_enka_img.py b/GenshinUID/genshinuid_enka/get_enka_img.py index 593c8106..5cb288e5 100644 --- a/GenshinUID/genshinuid_enka/get_enka_img.py +++ b/GenshinUID/genshinuid_enka/get_enka_img.py @@ -60,11 +60,7 @@ async def draw_enka_img( # msg = raw_mes.strip() # 判断是否开启成长曲线或最佳, 并且去除 - is_curve = False is_group = False - if '成长曲线' in msg or '曲线' in msg: - is_curve = True - msg = msg.replace('成长曲线', '').replace('曲线', '') if '队伍' in msg or '队伍伤害' in msg: is_group = True msg = msg.replace('队伍', '').replace('伤害', '').strip() @@ -101,7 +97,7 @@ async def draw_enka_img( logger.info('[查询角色] 绘图失败, 替换的武器不正确!') return char - im = await draw_char_img(char, url, is_curve) + im = await draw_char_img(char, url) logger.info('[查询角色] 绘图完成,等待发送...') return im diff --git a/GenshinUID/genshinuid_help/help.json b/GenshinUID/genshinuid_help/help.json index 2a35e31d..483c7096 100644 --- a/GenshinUID/genshinuid_help/help.json +++ b/GenshinUID/genshinuid_help/help.json @@ -321,14 +321,6 @@ "need_sk": false, "need_admin": false }, - { - "name": "查询[角色]成长曲线", - "desc": "输出当前角色成长表", - "eg": "查询刻晴曲线", - "need_ck": false, - "need_sk": false, - "need_admin": false - }, { "name": "查询展柜角色", "desc": "查询所有已缓存角色列表", @@ -756,4 +748,4 @@ } ] } -} \ No newline at end of file +} diff --git "a/GenshinUID/genshinuid_help/icon_path/\346\237\245\350\257\242[\350\247\222\350\211\262]\346\210\220\351\225\277\346\233\262\347\272\277.png" "b/GenshinUID/genshinuid_help/icon_path/\346\237\245\350\257\242[\350\247\222\350\211\262]\346\210\220\351\225\277\346\233\262\347\272\277.png" deleted file mode 100644 index 505152bb..00000000 Binary files "a/GenshinUID/genshinuid_help/icon_path/\346\237\245\350\257\242[\350\247\222\350\211\262]\346\210\220\351\225\277\346\233\262\347\272\277.png" and /dev/null differ