This commit is contained in:
2025-04-02 22:54:17 +08:00
parent 5b03724adf
commit cc93acd743
18 changed files with 476 additions and 62 deletions
+39 -17
View File
@@ -124,6 +124,8 @@ class Character:
"""装备打造信息"""
equ_effect: list['EquEffect'] = []
"""装备效果列表"""
equ_options: dict[str, int] = {}
"""装备选项列表"""
EquEffectRatio = 1
"""装备效果倍率"""
@@ -152,9 +154,10 @@ class Character:
self.INT = 0
self.Spirit = 0
self.Vitality = 0
self.AtkP = 0
self.AtkM = 0
self.AtkI = 0
# 唤醒的情况下的基础数据
self.AtkP = 0 + 65
self.AtkM = 0 + 65
self.AtkI = 1116 + 65
self.PAtkP = 1.0
self.PAtkM = 1.0
self.PAtkI = 1.0
@@ -165,10 +168,10 @@ class Character:
'暗': False,
}
self.ElementDB = {
'火': 0,
'冰': 0,
'光': 0,
'暗': 0,
'火': 13,
'冰': 13,
'光': 13,
'暗': 13,
}
self.ElementR = {
'火': 0,
@@ -206,6 +209,7 @@ class Character:
self.equs = {}
self.jade_effect = Jade()
self.equ_effect = []
self.equ_options = {}
pass
# region 角色属性设置
@@ -433,12 +437,16 @@ class Character:
equInfos = get_equipment(self.equVersion)
equs = []
suits = []
stones = []
for i in equInfos.equs:
equs.append(i.__dict__)
for i in equInfos.suits:
suits.append(i.__dict__)
for i in equInfos.stones:
stones.append(i.__dict__)
info['equips'] = equs
info['suits'] = suits
info['stones'] = stones
info['enchants'] = equInfos.enchants
emblems = []
return info
@@ -504,17 +512,31 @@ class Character:
# 设置装备和获取对应的套装属性
for item in filter(lambda x: x.equInfo is not None, self.charEquipInfo.values()):
partEqu = item.equInfo
partFusion = item.fusionInfo
# 套装属性设置
for suit in partEqu.suit:
if suitInfo.get(suit, None) is None:
suitInfo[suit] = {
'point': 0,
'count': 0,
}
if partEqu.Point == 0:
suitInfo[suit]['count'] += 1
else:
suitInfo[suit]['point'] += partEqu.Point
if partEqu is not None:
for suit in partEqu.suit:
if suitInfo.get(suit, None) is None:
suitInfo[suit] = {
'point': 0,
'count': 0,
}
if partEqu.Point == 0:
suitInfo[suit]['count'] += 1
else:
suitInfo[suit]['point'] += partEqu.Point
if partFusion is not None:
for suit in partFusion.suit:
if suitInfo.get(suit, None) is None:
suitInfo[suit] = {
'point': 0,
'count': 0,
}
if partFusion.Point == 0:
suitInfo[suit]['count'] += 1
else:
suitInfo[suit]['point'] += partFusion.Point
print(suitInfo)
# 取得点数最高的套装
max_point_suit = max((suit for suit in suitInfo if suitInfo[suit]['point'] > 0), key=lambda suit: suitInfo[suit]['point'], default=None)
# 处理没有点数的老套装
+26 -1
View File
@@ -1,5 +1,5 @@
import importlib
from database.models import Session, EquData, SuitData, EnchantData
from database.models import Session, EquData, StoneData, SuitData, EnchantData
from database.connect import get_db_engine as get_engine
from functools import cache
@@ -70,14 +70,17 @@ class Equipments:
self.version = version
self.engine = get_engine(version)
self.equs: list[Equ] = []
self.stones: list[Equ] = []
self.funs = self.init_func()
self.equ_dict: dict[str, Equ] = {}
self.stone_dict: dict[str, Equ] = {}
self.enchants = []
self.suits: list[Suit] = []
self.suit_dict: dict[str, Suit] = {}
self.init_equs()
self.init_suits()
self.init_enchants()
self.init_stones()
self.engine.dispose()
def init_equs(self):
@@ -102,6 +105,28 @@ class Equipments:
self.equs.append(equ)
self.equ_dict[equ.id] = equ
def init_stones(self):
"""从数据库中获取所有装备信息"""
with Session(self.engine) as session:
db_list = session.query(StoneData).all()
keys = [key for key in StoneData.__dict__.keys() if key[0].isupper()] + ['suit']
for item in db_list:
max_adaptation = 0
item.id = str(item.id)
for attr in keys:
if attr == 'suit':
value = parse_to_number_list(getattr(item, attr), [])
value = [str(int(i)) for i in value]
else:
value = parse_to_number_list(getattr(item, attr))
max_adaptation = max(max_adaptation, len(value) - 1)
setattr(item, attr, value)
stone_dict = {k: v for k, v in item.__dict__.items() if not k.startswith('_')}
stone_dict['max_adaptation'] = max_adaptation
stone = Equ(**stone_dict)
self.stones.append(stone)
self.stone_dict[stone.id] = stone
def init_suits(self):
"""从数据库中获取所有套装信息"""
with Session(self.engine) as session:
+7
View File
@@ -29,14 +29,21 @@ class CharacterEquipInfo:
"""装备信息"""
fusionInfo: Union['Equ', None]
"""贴膜信息"""
fusionInfo: Union['Equ', None]
"""贴膜信息"""
def __init__(self, info={}, equVerison=0, part='') -> None:
self.__dict__.update(info)
equ = get_equipment(equVerison).equ_dict.get(self.id, None)
fusion = get_equipment(equVerison).stone_dict.get(self.fusion, None)
if equ is not None and (equ.itemType == part or equ.itemDetailType == part):
self.equInfo = equ.adapt(self.adaptation)
else:
self.equInfo = None
if fusion is not None and (fusion.itemType == part or fusion.itemDetailType == part):
self.fusionInfo = fusion.adapt(self.adaptation)
else:
self.fusionInfo = None
class CharacterWeaponInfo(CharacterEquipInfo):
+5 -4
View File
@@ -3,7 +3,8 @@ from .jade import jade_func_list
from .equ import equ_func_list
options = [
{'id': 1, 'name': '龙战八荒,', 'options': ['BUFF OFF', 'BUFF ON', '期望']},
{'id': 2, 'name': '混沌净化', 'options': ['净化', '堕落']},
]
{'id': 1, 'name': '龙战八荒,', 'options': ['BUFF OFF', 'BUFF ON', '期望']},
{'id': 2, 'name': '混沌净化', 'options': ['净化', '堕落']},
{'id': 3, 'name': '群猎美学', 'options': ['单刷', '组队']},
{'id': 4, 'name': '魔攻核', 'options': ['普通', '追击']},
]
+120 -3
View File
@@ -2380,8 +2380,9 @@ def suit_142(char: Character):
char.SetSkillRation(100,100,0.6)
char.SetSkillRation(85,85,0.5)
char.SetSkillRation(50,50,0.1)
cd = 0
for item in char.skills:
if item.lv == 100:
if item.learnLv == 100:
cd = item.getSkillCD()
char.equ_effect.append(EquEffect(name='能量释放', icon='/equipment/suit/4.png', cd=cd, data=240000))
pass
@@ -2507,8 +2508,9 @@ def suit_147(char: Character):
char.SetSkillRation(100,100,0.76)
char.SetSkillRation(85,85,0.6)
char.SetSkillRation(50,50,0.15)
cd = 0
for item in char.skills:
if item.lv == 100:
if item.learnLv == 100:
cd = item.getSkillCD()
char.equ_effect.append(EquEffect(name='能量释放', icon='/equipment/suit/4.png', cd=cd, data=360000))
pass
@@ -2568,6 +2570,7 @@ def suit_154(char: Character):
攻击时引发自然爆炸攻击敌人。 (冷却时间5秒)
- 自然燃烧伤害8,640%
"""
char.equ_effect.append(EquEffect(name='自燃爆炸', icon='/equipment/suit/6.png', cd=5, data=8640))
pass
@@ -2577,6 +2580,7 @@ def suit_155(char: Character):
攻击时引发自然爆炸攻击敌人。 (冷却时间5秒)
- 自然燃烧伤害8,640%
"""
suit_154(char)
pass
@@ -2586,6 +2590,7 @@ def suit_156(char: Character):
攻击时引发自然爆炸攻击敌人。 (冷却时间5秒)
- 自然燃烧伤害8,640%
"""
suit_154(char)
pass
@@ -2595,6 +2600,7 @@ def suit_157(char: Character):
攻击时引发自然爆炸攻击敌人。 (冷却时间5秒)
- 自然燃烧伤害8,640%
"""
suit_154(char)
pass
@@ -2604,6 +2610,7 @@ def suit_158(char: Character):
攻击时产生小型旋风, 攻击小范围的敌人, 并吸附敌人。 (冷却时间5秒)
- 小型旋风伤害25920%
"""
char.equ_effect.append(EquEffect(name='小型旋风', icon='/equipment/suit/6.png', cd=5, data=25920))
pass
@@ -2613,6 +2620,7 @@ def suit_159(char: Character):
攻击时产生小型旋风, 攻击小范围的敌人, 并吸附敌人。 (冷却时间5秒)
- 小型旋风伤害25920%
"""
suit_158(char)
pass
@@ -2622,6 +2630,7 @@ def suit_160(char: Character):
攻击时产生小型旋风, 攻击小范围的敌人, 并吸附敌人。 (冷却时间5秒)
- 小型旋风伤害25920%
"""
suit_158(char)
pass
@@ -2631,6 +2640,7 @@ def suit_161(char: Character):
攻击时产生小型旋风, 攻击小范围的敌人, 并吸附敌人。 (冷却时间5秒)
- 小型旋风伤害25920%
"""
suit_158(char)
pass
@@ -2640,6 +2650,7 @@ def suit_162(char: Character):
攻击时产生小型旋风, 攻击小范围的敌人, 并吸附敌人。 (冷却时间5秒)
- 小型旋风伤害25920%
"""
suit_158(char)
pass
@@ -2649,6 +2660,7 @@ def suit_163(char: Character):
攻击时引发落雷, 攻击大范围敌人。 (冷却时间5秒)
- 落雷伤害43,200%
"""
char.equ_effect.append(EquEffect(name='落雷', icon='/equipment/suit/6.png', cd=5, data=43200))
pass
@@ -2658,6 +2670,7 @@ def suit_164(char: Character):
攻击时引发落雷, 攻击大范围敌人。 (冷却时间5秒)
- 落雷伤害43,200%
"""
suit_163(char)
pass
@@ -2667,6 +2680,7 @@ def suit_165(char: Character):
攻击时引发落雷, 攻击大范围敌人。 (冷却时间5秒)
- 落雷伤害43,200%
"""
suit_163(char)
pass
@@ -2676,6 +2690,7 @@ def suit_166(char: Character):
攻击时引发落雷, 攻击大范围敌人。 (冷却时间5秒)
- 落雷伤害43,200%
"""
suit_163(char)
pass
@@ -2685,6 +2700,7 @@ def suit_167(char: Character):
攻击时引发落雷, 攻击大范围敌人。 (冷却时间5秒)
- 落雷伤害43,200%
"""
suit_163(char)
pass
@@ -2696,6 +2712,8 @@ def suit_168(char: Character):
- 狂澜怒涛伤害量104,400%
- 冷却时间:60秒
"""
char.equ_effect.append(EquEffect(name='狂澜怒涛', icon='/equipment/skill/54.png', cd=60, data=104400))
char.equ_effect.append(EquEffect(name='暴风雪', icon='/equipment/suit/6.png', cd=5, data=60480))
pass
@@ -2747,6 +2765,7 @@ def suit_174(char: Character):
- 正面突破伤害 : 6,360%
- 冷却时间8秒
"""
char.equ_effect.append(EquEffect(name='突破', icon='/equipment/skill/0.png', cd=8, data=6360))
pass
@@ -2759,6 +2778,7 @@ def suit_175(char: Character):
- 正面突破伤害 : 6,360%
- 冷却时间9秒
"""
suit_174(char)
pass
@@ -2771,6 +2791,7 @@ def suit_176(char: Character):
- 正面突破伤害 : 6,360%
- 冷却时间10秒
"""
suit_174(char)
pass
@@ -2783,6 +2804,7 @@ def suit_177(char: Character):
- 正面突破伤害 : 6,360%
- 冷却时间11秒
"""
suit_174(char)
pass
@@ -2795,6 +2817,7 @@ def suit_178(char: Character):
- 正面突破伤害 : 6,360%
- 冷却时间12秒
"""
suit_174(char)
pass
@@ -2812,6 +2835,8 @@ def suit_179(char: Character):
- 审判伤害 : 9,300%
- 冷却时间15秒
"""
char.equ_effect.append(EquEffect(name='突破', icon='/equipment/skill/0.png', cd=8, data=6360))
char.equ_effect.append(EquEffect(name='审判', icon='/equipment/skill/1.png', cd=15, data=9300))
pass
@@ -2829,6 +2854,7 @@ def suit_180(char: Character):
- 审判伤害 : 9,300%
- 冷却时间16秒
"""
suit_179(char)
pass
@@ -2846,6 +2872,7 @@ def suit_181(char: Character):
- 审判伤害 : 9,300%
- 冷却时间17秒
"""
suit_179(char)
pass
@@ -2863,6 +2890,7 @@ def suit_182(char: Character):
- 审判伤害 : 9,300%
- 冷却时间18秒
"""
suit_179(char)
pass
@@ -2880,6 +2908,7 @@ def suit_183(char: Character):
- 审判伤害 : 9,300%
- 冷却时间19秒
"""
suit_179(char)
pass
@@ -2904,6 +2933,9 @@ def suit_184(char: Character):
召唤女武神, 对四周敌人施以天罚。
- 天罚伤害 : 136800%
"""
char.equ_effect.append(EquEffect(name='突破', icon='/equipment/skill/0.png', cd=8, data=6360))
char.equ_effect.append(EquEffect(name='审判', icon='/equipment/skill/1.png', cd=15, data=9300))
char.equ_effect.append(EquEffect(name='天罚', icon='/equipment/suit/7.png', cd=20, data=136800))
pass
@@ -2928,6 +2960,7 @@ def suit_185(char: Character):
召唤女武神, 对四周敌人施以天罚。
- 天罚伤害 : 136800%
"""
suit_184(char)
pass
@@ -2952,9 +2985,9 @@ def suit_186(char: Character):
召唤女武神, 对四周敌人施以天罚。
- 天罚伤害 : 136800%
"""
suit_184(char)
pass
def suit_187(char: Character):
"""
借用女武神的一部分神秘力量。
@@ -2976,6 +3009,7 @@ def suit_187(char: Character):
召唤女武神, 对四周敌人施以天罚。
- 天罚伤害 : 136800%
"""
suit_184(char)
pass
@@ -3000,6 +3034,7 @@ def suit_188(char: Character):
召唤女武神, 对四周敌人施以天罚。
- 天罚伤害 : 136800%
"""
suit_184(char)
pass
@@ -3028,6 +3063,10 @@ def suit_189(char: Character):
召唤女武神, 对四周敌人施以天罚。
- 天罚伤害 : 136800%
"""
char.equ_effect.append(EquEffect(name='突破', icon='/equipment/skill/0.png', cd=8, data=6360))
char.equ_effect.append(EquEffect(name='审判', icon='/equipment/skill/1.png', cd=15, data=9300))
char.equ_effect.append(EquEffect(name='降临', icon='/equipment/skill/3.png', cd=140, data=329400))
char.equ_effect.append(EquEffect(name='天罚', icon='/equipment/suit/7.png', cd=20, data=136800))
pass
@@ -3083,6 +3122,7 @@ def suit_195(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
char.SetStatus(SkillAttack=0.1)
pass
@@ -3099,6 +3139,7 @@ def suit_196(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_195(char)
pass
@@ -3115,6 +3156,7 @@ def suit_197(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_195(char)
pass
@@ -3131,6 +3173,7 @@ def suit_198(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_195(char)
pass
@@ -3147,6 +3190,7 @@ def suit_199(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_195(char)
pass
@@ -3164,6 +3208,7 @@ def suit_200(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
char.SetStatus(SkillAttack=0.2)
pass
@@ -3181,6 +3226,7 @@ def suit_201(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_200(char)
pass
@@ -3198,6 +3244,7 @@ def suit_202(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_200(char)
pass
@@ -3215,6 +3262,7 @@ def suit_203(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_200(char)
pass
@@ -3232,6 +3280,7 @@ def suit_204(char: Character):
- 增益效果持续时间30秒
- 冷却时间30秒
"""
suit_200(char)
pass
@@ -3251,6 +3300,7 @@ def suit_205(char: Character):
[青丘灵珠开关][装备主动技能]- 灵珠全部填满时,自动使用青丘灵珠增益效果(冷却时间1秒)
- 再次使用时,关闭自动使用功能
"""
char.SetStatus(SkillAttack=0.3)
pass
@@ -3270,6 +3320,7 @@ def suit_206(char: Character):
[青丘灵珠开关][装备主动技能]- 灵珠全部填满时,自动使用青丘灵珠增益效果(冷却时间1秒)
- 再次使用时,关闭自动使用功能
"""
suit_205(char)
pass
@@ -3289,6 +3340,7 @@ def suit_207(char: Character):
[青丘灵珠开关][装备主动技能]- 灵珠全部填满时,自动使用青丘灵珠增益效果(冷却时间1秒)
- 再次使用时,关闭自动使用功能
"""
suit_205(char)
pass
@@ -3308,6 +3360,7 @@ def suit_208(char: Character):
[青丘灵珠开关][装备主动技能]- 灵珠全部填满时,自动使用青丘灵珠增益效果(冷却时间1秒)
- 再次使用时,关闭自动使用功能
"""
suit_205(char)
pass
@@ -3346,6 +3399,7 @@ def suit_210(char: Character):
[青丘灵珠开关][装备主动技能]- 灵珠全部填满时,自动使用青丘灵珠增益效果(冷却时间1秒)
- 再次使用时,关闭自动使用功能
"""
char.SetStatus(SkillAttack=0.3)
pass
@@ -3409,6 +3463,11 @@ def suit_216(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
if char.equ_options.get('3',0) == 0:
char.SetStatus(SkillAttack=0.106)
else:
char.SetStatus(SkillAttack=0.08,SpeedA=0.1,SpeedM=0.1,SpeedR=0.1)
char.equ_effect.append(EquEffect(name='酣畅狩猎', icon='/equipment/skill/15.png', cd=30, data=3825))
pass
@@ -3433,6 +3492,7 @@ def suit_217(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_216(char)
pass
@@ -3457,6 +3517,7 @@ def suit_218(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_216(char)
pass
@@ -3481,6 +3542,7 @@ def suit_219(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_216(char)
pass
@@ -3505,6 +3567,7 @@ def suit_220(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_216(char)
pass
@@ -3528,6 +3591,11 @@ def suit_221(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
if char.equ_options.get('3',0) == 0:
char.SetStatus(SkillAttack=0.178)
else:
char.SetStatus(SkillAttack=0.08,SpeedA=0.15,SpeedM=0.15,SpeedR=0.15)
char.equ_effect.append(EquEffect(name='酣畅狩猎', icon='/equipment/skill/15.png', cd=30, data=5738))
pass
@@ -3551,6 +3619,7 @@ def suit_222(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_221(char)
pass
@@ -3574,6 +3643,7 @@ def suit_223(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_221(char)
pass
@@ -3597,6 +3667,7 @@ def suit_224(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_221(char)
pass
@@ -3620,6 +3691,7 @@ def suit_225(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_221(char)
pass
@@ -3645,6 +3717,11 @@ def suit_226(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
if char.equ_options.get('3',0) == 0:
char.SetStatus(SkillAttack=0.178)
else:
char.SetStatus(SkillAttack=0.08,SpeedA=0.2,SpeedM=0.0,SpeedR=0.0)
char.equ_effect.append(EquEffect(name='酣畅狩猎', icon='/equipment/skill/15.png', cd=30, data=6750))
pass
@@ -3670,6 +3747,7 @@ def suit_227(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_226(char)
pass
@@ -3695,6 +3773,7 @@ def suit_228(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_226(char)
pass
@@ -3720,6 +3799,7 @@ def suit_229(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_226(char)
pass
@@ -3745,6 +3825,7 @@ def suit_230(char: Character):
- 适用[群猎之力]效果
- 不适用[酣畅狩猎]效果
"""
suit_226(char)
pass
@@ -3769,6 +3850,11 @@ def suit_231(char: Character):
- 技能伤害 +21.6%
- 适用[群猎之力]效果
"""
if char.equ_options.get('3',0) == 0:
char.SetStatus(SkillAttack=0.216)
else:
char.SetStatus(SkillAttack=0.08,SpeedA=0.3,SpeedM=0.3,SpeedR=0.3)
char.equ_effect.append(EquEffect(name='酣畅狩猎', icon='/equipment/skill/15.png', cd=30, data=9563))
pass
@@ -3828,6 +3914,10 @@ def suit_237(char: Character):
- 魔力波动伤害量:13.714%
- 魔力波动范围:150px
"""
if char.equ_options.get('4',0) == 0:
char.equ_effect.append(EquEffect(name='普通模式', icon='/equipment/skill/57.png', cd=1, data=19200))
else:
char.equ_effect.append(EquEffect(name='追击模式', icon='/equipment/skill/57.png', cd=1, data=13714))
pass
@@ -3848,6 +3938,7 @@ def suit_238(char: Character):
- 魔力波动伤害量:13.714%
- 魔力波动范围:150px
"""
suit_237(char)
pass
@@ -3868,6 +3959,7 @@ def suit_239(char: Character):
- 魔力波动伤害量:13.714%
- 魔力波动范围:150px
"""
suit_237(char)
pass
@@ -3888,6 +3980,7 @@ def suit_240(char: Character):
- 魔力波动伤害量:13.714%
- 魔力波动范围:150px
"""
suit_237(char)
pass
@@ -3908,6 +4001,7 @@ def suit_241(char: Character):
- 魔力波动伤害量:13.714%
- 魔力波动范围:150px
"""
suit_237(char)
pass
@@ -3930,6 +4024,11 @@ def suit_242(char: Character):
- 魔力波动伤害量:20,571%
- 魔力波动范围:150px
"""
if char.equ_options.get('4',0) == 0:
char.equ_effect.append(EquEffect(name='普通模式', icon='/equipment/skill/57.png', cd=1, data=31680))
char.SetStatus(SpeedM=0.25)
else:
char.equ_effect.append(EquEffect(name='追击模式', icon='/equipment/skill/57.png', cd=1, data=20571))
pass
@@ -3952,6 +4051,7 @@ def suit_243(char: Character):
- 魔力波动伤害量:20,571%
- 魔力波动范围:150px
"""
suit_242(char)
pass
@@ -3974,6 +4074,7 @@ def suit_244(char: Character):
- 魔力波动伤害量:20,571%
- 魔力波动范围:150px
"""
suit_242(char)
pass
@@ -3996,6 +4097,7 @@ def suit_245(char: Character):
- 魔力波动伤害量:20,571%
- 魔力波动范围:150px
"""
suit_242(char)
pass
@@ -4018,6 +4120,7 @@ def suit_246(char: Character):
- 魔力波动伤害量:20,571%
- 魔力波动范围:150px
"""
suit_242(char)
pass
@@ -4040,6 +4143,11 @@ def suit_247(char: Character):
- 魔力波动伤害量:30,857%
- 魔力波动范围:200px
"""
if char.equ_options.get('4',0) == 0:
char.equ_effect.append(EquEffect(name='普通模式', icon='/equipment/skill/57.png', cd=1, data=47520))
char.SetStatus(SpeedM=0.25)
else:
char.equ_effect.append(EquEffect(name='追击模式', icon='/equipment/skill/57.png', cd=1, data=30857))
pass
@@ -4062,6 +4170,7 @@ def suit_248(char: Character):
- 魔力波动伤害量:30,857%
- 魔力波动范围:200px
"""
suit_247(char)
pass
@@ -4084,6 +4193,7 @@ def suit_249(char: Character):
- 魔力波动伤害量:30,857%
- 魔力波动范围:200px
"""
suit_247(char)
pass
@@ -4106,6 +4216,7 @@ def suit_250(char: Character):
- 魔力波动伤害量:30,857%
- 魔力波动范围:200px
"""
suit_247(char)
pass
@@ -4128,6 +4239,7 @@ def suit_251(char: Character):
- 魔力波动伤害量:30,857%
- 魔力波动范围:200px
"""
suit_247(char)
pass
@@ -4151,6 +4263,11 @@ def suit_252(char: Character):
- 魔力波动伤害量 :39,428%
- 魔力波动范围:200px
"""
if char.equ_options.get('4',0) == 0:
char.equ_effect.append(EquEffect(name='普通模式', icon='/equipment/skill/57.png', cd=1, data=60720))
char.SetStatus(SpeedM=0.25)
else:
char.equ_effect.append(EquEffect(name='追击模式', icon='/equipment/skill/57.png', cd=1, data=39428))
pass
Binary file not shown.
+30
View File
@@ -56,6 +56,36 @@ class EquData(Base):
Buffer = Column(Text)
suit = Column(Text)
class StoneData(Base):
"""
装备属性映射
首字母大写的属性为调适可能会影响到的属性
"""
__tablename__ = 'stone'
id = Column(Integer, primary_key=True)
name = Column(Text)
rarity = Column(Text)
itemType = Column(Text)
itemDetailType = Column(Text)
Point = Column(Text)
categorize = Column(Text)
imageUrl = Column(Text)
detail = Column(Text)
bufferDetail = Column(Text)
STR = Column(Text)
INT = Column(Text)
Vitality = Column(Text)
Spirit = Column(Text)
AtkP = Column(Text)
AtkM = Column(Text)
AtkI = Column(Text)
SkillAttack = Column(Text)
Attack = Column(Text)
Buffer = Column(Text)
suit = Column(Text)
class EnchantData(Base):
__tablename__ = 'enchant'
+1
View File
@@ -26,6 +26,7 @@ export interface ICharacterInfo {
name: string
equVersion: string
equips: IEquipment[]
stones: IEquipment[]
enchants: IEnchantingInfo[]
emblems: IEnchantingInfo[]
weapons: string[]
@@ -1,13 +1,25 @@
<template>
<div class="flex flex-col mx-10px">
<calc-collapse title="武器">
<calc-collapse title="武器/称号/宠物">
<Weapon></Weapon>
</calc-collapse>
<calc-collapse title="套装">
<Suit></Suit>
<calc-collapse title="套装/通宝">
<calc-tabs v-model="equTab" class="!mb-2">
<calc-tab :value="0">套装</calc-tab>
<calc-tab :value="1">通宝</calc-tab>
</calc-tabs>
<Suit v-show="equTab === 0"></Suit>
<Universal v-show="equTab === 1"></Universal>
</calc-collapse>
<calc-collapse title="通宝">
<Universal></Universal>
<calc-collapse title="融合石">
<calc-tabs v-model="stoneTab" class="!mb-2">
<calc-tab :value="0">套装</calc-tab>
<calc-tab :value="1">通宝</calc-tab>
<calc-tab :value="2">其他</calc-tab>
</calc-tabs>
<Stone v-show="stoneTab == 0"></Stone>
<StoneUniversal v-show="stoneTab == 1"></StoneUniversal>
<StoneOld v-show="stoneTab == 2"></StoneOld>
</calc-collapse>
</div>
</template>
@@ -17,10 +29,16 @@ import { useInfoStore } from '@/stores/info'
import { getImageURL } from '@/utils/images'
import Suit from './components/Suit.vue'
import Weapon from './components/Weapon.vue'
import Stone from './components/Stone.vue'
import Universal from './components/Universal.vue'
import StoneUniversal from './components/StoneUniversal.vue'
import StoneOld from './components/StoneOld.vue'
import { useConfigStore } from '@/stores'
const props = defineProps<{
alter: string
}>()
const equTab = ref(0)
const stoneTab = ref(0)
</script>
@@ -0,0 +1,93 @@
<!-- 每排总计6+4+4,共计14个排列 -->
<template>
<div>
<div class="flex flex-col gap-10px pb-10px">
<!-- 套装选择tab -->
<div class="flex flex-wrap w-100%">
<template v-for="(suit, _) in suits" :key="_">
<div class="flex items-center justify-center">
<img
class="w-35px h-35px object-contain"
:src="getImageURL('equipment' + suit.imageUrl)"
:alt="suit.name"
:style="{ filter: curSuit === suit.value ? '' : 'grayscale(100%)' }"
@click="curSuit = suit.value"
@dblclick="handleDoubleClick"
/>
</div>
</template>
</div>
<EquipmentRaritySelect v-model="curRarity" />
</div>
<div class="flex flex-wrap gap-4px content-start" :style="{width: `${rowCount * 32}px`}">
<template v-for="(equip,_) in suitEquipments" :key="_">
<template v-if="equip?.rarity == curRarity || !curRarity">
<EquipmentIcon :equipment="equip" :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.fusion != equip?.id" @click="configStore.chooseEqu(equip,true)"/>
</template>
<template v-else>
<EquipmentIcon/>
</template>
</template>
</div>
</div>
</template>
<script lang="ts" setup>
import type { IEquipment } from '@/api/info/type'
import { useConfigStore, useInfoStore } from '@/stores'
import { getImageURL } from '@/utils/images'
import EquipmentIcon from '@/components/dnf/Equipment/Icon/index.vue'
import EquipmentRaritySelect from '@/components/dnf/Equipment/RaritySelect/index.vue'
const infoStore = useInfoStore()
const configStore = useConfigStore()
const curSuit = ref(16201)
const curRarity = ref()
const props = defineProps<{
rowCount?:number
}>()
const rowCount = Math.max(props.rowCount ?? 0, 14)
const suits = computed(() => {
const uniqueSuits = new Map<number, { name: string; value: number; imageUrl: string }>()
infoStore.suits.forEach((a) => {
if (!uniqueSuits.has(a.suitId)) {
uniqueSuits.set(a.suitId, { name: a.name, value: a.suitId, imageUrl: a.imageUrl })
}
})
return Array.from(uniqueSuits.values())
})
const suitEquipments = computed(() => {
const equs = infoStore.stones.filter((a) => a.suit.includes(curSuit.value.toString()) && a.suit.length === 1 )
const res: (IEquipment | undefined)[] = []
const raritiyList = ['神器','传说','史诗']
raritiyList.forEach((rarity) => {
const equ : (IEquipment | undefined)[] = equs.filter((a) => a.rarity === rarity)
equ.splice(5,0,undefined)
equ.splice(9,0,undefined)
res.push(
...equ,
...Array(Math.max(0,rowCount - equ.length)).fill(undefined),
)
})
return res
})
const handleDoubleClick = () => {
if(!curRarity.value) return
if(curRarity.value == '太初') return
suitEquipments.value.filter(a=>!!a && a.rarity == curRarity.value).splice(0,11).forEach((a) => {
configStore.chooseEqu(a,true)
})
}
</script>
@@ -0,0 +1,58 @@
`<!-- 每排总计6+4+4,共计14个排列 -->
<template>
<div class="flex flex-wrap gap-4px content-start" :style="{width: `${rowCount * 32}px`}">
<template v-for="(equip,_) in equs" :key="_">
<EquipmentIcon :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.fusion != equip?.id" :equipment="equip" @click="configStore.chooseEqu(equip,true)" />
</template>
</div>
</template>
<script lang="ts" setup StoneUniversal>
import type { IEquipment } from '@/api/info/type'
import { useConfigStore, useInfoStore } from '@/stores'
import { getImageURL } from '@/utils/images'
import EquipmentIcon from '@/components/dnf/Equipment/Icon/index.vue'
const props = defineProps<{
rowCount ?:number
}>()
const rowCount = Math.max(props.rowCount ?? 0, 14)
const infoStore = useInfoStore()
const configStore = useConfigStore()
const equs = computed(() => {
const items = infoStore.stones.filter(
(equip) => equip.categorize.includes('神界'),
)
const res: (IEquipment | undefined)[] = []
res.push(
...items.filter((a) => a.rarity === '太初'),
...Array(Math.max(0,rowCount - items.filter((a) => a.rarity === '太初').length)).fill(undefined),
);
['手镯','项链','戒指','','辅助装备','魔法石','耳环',''].forEach((cat) => {
const equ: (IEquipment | undefined)[] = items.filter((a) => a.rarity === '史诗' && a.itemDetailType == cat)
res.push(
...equ,
...Array(Math.max(0, 7 - equ.length)).fill(undefined),
)
})
// const categorize = Array.from(new Set(items.map((item) => item.categorize)))
// raritiyList.forEach((rarity) => {
// categorize.forEach((cat) => {
// const equ : (IEquipment | undefined)[] = items.filter((a) => a.rarity === rarity && a.categorize === cat)
// equ.splice(5,0,undefined)
// res.push(
// ...equ,
// ...Array(Math.max(0,rowCount - equ.length)).fill(undefined),
// )
// })
// })
return res
})
</script>
`
@@ -0,0 +1,44 @@
<!-- 每排总计6+4+4,共计14个排列 -->
<template>
<div class="flex flex-wrap gap-4px content-start" :style="{width: `${rowCount * 32}px`}">
<template v-for="(equip,_) in equs" :key="_">
<EquipmentIcon :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.fusion != equip?.id" :equipment="equip" @click="configStore.chooseEqu(equip,true)" />
</template>
</div>
</template>
<script lang="ts" setup StoneUniversal>
import type { IEquipment } from '@/api/info/type'
import { useConfigStore, useInfoStore } from '@/stores'
import { getImageURL } from '@/utils/images'
import EquipmentIcon from '@/components/dnf/Equipment/Icon/index.vue'
const props = defineProps<{
rowCount ?:number
}>()
const rowCount = Math.max(props.rowCount ?? 0, 14)
const infoStore = useInfoStore()
const configStore = useConfigStore()
const equs = computed(() => {
const items = infoStore.stones.filter(
(equip) => equip.categorize.includes('通宝'),
)
const res: (IEquipment | undefined)[] = []
const raritiyList = ['神器','史诗']
const categorize = Array.from(new Set(items.map((item) => item.categorize)))
raritiyList.forEach((rarity) => {
categorize.forEach((cat) => {
const equ : (IEquipment | undefined)[] = items.filter((a) => a.rarity === rarity && a.categorize === cat)
equ.splice(5,0,undefined)
res.push(
...equ,
...Array(Math.max(0,rowCount - equ.length)).fill(undefined),
)
})
})
return res
})
</script>
@@ -24,7 +24,7 @@
<div class="flex flex-wrap gap-4px content-start" :style="{width: `${rowCount * 32}px`}">
<template v-for="(equip,_) in suitEquipments" :key="_">
<template v-if="equip?.rarity == curRarity || !curRarity">
<EquipmentIcon :equipment="equip" :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.id != equip?.id" @click="chooseEqu(equip)"/>
<EquipmentIcon :equipment="equip" :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.id != equip?.id" @click="configStore.chooseEqu(equip)"/>
</template>
<template v-else>
@@ -82,19 +82,11 @@ const suitEquipments = computed(() => {
return res
})
const chooseEqu = async(equip: IEquipment | undefined) => {
if (equip && configStore.config.equips[equip.itemDetailType]) {
configStore.config.equips[equip.itemDetailType].id = equip.id
}
// await configStore.calc()
}
const handleDoubleClick = () => {
if(!curRarity.value) return
if(curRarity.value == '太初') return
suitEquipments.value.filter(a=>!!a && a.rarity == curRarity.value).splice(0,11).forEach((a) => {
chooseEqu(a)
configStore.chooseEqu(a)
})
}
@@ -3,7 +3,7 @@
<template>
<div class="flex flex-wrap gap-4px content-start" :style="{width: `${rowCount * 32}px`}">
<template v-for="(equip,_) in equs" :key="_">
<EquipmentIcon :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.id != equip?.id" :equipment="equip" @click="chooseEqu(equip)" />
<EquipmentIcon :inactive="configStore.config.equips[equip?.itemDetailType ?? '']?.id != equip?.id" :equipment="equip" @click="configStore.chooseEqu(equip)" />
</template>
</div>
</template>
@@ -39,10 +39,4 @@ const equs = computed(() => {
})
return res
})
const chooseEqu = async(equip: IEquipment | undefined) => {
if (equip && configStore.config.equips[equip.itemDetailType]) {
configStore.config.equips[equip.itemDetailType].id = equip.id
}
}
</script>
@@ -3,7 +3,7 @@
<template>
<div class="flex flex-wrap gap-4px content-start" :style="{ width: `${rowCount * 32}px` }">
<template v-for="(weapon, _) in weapons" :key="_">
<EquipmentIcon :equipment="weapon" :inactive="configStore.config.equips['武器']?.id != weapon?.id" @click="chooseWeapon(weapon)"/>
<EquipmentIcon :equipment="weapon" :inactive="configStore.config.equips['武器']?.id != weapon?.id" @click="configStore.chooseEqu(weapon)"/>
</template>
</div>
</template>
@@ -40,10 +40,4 @@ const weapons = computed(() => {
return res
})
const chooseWeapon = (weapon: IEquipment | undefined) => {
if (weapon) {
configStore.config.equips['武器'].id = weapon.id
}
console.log(configStore.config)
}
</script>
@@ -80,7 +80,7 @@ export default defineComponent({
)
}
}
if (['reinforce_type', 'reinforce'].includes(name)) {
if (['reinforceType', 'reinforce','adaptation'].includes(name)) {
parts = basicInfoStore.parts.filter((e) => !['称号', '宠物'].includes(e))
}
} else {
@@ -105,7 +105,7 @@ export default defineComponent({
const emblem_1 = currentInfo<string | number>('emblem_1')
// 增幅
const reinforce_type = currentInfo<string | number>('reinforce_type', 1)
const reinforce_type = currentInfo<string | number>('reinforceType', 1)
// 增幅数值
const reinforce = currentInfo<string | number>('reinforce')
@@ -150,8 +150,8 @@ export default defineComponent({
<div class="equ-profile-item">
<div class="row-name">增幅</div>
<calc-select v-model={reinforce_type.value} class="flex-1 !h-20px">
<calc-option value={0}>增幅</calc-option>
<calc-option value={1}>强化</calc-option>
<calc-option value={0}>强化</calc-option>
<calc-option value={1}>增幅</calc-option>
</calc-select>
<calc-select v-model={reinforce.value} class="flex-1 !h-20px">
{renderList(31, (i) => (
+16 -1
View File
@@ -1,6 +1,7 @@
import { defineStore } from 'pinia'
import { useInfoStore } from './info'
import api from '@/api'
import type { IEquipment } from '@/api/info/type'
// | '上衣'
// | '头肩'
// | '下装'
@@ -27,6 +28,7 @@ export interface IConfig {
upgrade: number
refine: number
adaptation: number
fusion: string
}
>
jades: Record<string, number>
@@ -42,6 +44,7 @@ const defaultEqusConfig = {
upgrade: 0,
refine: 0,
adaptation: 0,
fusion: '',
}
export const useConfigStore = defineStore('configStore', () => {
@@ -102,6 +105,17 @@ export const useConfigStore = defineStore('configStore', () => {
return await api.calc(config.value)
}
const chooseEqu = async(equip: IEquipment | undefined,isFusion:boolean = false) => {
if (equip && config.value.equips[equip.itemDetailType]) {
const key = isFusion ? 'fusion' : 'id'
if (config.value.equips[equip.itemDetailType][key] == equip.id) {
config.value.equips[equip.itemDetailType][key] = ""
} else {
config.value.equips[equip.itemDetailType][key] = equip.id
}
}
}
const result = useAsyncState(
() => {
@@ -119,6 +133,7 @@ export const useConfigStore = defineStore('configStore', () => {
loadConfig,
saveConfig,
calc,
result
result,
chooseEqu
}
})
+3
View File
@@ -16,6 +16,8 @@ export const useInfoStore = defineStore('infoStore', () => {
const emblems = computed(() => infos.value?.emblems ?? [])
const stones = computed(() => infos.value?.stones ?? [])
const parts = [
'头肩',
'上衣',
@@ -49,5 +51,6 @@ export const useInfoStore = defineStore('infoStore', () => {
enchants,
emblems,
parts,
stones
}
})