勋章 杂项

This commit is contained in:
2025-04-08 00:00:38 +08:00
parent f7b9cdbd2b
commit 25805ce331
14 changed files with 298 additions and 558 deletions
+3 -3
View File
@@ -42,8 +42,8 @@ pnpm run dev:backend
- [x] 套装选择
- [x] 贴膜选择
- [x] 通宝选择
- [ ] 称号宠物选择
- [ ] 秘宝选择
- [x] 称号宠物选择
- [x] 秘宝选择
- 技能设置
- [x] 技能等级设置
@@ -58,7 +58,7 @@ pnpm run dev:backend
- [x] 时装/皮肤/光环
- [x] 宠物装备
- [x] 辟邪玉
- [ ] 勋章/杂项
- [x] 勋章/杂项
- 结果计算
- [x] 技能伤害计算
+31 -2
View File
@@ -466,6 +466,7 @@ class Character:
info['emblems'] = equInfos.emblems
info['avatar'] = equInfos.funs.get_dress_list(skill_clothes)
info['jades'] = equInfos.jades
info['sundry'] = equInfos.funs.sundryList
for skill in platinum:
info['emblems'].append(
{
@@ -740,6 +741,34 @@ class Character:
fun(self,jade.get('value', 0))
pass
def calc_sundry(self, sundry: dict):
"""计算杂项效果"""
funs = get_equipment(self.equVersion).funs
funs.sundry_func_list.get("0")(self,
sundry.get("medal_rarity", 0),
sundry.get("medal_reinforce", 0),
[sundry.get("medal_0", 0), sundry.get("medal_1", 0), sundry.get("medal_2", 0), sundry.get("medal_3", 0)],
)
funs.sundry_func_list.get("6")(self,
sundry.get("adventure", 1)
)
funs.sundry_func_list.get("7")(self,
sundry.get("marriage_house", 0),
sundry.get("marriage_ring", 0)
)
funs.sundry_func_list.get("9")(self,
sundry.get("contract", 0)
)
funs.sundry_func_list.get("10")(self,
sundry.get("collection_type", 0),
sundry.get("collection_num_0", 0),
sundry.get("collection_num_1", 0),
)
funs.sundry_func_list.get("13")(self,
sundry.get("costume_card", 0)
)
pass
def calc(self, setInfo: dict[str, dict]):
self.calc_init(setInfo)
# self.SetDetail(setInfo)
@@ -751,6 +780,8 @@ class Character:
self.calc_avatar(setInfo.get('avatar', {}))
# 精通、增幅、强化计算
self.calc_basic()
# 杂项信息
self.calc_sundry(setInfo.get('sundry', {}))
# 计算套装基础效果
suit = self.calc_suits()
# 部位效果计算
@@ -787,8 +818,6 @@ class Character:
}
)
ratios = self.calc_damage_ration()
for i in ratios:
print(i)
ratio_char_skill = ratios[0] * ratios[1] * ratios[2] * ratios[3] * ratios[4] * ratios[5] * ratios[6] * ratios[7] * ratios[8] * ratios[9] / 1000
ratuio_equ_skill = ratios[0] * ratios[1] * ratios[3] * ratios[4] * ratios[6] * ratios[7] * ratios[8] * ratios[9] / 1000
for i in skillInfos:
+1 -1
View File
@@ -34,7 +34,7 @@ class CharacterEquipInfo:
def __init__(self, info={}, equVerison=0, part='') -> None:
info["fusion"] = info.get("fusion", None)
info["percision"] = info.get("precision", 0)
info["precision"] = info.get("precision", 0)
self.__dict__.update(info)
equ = get_equipment(equVerison).equ_dict.get(self.id, None)
fusion = get_equipment(equVerison).stone_dict.get(self.fusion, None)
+1 -1
View File
@@ -5,7 +5,7 @@ from typing import Literal, TYPE_CHECKING
if TYPE_CHECKING:
from core.basic.character import Character
characterLv = 120 + 5
characterLv = 115 + 5
class Skill:
@@ -5,6 +5,7 @@ from .avatar import get_dress_list,calc_dress_effect
from .enchant import enchant_func_list
from .emblem import emblem_func_list
from .stone import stone_func_list
from .sundry import sundry_func_list,sundryList
options = [
{'id': 1, 'name': '龙战八荒,', 'options': ['BUFF OFF', 'BUFF ON', '期望']},
+2 -2
View File
@@ -11222,7 +11222,7 @@ def equ_2000(char: Character):
精度达到100%时,在城镇中使用普通聊天输入“膜拜”时,出现特效。(冷却时间600秒)
"""
if 2100 <= char.max_point < 2550:
if 2100 <= char.max_point < 2550:
char.SetStatus(SkillAttack=0.378,Buffer=12180)
pass
if char.max_point >= 2550:
@@ -11233,7 +11233,7 @@ def equ_2000(char: Character):
# fame = [0,5,10,15,20,25,30,35,40,45,50,55,60,65,70,75,80,85,90,95,100,105,110,115,120,220,225,230,235,240,245,250,255,260,265,270,275,280,285,290,295,300,305,310,315,320,325,330,335,340,440,445,450,455,460,465,470,475,480,485,490,495,500,505,510,515,520,525,530,535,540,545,550,555,560,660,665,670,675,680,685,690,695,700,705,710,715,720,725,730,735,740,745,750,755,760,765,770,775,780,1000]
equEffect = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,0.5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5,1.5]
point = char.charEquipInfo['魔法石'].precision
char.SetStatus(SkillAttack=skillAttack[point],Buffer=buffer[point])
char.SetStatus(SkillAttack=skillAttack[point]/100,Buffer=buffer[point])
effect = equEffect[point]
if effect > 0:
char.equ_effect.append(EquEffect(name='地震波', icon='/equipment/icon/special/magicstone/00417.png', cd=30, data=45900*effect))
-546
View File
@@ -1,546 +0,0 @@
from core.basic.character import Character
sundries_list = {}
# 名望 部位 描述
index = ('maxFame', 'position', 'props')
def sundries_27000(char: Character = {}, text=False):
if text:
return "(0, '', '无')"
# region 冒险团 工会属性 训练官-攻击力 训练官-四维 婚房 婚戒 晶体契约 勋章 守护珠 勋章强化 名称装扮卡 快捷装备 27001~
def sundries_27001(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '1')"
char.SetStatus(四维=100)
def sundries_27002(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '2')"
char.SetStatus(四维=110)
def sundries_27003(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '3')"
char.SetStatus(四维=125)
pass
def sundries_27004(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '4')"
char.SetStatus(四维=140)
pass
def sundries_2705(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '5')"
char.SetStatus(四维=150)
pass
def sundries_2706(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '6')"
char.SetStatus(四维=160)
pass
def sundries_27007(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '7')"
char.SetStatus(四维=170)
pass
def sundries_27008(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '8')"
char.SetStatus(四维=180)
pass
def sundries_27009(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '9')"
char.SetStatus(四维=190)
pass
def sundries_27010(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '10')"
char.SetStatus(四维=200)
pass
def sundries_27011(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '11')"
char.SetStatus(四维=210)
pass
def sundries_27012(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '12')"
char.SetStatus(四维=170)
pass
def sundries_27013(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '13')"
char.SetStatus(四维=220)
pass
def sundries_27014(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '14')"
char.SetStatus(四维=220)
pass
def sundries_27015(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '15')"
char.SetStatus(四维=220)
pass
def sundries_27016(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '16')"
char.SetStatus(四维=230)
pass
def sundries_27017(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '17')"
char.SetStatus(四维=230)
pass
def sundries_27018(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '18')"
char.SetStatus(四维=240)
pass
def sundries_27019(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '19')"
char.SetStatus(四维=240)
pass
def sundries_27020(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '20')"
char.SetStatus(四维=250)
pass
def sundries_27021(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '21')"
char.SetStatus(四维=250)
pass
def sundries_27022(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '22')"
char.SetStatus(四维=250)
pass
def sundries_27023(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '23')"
char.SetStatus(四维=250)
pass
def sundries_27024(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '24')"
char.SetStatus(四维=250)
pass
def sundries_27025(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '25')"
char.SetStatus(四维=260)
pass
def sundries_27026(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '26')"
char.SetStatus(四维=260)
pass
def sundries_27027(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '27')"
char.SetStatus(四维=260)
pass
def sundries_27028(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '28')"
char.SetStatus(四维=260)
pass
def sundries_27029(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '29')"
char.SetStatus(四维=260)
pass
def sundries_27030(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '30')"
char.SetStatus(四维=270)
pass
def sundries_27031(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '31')"
char.SetStatus(四维=270)
pass
def sundries_27032(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '32')"
char.SetStatus(四维=270)
pass
def sundries_27033(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '33')"
char.SetStatus(四维=270)
pass
def sundries_27034(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '34')"
char.SetStatus(四维=270)
pass
def sundries_27035(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '35')"
char.SetStatus(四维=280)
pass
def sundries_27036(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '36')"
char.SetStatus(四维=280)
pass
def sundries_27037(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '37')"
char.SetStatus(四维=280)
pass
def sundries_27038(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '38')"
char.SetStatus(四维=280)
pass
def sundries_27039(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '39')"
char.SetStatus(四维=280)
pass
def sundries_27040(char: Character = {}, text=False):
if text:
return "(0, '冒险团', '40')"
char.SetStatus(四维=290)
pass
def sundries_27041(char: Character = {}, text=False):
if text:
return "(0, '工会属性', '四维(60)')"
char.SetStatus(四维=60)
pass
def sundries_27042(char: Character = {}, text=False):
if text:
return "(0, '工会属性', '四维(120)')"
char.SetStatus(四维=120)
pass
def sundries_27043(char: Character = {}, text=False):
if text:
return "(0, '工会buff-攻击力', 'Lv.1 三攻(25)')"
pass
char.SetStatus(三攻=25)
pass
def sundries_27044(char: Character = {}, text=False):
if text:
return "(0, '工会buff-攻击力', 'Lv.2 三攻(30)')"
pass
char.SetStatus(三攻=30)
pass
def sundries_27045(char: Character = {}, text=False):
if text:
return "(0, '工会buff-攻击力', 'Lv.3 三攻(35)')"
pass
char.SetStatus(三攻=35)
pass
def sundries_27046(char: Character = {}, text=False):
if text:
return "(0, '工会buff-攻击力', 'Lv.4 三攻(50)')"
char.SetStatus(三攻=50)
pass
def sundries_27047(char: Character = {}, text=False):
if text:
return "(0, '工会buff-四维强化', 'Lv.1 四维(40)')"
char.SetStatus(四维=40)
pass
def sundries_27048(char: Character = {}, text=False):
if text:
return "(0, '工会buff-四维强化', 'Lv.2 四维(50)')"
char.SetStatus(四维=50)
pass
def sundries_27049(char: Character = {}, text=False):
if text:
return "(0, '工会buff-四维强化', 'Lv.3 四维(60)')"
char.SetStatus(四维=60)
pass
def sundries_27050(char: Character = {}, text=False):
if text:
return "(0, '工会buff-四维强化', 'Lv.4 四维(80)')"
char.SetStatus(四维=80)
pass
def sundries_27051(char: Character = {}, text=False):
if text:
return "(0, '婚戒', '体精(8)')"
char.SetStatus(体精=8)
pass
def sundries_27052(char: Character = {}, text=False):
if text:
return "(0, '婚戒', '体精(10)|力智(15)')"
char.SetStatus(力智=15)
char.SetStatus(体精=10)
pass
def sundries_27053(char: Character = {}, text=False):
if text:
return "(0, '婚房', '所有属性强化(1)')"
char.所有属性强化加成(1, 辟邪玉加成=0)
pass
def sundries_27054(char: Character = {}, text=False):
if text:
return "(0, '婚房', '所有属性强化(3)')"
char.所有属性强化加成(3, 辟邪玉加成=0)
pass
def sundries_27055(char: Character = {}, text=False):
if text:
return "(0, '婚房', '所有属性强化(5)|三攻(5)')"
char.所有属性强化加成(5, 辟邪玉加成=0)
char.SetStatus(三攻=5)
pass
def sundries_27056(char: Character = {}, text=False):
if text:
return "(0, '婚房', '所有属性强化(8)|三攻(10/20)')"
char.所有属性强化加成(8, 辟邪玉加成=0)
char.SetStatus(物理攻击力=10, 魔法攻击力=10, 独立攻击力=20)
pass
# 调用的时候前面的参数一个都不能少
# sundries_27055({}, 0, False, 0, 2)
def sundries_27057(char: Character = {}, text=False, *args):
if text:
return "(0, '收集箱', '春节套')"
# 可变参数
xy = 0
sq = 0
try:
xy = args[0]
except Exception:
pass
try:
sq = args[1]
except Exception:
pass
char.SetStatus(四维=sq * 15, 三攻=xy * 15)
char.所有属性强化加成(sq * 3)
def sundries_27058(char: Character = {}, text=False, *args):
if text:
return "(0, '收集箱', '夏日套')"
# 可变参数
xy = 0
sq = 0
try:
xy = args[0]
except Exception:
pass
try:
sq = args[1]
except Exception:
pass
char.SetStatus(四维=sq * 10, 三攻=xy * 10)
char.所有属性强化加成(sq * 2)
def sundries_27059(char: Character = {}, text=False, *args):
if text:
return "(0, '收集箱', '五一套')"
pass
def sundries_27061(char: Character = {}, text=False):
if text:
return "(0, '晶体契约', '无色契约 三攻(40)')"
pass
char.SetStatus(三攻=40)
pass
def sundries_27062(char: Character = {}, text=False):
if text:
return "(0, '名称装扮卡', '四维(3)|攻击速度(1%)|施放速度(1%)|移动速度(1%)')"
char.SetStatus(四维=3)
char.SetStatus(三速=0.01)
pass
# 勋章 new
def sundries_27063(char: Character = {}, text=False, *args):
if text:
return "(235,'New','四维(48)|三攻(30)')"
# 勋章基础 char.SetStatus(四维=48, 三攻=30)
# 勋章品质
# 攻击强化 BUFF量 名望
medal_quality = [(1035, 125, 235), (2045, 249, 315), (3799, 461, 415), (5960, 724, 509), (8532, 1035, 606), (11688, 1418, 708)]
quality = medal_quality[args[0]]
char.攻击强化加成(quality[0] * args[3])
char.buff量加成(quality[1])
# 勋章强化
medal_lv = [
(0, 0, 0),
(390, 47, 24),
(779, 95, 47),
(1169, 142, 71),
(1558, 189, 94),
(1948, 236, 118),
(2337, 284, 142),
(2727, 331, 165),
(3117, 378, 189),
(3506, 425, 212),
(3896, 473, 236),
(4285, 520, 259),
(4675, 567, 283),
]
lv = medal_lv[args[1]]
char.攻击强化加成(lv[0] * args[3])
char.buff量加成(lv[1])
# 宝石 char.攻击速度增加(0.03) char.所有属性强化加成(7)
medal_gems_quality = [(224, 27, 46), (403, 49, 58), (701, 85, 72), (1140, 138, 88), (1753, 212, 106)]
for i in args[2]:
gems_quality = medal_gems_quality[i]
char.攻击强化加成(gems_quality[0] * args[3])
char.buff量加成(gems_quality[1])
pass
# endregion
# 杂项id范围 27001~27999
for i in range(27001, 27100):
try:
if i not in sundries_list.keys():
sundries_list[i] = eval('sundries_{}'.format(i))
except Exception:
pass
def get_sundriesfunc_by_id(id):
return sundries_list.get(id, sundries_27000)
def get_sundries_setinfo():
infolist = []
for i in sundries_list.keys():
data = {}
data['id'] = i
info = eval(sundries_list[i](text=True))
num = 0
for k in index:
data[k] = info[num]
num += 1
infolist.append(data)
return infolist
+114
View File
@@ -0,0 +1,114 @@
# sundry_list = ['medal_rarity', 'medal_rarity', 'medal_reinforce', 'medal_gem_0', 'medal_gem_1', 'medal_gem_2', 'medal_gem_3', 'adventure', 'marriage_house', 'marriage_ring', 'contract', 'collection_type', 'collection_num_0', 'collection_num_1', 'costume_card']
from core.basic.character import Character
sundry_func_list = {}
sundryList = {
'medal_rarity': {'id': 0, 'options': [{'name': f'品质:{i}', 'value': idx} for idx, i in enumerate(['普通', '高级', '稀有', '神器', '传说', '史诗'])]},
'medal_reinforce': {'id': 1, 'options': [{'name': f'强化 +{i}', 'value': i} for i in range(0, 13)]},
'medal_gem_0': {'id': 2, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['普通', '高级', '稀有', '神器', '传说'])]},
'medal_gem_1': {'id': 3, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['普通', '高级', '稀有', '神器', '传说'])]},
'medal_gem_2': {'id': 4, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['普通', '高级', '稀有', '神器', '传说'])]},
'medal_gem_3': {'id': 5, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['普通', '高级', '稀有', '神器', '传说'])]},
'adventure': {'id': 6, 'options': [{'name': f'Lv:{i}', 'value': i} for i in range(1, 31)]},
'marriage_house': {'id': 7, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['无', '全属强(1)', '全属强(3)', '全属强(5)|三攻(5)', '全属强(8)|三攻(10|20)'])]},
'marriage_ring': {'id': 8, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['无', '体精(8)', '体精(10)|力智(15)'])]},
'contract': {'id': 9, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['无', '无色契约 三攻(40)'])]},
'collection_type': {'id': 10, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['无', '春节套', '夏日套'])]},
'collection_num_0': {'id': 11, 'options': [{'name': f'稀有{i}个', 'value': i} for i in range(0, 6)]},
'collection_num_1': {'id': 12, 'options': [{'name': f'神器{i}个', 'value': i} for i in range(0, 6)]},
'costume_card': {'id': 13, 'options': [{'name': f'{i}', 'value': idx} for idx, i in enumerate(['无', '四维(3)|三速(1%)'])]},
}
def sundry_0(char: Character, *args):
'''勋章'''
# 勋章基础 四维 48 三攻 30
char.SetStatus(四维=48, 三攻=30)
# 勋章品质
# 攻击强化 BUFF量 名望
medal_quality = [(1035, 125, 235), (2045, 249, 315), (3799, 461, 415), (5960, 724, 509), (8532, 1035, 606), (11688, 1418, 708)]
quality = medal_quality[args[0]]
char.SetStatus(攻击强化=quality[0]*0.1, 增益量=quality[1])
# 勋章强化
medal_lv = [(0, 0, 0), (390, 47, 24), (779, 95, 47), (1169, 142, 71), (1558, 189, 94), (1948, 236, 118), (2337, 284, 142), (2727, 331, 165), (3117, 378, 189), (3506, 425, 212), (3896, 473, 236), (4285, 520, 259), (4675, 567, 283)]
lv = medal_lv[args[1]]
char.SetStatus(攻击强化=lv[0]*0.1, 增益量=lv[1])
# 宝石 基础 三速 3% 所有属强 7
char.SetStatus(三速=0.03, 全属强=7)
medal_gems_quality = [(224, 27, 46), (403, 49, 58), (701, 85, 72),(1140, 138, 88), (1753, 212, 106)]
for i in args[2]:
gems_quality = medal_gems_quality[i]
char.SetStatus(攻击强化=gems_quality[0]*0.1, 增益量=gems_quality[1])
def sundry_6(char: Character, *args):
'''冒险团'''
lv = args[0] - 1
values = [100,110,125,140,150,160,170,180,190,200,210,220,220,220,220,230,230,240,240,250,250,250,250,250,260,260,260,260,260,270,270,270,270,270,280,280,280,280,280,290]
char.SetStatus(四维=values[lv])
def sundry_7(char: Character, *args):
'''
婚房婚戒
婚戒属强不享受辟邪玉加成
'''
# 婚戒
if args[0] == 1:
char.SetStatus(全属强=1)
elif args[0] == 2:
char.SetStatus(全属强=3)
elif args[0] == 3:
char.SetStatus(全属强=5, 三攻=5)
elif args[0] == 4:
char.SetStatus(全属强=8, 物攻=10, 独立=20)
# 婚房
if args[1] == 1:
char.SetStatus(体精=8)
elif args[1] == 2:
char.SetStatus(体精=10, 力智=15)
def sundry_9(char: Character, *args):
'''契约'''
if args[0] == 1:
char.SetStatus(三攻=40)
def sundry_10(char: Character, *args):
'''收集箱'''
per_0 = 0
per_1 = 0
per_2 = 0
if args[0] == 1:
per_0 = 15
per_1 = 15
per_2 = 3
elif args[0] == 2:
per_0 = 10
per_1 = 10
per_2 = 2
xy = 0
sq = 0
try:
xy = args[1]
except Exception:
pass
try:
sq = args[2]
except Exception:
pass
char.SetStatus(四维=sq*per_0, 三攻=xy*per_1)
char.AddElementDB('火',sq*per_2)
char.AddElementDB('冰',sq*per_2)
char.AddElementDB('光',sq*per_2)
char.AddElementDB('暗',sq*per_2)
def sundry_13(char: Character, *args):
if args[0] == 1:
char.SetStatus(三速=0.01,四维=3)
for i in range(0, 20):
try:
if str(i) not in sundry_func_list.keys():
sundry_func_list[str(i)] = eval(f'sundry_{i}')
except Exception:
pass
+9
View File
@@ -34,6 +34,15 @@ export interface ICharacterInfo {
suits: ISuit[]
avatar: Record<string, IAvatarInfo[]>
jades:IJade[]
sundry:Record<string, ISundry>
}
export interface ISundry {
id:number,
options:{
name:string,
value:number
}[],
}
export interface IEquipment {
@@ -0,0 +1,123 @@
<template>
<div class="flex flex-wrap equ-profile">
<div class="equ-profile-item">
<div class="row-name">勋章</div>
<calc-select
v-for="(key, index) in ['medal_rarity', 'medal_reinforce']"
:key="index"
v-model="sundryData[key as keyof typeof sundryData]"
class="flex-1 !h-20px"
>
<calc-option v-for="(item, idx) in list(key)" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
<div class="equ-profile-item">
<div class="row-name">宝石</div>
<calc-select
v-for="(key, index) in ['medal_gem_0', 'medal_gem_1', 'medal_gem_2', 'medal_gem_3']"
:key="index"
v-model="sundryData[key as keyof typeof sundryData]"
class="flex-1 !h-20px !min-w-10"
>
<calc-option v-for="(item, idx) in list(key)" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
<div class="equ-profile-item">
<div class="row-name">冒险团</div>
<calc-select v-model="sundryData['adventure']" class="flex-1 !h-20px">
<calc-option v-for="(item, idx) in list('adventure')" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
<div class="equ-profile-item">
<div class="row-name">结婚系统</div>
<calc-select
v-for="(key, index) in ['marriage_house', 'marriage_ring']"
:key="index"
v-model="sundryData[key as keyof typeof sundryData]"
class="flex-1 !h-20px !min-w-10"
>
<calc-option v-for="(item, idx) in list(key)" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
<div class="equ-profile-item">
<div class="row-name">晶体契约</div>
<calc-select v-model="sundryData['contract']" class="flex-1 !h-20px">
<calc-option v-for="(item, idx) in list('contract')" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
<div class="equ-profile-item">
<div class="row-name">收集箱</div>
<calc-select
v-for="(key, index) in ['collection_type', 'collection_num_0', 'collection_num_1']"
:key="index"
v-model="sundryData[key as keyof typeof sundryData]"
class="flex-1 !h-20px !min-w-10"
>
<calc-option v-for="(item, idx) in list(key)" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
<div class="equ-profile-item">
<div class="row-name">名称装扮</div>
<calc-select v-model="sundryData['costume_card']" class="flex-1 !h-20px !min-w-10">
<calc-option v-for="(item, idx) in list('costume_card')" :key="idx" :value="item.value">
{{ item.name }}
</calc-option>
</calc-select>
</div>
</div>
</template>
<script setup lang="ts">
import { useConfigStore, useInfoStore } from '@/stores'
const configStore = useConfigStore()
const infoStore = useInfoStore()
const currentInfo = function <T>(name: string, defaultValue?: T) {
return computed<string | number>({
get() {
return configStore.config.sundry?.[name] ?? defaultValue ?? 0
},
set(val) {
if (val == undefined) {
return
}
configStore.config.sundry[name] = val
},
})
}
const list = computed(() => {
return (key: string) => {
return infoStore.sundries[key].options
}
})
const sundryData = reactive({
medal_rarity: currentInfo('medal_rarity', 5),
medal_reinforce: currentInfo('medal_reinforce', 12),
medal_gem_0: currentInfo('medal_gem_0', 4),
medal_gem_1: currentInfo('medal_gem_1', 4),
medal_gem_2: currentInfo('medal_gem_2', 4),
medal_gem_3: currentInfo('medal_gem_3', 4),
adventure: currentInfo('adventure', 30),
marriage_house: currentInfo('marriage_house', 4),
marriage_ring: currentInfo('marriage_ring', 2),
contract: currentInfo('contract', 1),
collection_type: currentInfo('collection_type', 1),
collection_num_0: currentInfo('collection_num_0', 5),
collection_num_1: currentInfo('collection_num_1', 5),
costume_card: currentInfo('costume_card', 1),
})
</script>
@@ -11,12 +11,16 @@
<calc-collapse class="w-100%" title="辟邪玉">
<jade></jade>
</calc-collapse>
<calc-collapse class="w-100%" title="其它">
<sundry></sundry>
</calc-collapse>
</div>
</template>
<script setup lang="ts">
import equipment from './components/Equipments.vue'
import clothes from './components/Avatars.vue';
import jade from './components/Jades.vue';
import sundry from './components/Sundry.vue';
const partTab = ref(0)
</script>
@@ -48,7 +48,7 @@ const data = computed(() => {
})
const formatDamage = (skill: IResultSkill) => {
const standardSkill = props.standard?.find((a) => a.name == skill.name)
const standardSkill = props.standard?.find((a) => a.name == skill.name && a.mode == skill.mode)
if (standardSkill && standardSkill.damage > 0 && standardSkill.cd > 0) {
const damageValue = (skill.damage - standardSkill.damage) / standardSkill.damage
const damage = h(
+4 -1
View File
@@ -49,6 +49,7 @@ export interface IConfig {
option: string
}
>
sundry: Record<string, any>
}
const defaultEqusConfig = {
@@ -79,6 +80,7 @@ export const useConfigStore = defineStore('configStore', () => {
equips: {},
jades: {},
avatar: {},
sundry: {},
})
const skillCountConfig = ref<Record<string, { count: number }>>({})
@@ -99,11 +101,13 @@ export const useConfigStore = defineStore('configStore', () => {
equips: {},
jades: {},
avatar: {},
sundry: {},
}
if (!config.value?.equips) config.value.equips = {}
if (!config.value?.skills) config.value.skills = {}
if (!config.value?.jades) config.value.jades = {}
if (!config.value?.avatar) config.value.avatar = {}
if (!config.value?.sundry)config.value.sundry = {}
const part = [...infoStore.parts, '宠物'].filter((a) => !config.value?.equips.hasOwnProperty(a))
const avatarPart = infoStore.avatarParts
@@ -128,7 +132,6 @@ export const useConfigStore = defineStore('configStore', () => {
lv: infoStore.skills.find((skill) => skill.id.toString() === id)?.maxLearnLv ?? 0,
})
})
;(
['0', '1', '2', '3'].filter((key) => !Object.keys(config.value.jades).includes(key)) ?? []
).forEach((key) => {
+4 -1
View File
@@ -24,6 +24,8 @@ export const useInfoStore = defineStore('infoStore', () => {
const jades = computed(() => infos.value?.jades ?? [])
const sundries = computed(() => infos.value?.sundry ?? {})
const standardUUID = ref<string>()
const setStandard = (result?: IResult) => {
@@ -100,6 +102,7 @@ export const useInfoStore = defineStore('infoStore', () => {
avatars,
jades,
setStandard,
standard
standard,
sundries
}
})