This commit is contained in:
2026-04-21 02:30:13 +08:00
parent 7779d99880
commit c6c9f960da
5 changed files with 17 additions and 6 deletions
+1 -1
View File
@@ -67,7 +67,7 @@ async def get_oath_info(state: AltersDep, suitId: str, skillId: str, rarity: str
if oath is not None: if oath is not None:
oathSkill = next((x for x in oath.skills if x.skillId == skillId), None) oathSkill = next((x for x in oath.skills if x.skillId == skillId), None)
if oathSkill is not None: if oathSkill is not None:
skill = oathSkill.__dict__ skill = {**oathSkill.__dict__, 'point': oath.points, 'imageUrl': oath.imageUrl}
return skill return skill
info = get_redis_info(redis, f'dcalc:oath:{rarity}:{skillId}', get_info) info = get_redis_info(redis, f'dcalc:oath:{rarity}:{skillId}', get_info)
+3 -3
View File
@@ -3,6 +3,6 @@ MCPPORT=47174
DEBUG_MODE=True DEBUG_MODE=True
WORKERS=1 WORKERS=1
REDIS_URL=redis://localhost:6379/1 REDIS_URL=redis://localhost:6379/1
COLG_TOKEN="Bearer " COLG_TOKEN="Bearer 7B8B817D9BC838B813A1E6B1A0CAFD5F"
HELPER_TOKEN="" HELPER_TOKEN="ESc6Z2kW"
HELPER_ID="" HELPER_ID="706194702"
+2
View File
@@ -239,6 +239,7 @@ class Equipments:
suits = {k: v for k, v in item.__dict__.items() if not k.startswith('_')} suits = {k: v for k, v in item.__dict__.items() if not k.startswith('_')}
for i in range(1, lvs + 1): for i in range(1, lvs + 1):
suit = {k: v for k, v in suits.items()} suit = {k: v for k, v in suits.items()}
suit['points'] = suit['point']
suit['point'] = int(suit['point'].split(',')[i - 1]) suit['point'] = int(suit['point'].split(',')[i - 1])
skills = [x for x in db_skills_list if x.suitId == suit['suitId'] and x.key == suit['key']] skills = [x for x in db_skills_list if x.suitId == suit['suitId'] and x.key == suit['key']]
suit['level'] = i suit['level'] = i
@@ -386,6 +387,7 @@ class OathSuit:
rarity: str rarity: str
name: str name: str
point: int point: int
points: str
level: int level: int
count: int count: int
imageUrl: str imageUrl: str
+11 -2
View File
@@ -521,14 +521,16 @@ def emblem_combine(char: CharacterProperty, position: str, lv: int = 1, emblem_l
buffer = [10, 30, 60, 90, 120, 150, 180, 210, 240270, 300, 320, 340, 360, 380, 400] buffer = [10, 30, 60, 90, 120, 150, 180, 210, 240270, 300, 320, 340, 360, 380, 400]
skillAttack = [0.002, 0.004, 0.008, 0.012, 0.016, 0.02, 0.023, 0.026, 0.029, 0.032, 0.035, 0.036, 0.037, 0.038, 0.039, 0.04] skillAttack = [0.002, 0.004, 0.008, 0.012, 0.016, 0.02, 0.023, 0.026, 0.029, 0.032, 0.035, 0.036, 0.037, 0.038, 0.039, 0.04]
attackP = [0.005, 0.009, 0.013, 0.017, 0.021, 0.025, 0.028, 0.031, 0.034, 0.037, 0.04, 0.042, 0.044, 0.046, 0.048, 0.05] attackP = [0.005, 0.009, 0.013, 0.017, 0.021, 0.025, 0.028, 0.031, 0.034, 0.037, 0.04, 0.042, 0.044, 0.046, 0.048, 0.05]
if position == '白金':
return
# 固有属性 # 固有属性
if position == '彩色': if position == '彩色':
char.SetStatus(BufferP=bufferP[lv - 1], SkillAttack=skillAttack[lv - 1]) char.SetStatus(BufferP=bufferP[lv - 1], SkillAttack=skillAttack[lv - 1])
else: else:
char.SetStatus(Buffer=buffer[lv - 1], AttackP=attackP[lv - 1]) char.SetStatus(Buffer=buffer[lv - 1], AttackP=attackP[lv - 1])
rarity = (lv - 1) // 5 rarity = (lv - 1) // 5
emblems = list(filter(lambda x: int(x) > 0, emblem_list)) or [] emblems = list(filter(lambda x: safeParseInt(x) > 0, emblem_list)) or []
emblem_raritys = [int(i) // 1000 for i in emblems] emblem_raritys = [safeParseInt(i) // 1000 for i in emblems]
# 稀有 # 稀有
if rarity == 0: if rarity == 0:
skillAttack = [0.001, 0.001, 0.002, 0.002] skillAttack = [0.001, 0.001, 0.002, 0.002]
@@ -554,3 +556,10 @@ def emblem_combine(char: CharacterProperty, position: str, lv: int = 1, emblem_l
SkillAttack += skillAttack[i - 1] SkillAttack += skillAttack[i - 1]
Buffer += buffer[i - 1] Buffer += buffer[i - 1]
char.SetStatus(SkillAttack=SkillAttack, Buffer=Buffer) char.SetStatus(SkillAttack=SkillAttack, Buffer=Buffer)
def safeParseInt(x: int | str | None) -> int:
try:
return int(x)
except Exception:
return 0
Binary file not shown.