From 9c1717262748ff101a6eaa3c134670ba3b07e61e Mon Sep 17 00:00:00 2001 From: CMHopeSunshine <277073121@qq.com> Date: Thu, 25 Aug 2022 15:11:33 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fix=20`=E7=BB=AB=E5=8D=8E=E3=80=81?= =?UTF-8?q?=E8=8E=AB=E5=A8=9C=E5=A4=A9=E8=B5=8B`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LittlePaimon/database/models/character.py | 10 ++++------ .../plugins/Paimon_Info/draw_character_card.py | 2 ++ .../plugins/Paimon_Info/draw_character_detail.py | 3 ++- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/LittlePaimon/database/models/character.py b/LittlePaimon/database/models/character.py index c6e52e1..8912b67 100644 --- a/LittlePaimon/database/models/character.py +++ b/LittlePaimon/database/models/character.py @@ -328,13 +328,13 @@ class Character(Model): data['skillLevelMap'][ list(data['skillLevelMap'].keys())[score_talent_map['Talent'][role_name][1]]] += 3 - if character.name in ['神里绫华', '莫娜']: - del data['skillLevelMap'][list(data['skillLevelMap'].keys())[2]] - character.talents = Talents(talent_list=[Talent(name=role_skill_map['Name'][talent], level=data['skillLevelMap'][talent], icon=role_skill_map['Icon'][talent]) for talent in data['skillLevelMap']]) + if character.name == '神里绫华': + character.talents[0], character.talents[-1] = character.talents[-1], character.talents[0] + character.talents[2], character.talents[-1] = character.talents[-1], character.talents[2] if character.name == '安柏': character.talents[0], character.talents[-1] = character.talents[-1], character.talents[0] if character.name in ['空', '荧']: @@ -447,9 +447,7 @@ class Character(Model): data['skill_list'][score_talent_map['Talent'][role_name][0]]['level_current'] += 3 if len(data['talentIdList']) >= 5: data['skill_list'][score_talent_map['Talent'][role_name][1]]['level_current'] += 3 - if character.name in ['莫娜', '神里绫华']: - del data['skill_list'][2] - talents_list = data['skill_list'][:3] + talents_list = data['skill_list'] if character.name == '达达利亚': talents_list[0]['level_current'] += 1 character.talents = Talents(talent_list=[Talent(name=t['name'], diff --git a/LittlePaimon/plugins/Paimon_Info/draw_character_card.py b/LittlePaimon/plugins/Paimon_Info/draw_character_card.py index eb4756c..44bb755 100644 --- a/LittlePaimon/plugins/Paimon_Info/draw_character_card.py +++ b/LittlePaimon/plugins/Paimon_Info/draw_character_card.py @@ -108,6 +108,8 @@ async def draw_chara_card(info: Character): 'center') await card.crop((0, 0, card.width, 435)) else: + if info.name in ['神里绫华', '莫娜']: + info.talents.pop(2) await card.draw_rounded_rectangle((69, 380, 145, 452), 8, talent_color[info.talents[0].level - 1][1]) await card.draw_rounded_rectangle((71, 382, 143, 450), 8, talent_color[info.talents[0].level - 1][0]) await card.text(str(info.talents[0].level), (71, 143), 392, fm.get('bahnschrift_bold', 48), diff --git a/LittlePaimon/plugins/Paimon_Info/draw_character_detail.py b/LittlePaimon/plugins/Paimon_Info/draw_character_detail.py index 04be4d5..643fa5f 100644 --- a/LittlePaimon/plugins/Paimon_Info/draw_character_detail.py +++ b/LittlePaimon/plugins/Paimon_Info/draw_character_detail.py @@ -140,7 +140,8 @@ async def draw_chara_detail(uid: str, info: Character): # 天赋 base_icon = await load_image(ENKA_RES / f'图标_{info.element}.png', mode='RGBA') base_icon_grey = await load_image(ENKA_RES / '图标_灰.png', mode='RGBA') - + if info.name in ['神里绫华', '莫娜']: + info.talents.pop(2) for i in range(3): await img.paste(base_icon.resize((132, 142)), (551 + i * 176, 633)) await img.text(str(info.talents[i].level),