🐛 修复纳西妲伤害计算错误和资源下载报错问题

This commit is contained in:
CMHopeSunshine 2022-11-03 14:56:47 +08:00
parent f31879d653
commit 93bbe007f6
2 changed files with 3 additions and 3 deletions

View File

@ -993,7 +993,7 @@ def get_damage_multipiler(info: Character) -> Optional[Dict[str, any]]:
'B:c2-减防-*': (0.3, '二命减防触发'), 'B:c2-减防-*': (0.3, '二命减防触发'),
'B:l0-额外倍率-E': (float(eb[1].replace('%元素精通', '')) / 100.0 * info.prop.elemental_mastery, ), 'B:l0-额外倍率-E': (float(eb[1].replace('%元素精通', '')) / 100.0 * info.prop.elemental_mastery, ),
'E-e草:灭净三业': float(eb[0].replace('%攻击力', '')) / 100.0, 'E-e草:灭净三业': float(eb[0].replace('%攻击力', '')) / 100.0,
'E-e草-j超激化:灭净三业超激化': float(eb[0].replace('%攻击力', '')) / 100.0 'E-e草-j蔓激化:灭净三业蔓激化': float(eb[0].replace('%攻击力', '')) / 100.0
} }

View File

@ -7,8 +7,8 @@ from typing import Dict, Optional, Any, Union, Tuple
import httpx import httpx
from PIL import Image from PIL import Image
import tqdm.asyncio import tqdm.asyncio
from nonebot import logger
from LittlePaimon.utils import logger
class aiorequests: class aiorequests:
@staticmethod @staticmethod
@ -170,5 +170,5 @@ class aiorequests:
for url in urls: for url in urls:
with contextlib.suppress(Exception): with contextlib.suppress(Exception):
return await aiorequests.get_img(url=url, headers=headers, save_path=save_path, **kwargs) return await aiorequests.get_img(url=url, headers=headers, save_path=save_path, **kwargs)
logger.warning('资源检查', f'{name}下载失败,请检查网络') logger.opt(colors=True).info(f'<u><y>[资源检查]</y></u>图标资源<m>{name}</m><r>下载失败</r>')
return None return None