mirror of
https://github.com/xuthus83/LittlePaimon.git
synced 2024-12-16 13:40:53 +08:00
✨ 补充草神专武,加大签到间隔,更新资源url
This commit is contained in:
parent
10a761a876
commit
c8f03332e5
@ -271,8 +271,6 @@
|
|||||||
"若水": [
|
"若水": [
|
||||||
"若水",
|
"若水",
|
||||||
"麒麟弓",
|
"麒麟弓",
|
||||||
"Aqua",
|
|
||||||
"aqua"
|
|
||||||
],
|
],
|
||||||
"昭心": [
|
"昭心": [
|
||||||
"昭心",
|
"昭心",
|
||||||
@ -582,10 +580,12 @@
|
|||||||
"黎明神剑"
|
"黎明神剑"
|
||||||
],
|
],
|
||||||
"黑岩刺枪": [
|
"黑岩刺枪": [
|
||||||
"黑岩刺枪"
|
"黑岩刺枪",
|
||||||
|
"黑岩枪"
|
||||||
],
|
],
|
||||||
"黑岩战弓": [
|
"黑岩战弓": [
|
||||||
"黑岩战弓"
|
"黑岩战弓",
|
||||||
|
"黑岩弓"
|
||||||
],
|
],
|
||||||
"黑岩斩刀": [
|
"黑岩斩刀": [
|
||||||
"黑岩斩刀"
|
"黑岩斩刀"
|
||||||
@ -636,6 +636,8 @@
|
|||||||
],
|
],
|
||||||
"圣显之钥": [
|
"圣显之钥": [
|
||||||
"圣显之钥",
|
"圣显之钥",
|
||||||
|
"圣显"
|
||||||
|
"不灭剑华",
|
||||||
"妮露武器"
|
"妮露武器"
|
||||||
],
|
],
|
||||||
"西福斯的月光": [
|
"西福斯的月光": [
|
||||||
@ -655,6 +657,16 @@
|
|||||||
"玛海菈的水色",
|
"玛海菈的水色",
|
||||||
"玛海菈",
|
"玛海菈",
|
||||||
"水色"
|
"水色"
|
||||||
|
],
|
||||||
|
"千夜浮梦": [
|
||||||
|
"千夜浮梦",
|
||||||
|
"千夜",
|
||||||
|
"神灯",
|
||||||
|
"茶壶"
|
||||||
|
],
|
||||||
|
"流浪的晚星": [
|
||||||
|
"流浪的晚星",
|
||||||
|
"晚星"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"圣遗物": {
|
"圣遗物": {
|
||||||
|
@ -1232,6 +1232,69 @@
|
|||||||
"SideIconName": "UI_AvatarIcon_Side_Tighnari",
|
"SideIconName": "UI_AvatarIcon_Side_Tighnari",
|
||||||
"QualityType": "QUALITY_ORANGE"
|
"QualityType": "QUALITY_ORANGE"
|
||||||
},
|
},
|
||||||
|
"10000070": {
|
||||||
|
"Element": "Water",
|
||||||
|
"Consts": [
|
||||||
|
"UI_Talent_S_Nilou_01",
|
||||||
|
"UI_Talent_S_Nilou_02",
|
||||||
|
"UI_Talent_U_Nilou_01",
|
||||||
|
"UI_Talent_S_Nilou_03",
|
||||||
|
"UI_Talent_U_Nilou_02",
|
||||||
|
"UI_Talent_S_Nilou_04"
|
||||||
|
],
|
||||||
|
"SkillOrder": [10701, 10702, 10705],
|
||||||
|
"Skills": {
|
||||||
|
"10701": "Skill_A_01",
|
||||||
|
"10702": "Skill_S_Nilou_01",
|
||||||
|
"10705": "Skill_E_Nilou_01"
|
||||||
|
},
|
||||||
|
"ProudMap": { "10701": 7031, "10702": 7032, "10705": 7039 },
|
||||||
|
"NameTextMapHash": 3850149970,
|
||||||
|
"SideIconName": "UI_AvatarIcon_Side_Nilou",
|
||||||
|
"QualityType": "QUALITY_ORANGE"
|
||||||
|
},
|
||||||
|
"10000071": {
|
||||||
|
"Element": "Electric",
|
||||||
|
"Consts": [
|
||||||
|
"UI_Talent_S_Cyno_01",
|
||||||
|
"UI_Talent_S_Cyno_02",
|
||||||
|
"UI_Talent_U_Cyno_01",
|
||||||
|
"UI_Talent_S_Cyno_03",
|
||||||
|
"UI_Talent_U_Cyno_02",
|
||||||
|
"UI_Talent_S_Cyno_04"
|
||||||
|
],
|
||||||
|
"SkillOrder": [10711, 10712, 10715],
|
||||||
|
"Skills": {
|
||||||
|
"10711": "Skill_A_03",
|
||||||
|
"10712": "Skill_S_Cyno_01",
|
||||||
|
"10715": "Skill_E_Cyno_01"
|
||||||
|
},
|
||||||
|
"ProudMap": { "10711": 7131, "10712": 7132, "10715": 7139 },
|
||||||
|
"NameTextMapHash": 1049891906,
|
||||||
|
"SideIconName": "UI_AvatarIcon_Side_Cyno",
|
||||||
|
"QualityType": "QUALITY_ORANGE"
|
||||||
|
},
|
||||||
|
"10000072": {
|
||||||
|
"Element": "Water",
|
||||||
|
"Consts": [
|
||||||
|
"UI_Talent_S_Candace_01",
|
||||||
|
"UI_Talent_S_Candace_02",
|
||||||
|
"UI_Talent_U_Candace_01",
|
||||||
|
"UI_Talent_S_Candace_03",
|
||||||
|
"UI_Talent_U_Candace_02",
|
||||||
|
"UI_Talent_S_Candace_04"
|
||||||
|
],
|
||||||
|
"SkillOrder": [10721, 10722, 10725],
|
||||||
|
"Skills": {
|
||||||
|
"10721": "Skill_A_03",
|
||||||
|
"10722": "Skill_S_Candace_01",
|
||||||
|
"10725": "Skill_E_Candace_01"
|
||||||
|
},
|
||||||
|
"ProudMap": { "10721": 7231, "10722": 7232, "10725": 7239 },
|
||||||
|
"NameTextMapHash": 3092975658,
|
||||||
|
"SideIconName": "UI_AvatarIcon_Side_Candace",
|
||||||
|
"QualityType": "QUALITY_PURPLE"
|
||||||
|
},
|
||||||
"10000005-501": {
|
"10000005-501": {
|
||||||
"Element": "None",
|
"Element": "None",
|
||||||
"Consts": ["None", "None", "None", "None", "None", "None"],
|
"Consts": ["None", "None", "None", "None", "None", "None"],
|
||||||
|
@ -202,13 +202,13 @@ class MihoyoBBSCoin:
|
|||||||
req = await aiorequests.post(url=bbs_Signurl, json={'gids': i['id']}, headers=header)
|
req = await aiorequests.post(url=bbs_Signurl, json={'gids': i['id']}, headers=header)
|
||||||
data = req.json()
|
data = req.json()
|
||||||
if data['retcode'] != 0:
|
if data['retcode'] != 0:
|
||||||
if data['retcode'] not in [1034]:
|
if data['retcode'] != 1034:
|
||||||
self.is_valid = False
|
self.is_valid = False
|
||||||
self.state = 'Cookie已失效' if data['retcode'] in [-100,
|
self.state = 'Cookie已失效' if data['retcode'] in [-100,
|
||||||
10001] else f"出错了:{data['retcode']} {data['message']}"
|
10001] else f"出错了:{data['retcode']} {data['message']}"
|
||||||
logger.info('米游币自动获取', f'➤➤<r>{self.state}</r>')
|
logger.info('米游币自动获取', f'➤➤<r>{self.state}</r>')
|
||||||
return f'讨论区签到:{self.state}'
|
return f'讨论区签到:{self.state}'
|
||||||
await asyncio.sleep(random.randint(5, 10))
|
await asyncio.sleep(random.randint(15, 30))
|
||||||
logger.info('米游币自动获取', '➤➤讨论区签到<g>完成</g>')
|
logger.info('米游币自动获取', '➤➤讨论区签到<g>完成</g>')
|
||||||
return '讨论区签到:完成!'
|
return '讨论区签到:完成!'
|
||||||
|
|
||||||
|
@ -100,10 +100,10 @@ async def mhy_bbs_sign(user_id: str, uid: str) -> Tuple[SignResult, str]:
|
|||||||
signed_days = sign_info['data']['total_sign_day']
|
signed_days = sign_info['data']['total_sign_day']
|
||||||
return SignResult.SUCCESS, f'签到成功,获得的奖励为\n{sign_reward_list[signed_days]["name"]}*{sign_reward_list[signed_days]["cnt"]}'
|
return SignResult.SUCCESS, f'签到成功,获得的奖励为\n{sign_reward_list[signed_days]["name"]}*{sign_reward_list[signed_days]["cnt"]}'
|
||||||
else:
|
else:
|
||||||
wait_time = random.randint(45, 60)
|
wait_time = random.randint(90, 120)
|
||||||
logger.info('米游社原神签到', '➤', {'用户': user_id, 'UID': uid}, f'出现验证码,等待{wait_time}秒后进行第{i + 1}次尝试绕过', False)
|
logger.info('米游社原神签到', '➤', {'用户': user_id, 'UID': uid}, f'出现验证码,等待{wait_time}秒后进行第{i + 1}次尝试绕过', False)
|
||||||
await asyncio.sleep(wait_time)
|
await asyncio.sleep(wait_time)
|
||||||
logger.info('米游社原神签到', '➤', {'用户': user_id, 'UID': uid}, '尝试6次签到失败,无法绕过验证码', False)
|
logger.info('米游社原神签到', '➤', {'用户': user_id, 'UID': uid}, '尝试3次签到失败,无法绕过验证码', False)
|
||||||
return SignResult.FAIL, f'{uid}签到失败,无法绕过验证码'
|
return SignResult.FAIL, f'{uid}签到失败,无法绕过验证码'
|
||||||
|
|
||||||
|
|
||||||
@ -144,9 +144,9 @@ async def bbs_auto_sign():
|
|||||||
'reward': msg.split('\n')[-1] if result in [SignResult.SUCCESS, SignResult.DONE] else ''
|
'reward': msg.split('\n')[-1] if result in [SignResult.SUCCESS, SignResult.DONE] else ''
|
||||||
})
|
})
|
||||||
if result == SignResult.DONE:
|
if result == SignResult.DONE:
|
||||||
await asyncio.sleep(random.randint(3, 8))
|
await asyncio.sleep(random.randint(5, 10))
|
||||||
else:
|
else:
|
||||||
await asyncio.sleep(random.randint(45, 60))
|
await asyncio.sleep(random.randint(60, 90))
|
||||||
|
|
||||||
for group_id, sign_result in sign_result_group.items():
|
for group_id, sign_result in sign_result_group.items():
|
||||||
# 发送签到结果到群
|
# 发送签到结果到群
|
||||||
|
@ -39,9 +39,12 @@ async def small_avatar(info: FiveStarItem):
|
|||||||
if info.name in small_avatar_cache:
|
if info.name in small_avatar_cache:
|
||||||
return small_avatar_cache[info.name]
|
return small_avatar_cache[info.name]
|
||||||
bg = PMImage(await load_image(RESOURCE_BASE_PATH / 'gacha_log' / 'small_circle.png'))
|
bg = PMImage(await load_image(RESOURCE_BASE_PATH / 'gacha_log' / 'small_circle.png'))
|
||||||
|
if info.icon:
|
||||||
img = PMImage(
|
img = PMImage(
|
||||||
await load_image(RESOURCE_BASE_PATH / ('avatar' if info.type == '角色' else 'weapon') / f'{info.icon}.png',
|
await load_image(RESOURCE_BASE_PATH / ('avatar' if info.type == '角色' else 'weapon') / f'{info.icon}.png',
|
||||||
size=(42, 42)))
|
size=(42, 42)))
|
||||||
|
else:
|
||||||
|
img = PMImage(size=(42, 42), color=(255, 255, 255, 0))
|
||||||
await img.to_circle('circle')
|
await img.to_circle('circle')
|
||||||
await bg.paste(img.image, (2, 2))
|
await bg.paste(img.image, (2, 2))
|
||||||
small_avatar_cache[info.name] = bg
|
small_avatar_cache[info.name] = bg
|
||||||
@ -50,9 +53,12 @@ async def small_avatar(info: FiveStarItem):
|
|||||||
|
|
||||||
async def detail_avatar(info: FiveStarItem):
|
async def detail_avatar(info: FiveStarItem):
|
||||||
bg = PMImage(await load_image(RESOURCE_BASE_PATH / 'gacha_log' / 'item_avatar_5.png'))
|
bg = PMImage(await load_image(RESOURCE_BASE_PATH / 'gacha_log' / 'item_avatar_5.png'))
|
||||||
|
if info.icon:
|
||||||
img = PMImage(
|
img = PMImage(
|
||||||
await load_image(RESOURCE_BASE_PATH / ('avatar' if info.type == '角色' else 'weapon') / f'{info.icon}.png',
|
await load_image(RESOURCE_BASE_PATH / ('avatar' if info.type == '角色' else 'weapon') / f'{info.icon}.png',
|
||||||
size=(123, 123)))
|
size=(123, 123)))
|
||||||
|
else:
|
||||||
|
img = PMImage(size=(123, 123), color=(255, 255, 255, 0))
|
||||||
await bg.paste(img, (14, 14))
|
await bg.paste(img, (14, 14))
|
||||||
await bg.text(info.name, (0, bg.width), 140, fm.get('hywh', 24),
|
await bg.text(info.name, (0, bg.width), 140, fm.get('hywh', 24),
|
||||||
'#33231a', 'center')
|
'#33231a', 'center')
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import datetime
|
import datetime
|
||||||
from typing import List, Dict, Union, Tuple
|
from typing import List, Dict, Tuple, Optional
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
from LittlePaimon.utils.alias import get_chara_icon, get_weapon_icon
|
from LittlePaimon.utils.alias import get_chara_icon, get_weapon_icon
|
||||||
|
|
||||||
@ -8,14 +8,14 @@ GACHA_TYPE_LIST = {'100': '新手祈愿', '200': '常驻祈愿', '302': '武器
|
|||||||
|
|
||||||
class FiveStarItem(BaseModel):
|
class FiveStarItem(BaseModel):
|
||||||
name: str
|
name: str
|
||||||
icon: str
|
icon: Optional[str]
|
||||||
count: int
|
count: int
|
||||||
type: str
|
type: str
|
||||||
|
|
||||||
|
|
||||||
class FourStarItem(BaseModel):
|
class FourStarItem(BaseModel):
|
||||||
name: str
|
name: str
|
||||||
icon: str
|
icon: Optional[str]
|
||||||
type: str
|
type: str
|
||||||
num: Dict[str, int] = {
|
num: Dict[str, int] = {
|
||||||
'角色祈愿': 0,
|
'角色祈愿': 0,
|
||||||
|
@ -94,12 +94,6 @@ def get_chara_icon(name: Optional[str] = None, chara_id: Optional[int] = None,
|
|||||||
chara_id = get_id_by_name(name)
|
chara_id = get_id_by_name(name)
|
||||||
if info := info_file.get(str(chara_id)):
|
if info := info_file.get(str(chara_id)):
|
||||||
side_icon = info['SideIconName']
|
side_icon = info['SideIconName']
|
||||||
elif str(chara_id) == '10000070':
|
|
||||||
side_icon = 'UI_AvatarIcon_Side_Nilou'
|
|
||||||
elif str(chara_id) == '10000071':
|
|
||||||
side_icon = 'UI_AvatarIcon_Side_Cyno'
|
|
||||||
elif str(chara_id) == '10000072':
|
|
||||||
side_icon = 'UI_AvatarIcon_Side_Candace'
|
|
||||||
else:
|
else:
|
||||||
return None
|
return None
|
||||||
if icon_type == 'side':
|
if icon_type == 'side':
|
||||||
|
@ -159,7 +159,7 @@ class aiorequests:
|
|||||||
:param save_path: 保存路径
|
:param save_path: 保存路径
|
||||||
"""
|
"""
|
||||||
urls = [
|
urls = [
|
||||||
f'https://file.minigg.icu/genshin/ui/{name}',
|
f'https://file.microgg.cn/MiniGG/ui/{name}',
|
||||||
f'https://api.ambr.top/assets/UI/{name}',
|
f'https://api.ambr.top/assets/UI/{name}',
|
||||||
f'https://enka.network/ui/{name}'
|
f'https://enka.network/ui/{name}'
|
||||||
]
|
]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user