dev
This commit is contained in:
@@ -67,7 +67,7 @@ async def get_oath_info(state: AltersDep, suitId: str, skillId: str, rarity: str
|
||||
if oath is not None:
|
||||
oathSkill = next((x for x in oath.skills if x.skillId == skillId), None)
|
||||
if oathSkill is not None:
|
||||
skill = oathSkill.__dict__
|
||||
skill = {**oathSkill.__dict__, 'point': oath.points, 'imageUrl': oath.imageUrl}
|
||||
return skill
|
||||
|
||||
info = get_redis_info(redis, f'dcalc:oath:{rarity}:{skillId}', get_info)
|
||||
|
||||
+3
-3
@@ -3,6 +3,6 @@ MCPPORT=47174
|
||||
DEBUG_MODE=True
|
||||
WORKERS=1
|
||||
REDIS_URL=redis://localhost:6379/1
|
||||
COLG_TOKEN="Bearer "
|
||||
HELPER_TOKEN=""
|
||||
HELPER_ID=""
|
||||
COLG_TOKEN="Bearer 7B8B817D9BC838B813A1E6B1A0CAFD5F"
|
||||
HELPER_TOKEN="ESc6Z2kW"
|
||||
HELPER_ID="706194702"
|
||||
@@ -239,6 +239,7 @@ class Equipments:
|
||||
suits = {k: v for k, v in item.__dict__.items() if not k.startswith('_')}
|
||||
for i in range(1, lvs + 1):
|
||||
suit = {k: v for k, v in suits.items()}
|
||||
suit['points'] = suit['point']
|
||||
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']]
|
||||
suit['level'] = i
|
||||
@@ -386,6 +387,7 @@ class OathSuit:
|
||||
rarity: str
|
||||
name: str
|
||||
point: int
|
||||
points: str
|
||||
level: int
|
||||
count: int
|
||||
imageUrl: str
|
||||
|
||||
@@ -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]
|
||||
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]
|
||||
if position == '白金':
|
||||
return
|
||||
# 固有属性
|
||||
if position == '彩色':
|
||||
char.SetStatus(BufferP=bufferP[lv - 1], SkillAttack=skillAttack[lv - 1])
|
||||
else:
|
||||
char.SetStatus(Buffer=buffer[lv - 1], AttackP=attackP[lv - 1])
|
||||
rarity = (lv - 1) // 5
|
||||
emblems = list(filter(lambda x: int(x) > 0, emblem_list)) or []
|
||||
emblem_raritys = [int(i) // 1000 for i in emblems]
|
||||
emblems = list(filter(lambda x: safeParseInt(x) > 0, emblem_list)) or []
|
||||
emblem_raritys = [safeParseInt(i) // 1000 for i in emblems]
|
||||
# 稀有
|
||||
if rarity == 0:
|
||||
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]
|
||||
Buffer += buffer[i - 1]
|
||||
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.
Reference in New Issue
Block a user