mirror of
https://github.com/PaiGramTeam/PamGram.git
synced 2024-11-25 07:36:27 +00:00
✨ Support player's player_card
This commit is contained in:
parent
35f3a3d2b5
commit
32e2c789cd
@ -18,10 +18,10 @@ __all__ = [
|
|||||||
|
|
||||||
# noinspection SpellCheckingInspection
|
# noinspection SpellCheckingInspection
|
||||||
roles = {
|
roles = {
|
||||||
8001: ["开拓者"],
|
8001: ["开拓者·毁灭"],
|
||||||
8002: ["开拓者"],
|
8002: ["开拓者·毁灭"],
|
||||||
8003: ["开拓者"],
|
8003: ["开拓者·存护"],
|
||||||
8004: ["开拓者"],
|
8004: ["开拓者·存护"],
|
||||||
1001: ["三月七", "mar7th", "三月", "小三月", "阿七", "冷面小粉龙", "纠缠之缘", "小仓唯", "xcw"],
|
1001: ["三月七", "mar7th", "三月", "小三月", "阿七", "冷面小粉龙", "纠缠之缘", "小仓唯", "xcw"],
|
||||||
1002: ["丹恒", "danheng", "冷面小青龙", "闷葫芦"],
|
1002: ["丹恒", "danheng", "冷面小青龙", "闷葫芦"],
|
||||||
1003: ["姬子", "himeko", "姬子阿姐"],
|
1003: ["姬子", "himeko", "姬子阿姐"],
|
||||||
|
@ -128,5 +128,24 @@
|
|||||||
"暴击率百分比",
|
"暴击率百分比",
|
||||||
"暴击伤害百分比",
|
"暴击伤害百分比",
|
||||||
"雷属性伤害提高百分比"
|
"雷属性伤害提高百分比"
|
||||||
|
],
|
||||||
|
"罗刹": [
|
||||||
|
"生命值百分比",
|
||||||
|
"生命值",
|
||||||
|
"治疗量加成百分比"
|
||||||
|
],
|
||||||
|
"开拓者·毁灭": [
|
||||||
|
"攻击力百分比",
|
||||||
|
"击破特攻",
|
||||||
|
"暴击率百分比",
|
||||||
|
"暴击伤害百分比",
|
||||||
|
"物理属性伤害提高百分比"
|
||||||
|
],
|
||||||
|
"开拓者·存护": [
|
||||||
|
"防御力百分比",
|
||||||
|
"火属性伤害提高百分比",
|
||||||
|
"速度",
|
||||||
|
"效果命中百分比",
|
||||||
|
"效果抵抗百分比"
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -28,7 +28,7 @@ class AvatarPromote(BaseModel):
|
|||||||
|
|
||||||
coin: int = 0
|
coin: int = 0
|
||||||
"""信用点"""
|
"""信用点"""
|
||||||
items: list[AvatarItem]
|
items: List[AvatarItem]
|
||||||
"""突破所需材料"""
|
"""突破所需材料"""
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
# 光锥
|
# 光锥
|
||||||
|
from typing import List
|
||||||
|
|
||||||
from pydantic import BaseModel
|
from pydantic import BaseModel
|
||||||
|
|
||||||
from .enums import Quality, Destiny
|
from .enums import Quality, Destiny
|
||||||
@ -22,7 +24,7 @@ class LightConePromote(BaseModel):
|
|||||||
|
|
||||||
coin: int = 0
|
coin: int = 0
|
||||||
"""信用点"""
|
"""信用点"""
|
||||||
items: list[LightConeItem]
|
items: List[LightConeItem]
|
||||||
"""突破所需材料"""
|
"""突破所需材料"""
|
||||||
|
|
||||||
|
|
||||||
@ -41,7 +43,7 @@ class LightCone(BaseModel):
|
|||||||
"""稀有度"""
|
"""稀有度"""
|
||||||
destiny: Destiny
|
destiny: Destiny
|
||||||
"""命途"""
|
"""命途"""
|
||||||
promote: list[LightConePromote]
|
promote: List[LightConePromote]
|
||||||
"""晋阶信息"""
|
"""晋阶信息"""
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -164,9 +164,6 @@ class PlayerCards(Plugin):
|
|||||||
else:
|
else:
|
||||||
await message.reply_text(f"角色展柜中未找到 {ch_name} ,请检查角色是否存在于角色展柜中,或者等待角色数据更新后重试")
|
await message.reply_text(f"角色展柜中未找到 {ch_name} ,请检查角色是否存在于角色展柜中,或者等待角色数据更新后重试")
|
||||||
return
|
return
|
||||||
if characters.AvatarID in {8001, 8002, 8003, 8004}:
|
|
||||||
await message.reply_text(f"暂不支持查询 {ch_name} 的角色卡片")
|
|
||||||
return
|
|
||||||
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
|
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
|
||||||
render_result = await RenderTemplate(
|
render_result = await RenderTemplate(
|
||||||
uid,
|
uid,
|
||||||
@ -292,9 +289,6 @@ class PlayerCards(Plugin):
|
|||||||
await message.delete()
|
await message.delete()
|
||||||
await callback_query.answer(f"角色展柜中未找到 {result} ,请检查角色是否存在于角色展柜中,或者等待角色数据更新后重试", show_alert=True)
|
await callback_query.answer(f"角色展柜中未找到 {result} ,请检查角色是否存在于角色展柜中,或者等待角色数据更新后重试", show_alert=True)
|
||||||
return
|
return
|
||||||
if characters.AvatarID in {8001, 8002, 8003, 8004}:
|
|
||||||
await callback_query.answer(f"暂不支持查询 {result} 的角色卡片")
|
|
||||||
return
|
|
||||||
await callback_query.answer(text="正在渲染图片中 请稍等 请不要重复点击按钮", show_alert=False)
|
await callback_query.answer(text="正在渲染图片中 请稍等 请不要重复点击按钮", show_alert=False)
|
||||||
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
|
await message.reply_chat_action(ChatAction.UPLOAD_PHOTO)
|
||||||
render_result = await RenderTemplate(
|
render_result = await RenderTemplate(
|
||||||
@ -367,7 +361,7 @@ class PlayerCards(Plugin):
|
|||||||
"""
|
"""
|
||||||
characters_data = []
|
characters_data = []
|
||||||
for idx, character in enumerate(data.AvatarList):
|
for idx, character in enumerate(data.AvatarList):
|
||||||
cid = 8004 if character.AvatarID in {8001, 8002, 8003, 8004} else character.AvatarID
|
cid = character.AvatarID
|
||||||
try:
|
try:
|
||||||
characters_data.append(
|
characters_data.append(
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user