mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-12-16 13:40:53 +08:00
✨ 新原魔图鉴
This commit is contained in:
parent
1afab8dcc0
commit
b3ad465758
File diff suppressed because it is too large
Load Diff
@ -263,7 +263,7 @@ async def _(bot: Bot, event: MessageEvent, state: T_State, type: str = Arg('type
|
|||||||
else:
|
else:
|
||||||
matches = get_match_alias(name, '武器')
|
matches = get_match_alias(name, '武器')
|
||||||
elif type.startswith('原魔'):
|
elif type.startswith('原魔'):
|
||||||
matches = {'原魔': alias_file['原魔']} if name == '全部' else get_match_alias(name, '原魔')
|
matches = {'原魔': list(alias_file['原魔'].keys())} if name == '全部' else get_match_alias(name, '原魔')
|
||||||
elif type.startswith('圣遗物'):
|
elif type.startswith('圣遗物'):
|
||||||
matches = {'圣遗物': list(alias_file['圣遗物'].keys())} if name == '全部' else get_match_alias(name, '圣遗物')
|
matches = {'圣遗物': list(alias_file['圣遗物'].keys())} if name == '全部' else get_match_alias(name, '圣遗物')
|
||||||
elif type.startswith('七圣召唤'):
|
elif type.startswith('七圣召唤'):
|
||||||
|
@ -9,7 +9,7 @@ API: Dict[str, str] = {
|
|||||||
'参考面板': '{proxy}https://raw.githubusercontent.com/CMHopeSunshine/LittlePaimonRes/main/genshin_guide/panel/{name}.jpg',
|
'参考面板': '{proxy}https://raw.githubusercontent.com/CMHopeSunshine/LittlePaimonRes/main/genshin_guide/panel/{name}.jpg',
|
||||||
'武器图鉴': '{proxy}https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/weapon/{name}.png',
|
'武器图鉴': '{proxy}https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/weapon/{name}.png',
|
||||||
'圣遗物图鉴': '{proxy}https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/artifact/{name}.png',
|
'圣遗物图鉴': '{proxy}https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/artifact/{name}.png',
|
||||||
'原魔图鉴': 'https://static.cherishmoon.fun/LittlePaimon/MonsterMaps/{name}.jpg',
|
'原魔图鉴': '{proxy}https://raw.githubusercontent.com/CMHopeSunshine/GenshinWikiMap/master/results/monster_map/{name}.jpg',
|
||||||
'特产图鉴': '{proxy}https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/specialty/{name}.png',
|
'特产图鉴': '{proxy}https://raw.githubusercontent.com/Nwflower/genshin-atlas/master/specialty/{name}.png',
|
||||||
'七圣召唤图鉴': CARD_API
|
'七圣召唤图鉴': CARD_API
|
||||||
}
|
}
|
@ -97,7 +97,7 @@ def get_match_alias(name: str, types: Union[List[ALIAS_TYPE], ALIAS_TYPE] = None
|
|||||||
break
|
break
|
||||||
if get_close_matches(name, alias, cutoff=0.6, n=3):
|
if get_close_matches(name, alias, cutoff=0.6, n=3):
|
||||||
matches[type].append(alias[0])
|
matches[type].append(alias[0])
|
||||||
elif type in {'武器', '圣遗物'}:
|
elif type in {'武器', '圣遗物', '原魔'}:
|
||||||
for raw_name, alias in alias_list.items():
|
for raw_name, alias in alias_list.items():
|
||||||
if name in alias:
|
if name in alias:
|
||||||
matches[type].append(raw_name)
|
matches[type].append(raw_name)
|
||||||
@ -105,8 +105,8 @@ def get_match_alias(name: str, types: Union[List[ALIAS_TYPE], ALIAS_TYPE] = None
|
|||||||
else:
|
else:
|
||||||
if get_close_matches(name, alias, cutoff=0.6, n=3):
|
if get_close_matches(name, alias, cutoff=0.6, n=3):
|
||||||
matches[type].append(raw_name)
|
matches[type].append(raw_name)
|
||||||
elif type == '原魔':
|
# elif type == '原魔':
|
||||||
matches[type] = get_close_matches(name, alias_list, cutoff=0.4, n=5)
|
# matches[type] = get_close_matches(name, alias_list, cutoff=0.4, n=5)
|
||||||
if not matches[type]:
|
if not matches[type]:
|
||||||
del matches[type]
|
del matches[type]
|
||||||
if one_to_list and len(matches) == 1:
|
if one_to_list and len(matches) == 1:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user