mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-07 20:45:46 +08:00
重构伤害计算的部分代码
This commit is contained in:
parent
ca1fe55666
commit
ca99169a6b
@ -1,9 +1,5 @@
|
||||
from mpmath import mp
|
||||
|
||||
from ..utils.excel.model import RelicMainAffixConfig, RelicSubAffixConfig
|
||||
from ..utils.map.SR_MAP_PATH import RelicId2MainAffixGroup
|
||||
from ..utils.excel.read_excel import RelicSubAffix, RelicMainAffix
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
|
||||
async def cal_relic_main_affix(
|
||||
@ -18,25 +14,22 @@ async def cal_relic_main_affix(
|
||||
group_id = str(rarity) + str(relic_type)
|
||||
else:
|
||||
group_id = str(RelicId2MainAffixGroup[str(relic_id)])
|
||||
relic_data = RelicMainAffix[group_id][str(affix_id)]
|
||||
assert relic_data['GroupID'] == int(group_id)
|
||||
assert relic_data['AffixID'] == affix_id
|
||||
base_value = mp.mpf(relic_data['BaseValue']['Value'])
|
||||
level_add = mp.mpf(relic_data['LevelAdd']['Value'])
|
||||
relic_data = RelicMainAffixConfig.Relic[group_id][str(affix_id)]
|
||||
print(relic_data)
|
||||
base_value = relic_data.BaseValue.Value
|
||||
level_add = relic_data.LevelAdd.Value
|
||||
value = base_value + level_add * relic_level
|
||||
affix_property = relic_data['Property']
|
||||
return affix_property, str(value)
|
||||
affix_property = relic_data.Property
|
||||
return affix_property, value
|
||||
|
||||
|
||||
async def cal_relic_sub_affix(
|
||||
relic_id: int, affix_id: int, cnt: int, step: int
|
||||
):
|
||||
rarity = int(str(relic_id)[0]) - 1
|
||||
relic_data = RelicSubAffix[str(rarity)][str(affix_id)]
|
||||
assert relic_data['GroupID'] == int(rarity)
|
||||
assert relic_data['AffixID'] == affix_id
|
||||
base_value = mp.mpf(relic_data['BaseValue']['Value'])
|
||||
step_value = mp.mpf(relic_data['StepValue']['Value'])
|
||||
relic_data = RelicSubAffixConfig.Relic[str(rarity)][str(affix_id)]
|
||||
base_value = relic_data.BaseValue.Value
|
||||
step_value = relic_data.StepValue.Value
|
||||
value = base_value * cnt + step_value * step
|
||||
affix_property = relic_data['Property']
|
||||
return affix_property, str(value)
|
||||
affix_property = relic_data.Property
|
||||
return affix_property, value
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,35 +1,18 @@
|
||||
import re
|
||||
import json
|
||||
import math
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import Dict, Union
|
||||
|
||||
from mpmath import mp, nstr
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
from gsuid_core.logger import logger
|
||||
from gsuid_core.utils.image.convert import convert_img
|
||||
from gsuid_core.utils.image.image_tools import draw_text_by_line
|
||||
|
||||
from .to_data import api_to_dict
|
||||
from .effect.Role import RoleInstance
|
||||
from .mono.Character import Character
|
||||
from ..utils.error_reply import CHAR_HINT
|
||||
from ..utils.fonts.first_world import fw_font_28
|
||||
from ..utils.excel.read_excel import light_cone_ranks
|
||||
from ..utils.map.name_covert import name_to_avatar_id, alias_to_char_name
|
||||
from ..utils.map.SR_MAP_PATH import (
|
||||
RelicId2Rarity,
|
||||
AvatarRelicScore,
|
||||
avatarId2Name,
|
||||
avatarId2DamageType,
|
||||
)
|
||||
from ..utils.resource.RESOURCE_PATH import (
|
||||
RELIC_PATH,
|
||||
SKILL_PATH,
|
||||
PLAYER_PATH,
|
||||
WEAPON_PATH,
|
||||
CHAR_PORTRAIT_PATH,
|
||||
)
|
||||
from ..utils.fonts.first_world import fw_font_28
|
||||
from ..utils.fonts.starrail_fonts import (
|
||||
sr_font_20,
|
||||
sr_font_23,
|
||||
@ -39,13 +22,28 @@ from ..utils.fonts.starrail_fonts import (
|
||||
sr_font_34,
|
||||
sr_font_38,
|
||||
)
|
||||
from ..utils.map.name_covert import alias_to_char_name, name_to_avatar_id
|
||||
from ..utils.map.SR_MAP_PATH import (
|
||||
AvatarRelicScore,
|
||||
RelicId2Rarity,
|
||||
avatarId2DamageType,
|
||||
avatarId2Name,
|
||||
)
|
||||
from ..utils.resource.RESOURCE_PATH import (
|
||||
CHAR_PORTRAIT_PATH,
|
||||
PLAYER_PATH,
|
||||
RELIC_PATH,
|
||||
SKILL_PATH,
|
||||
WEAPON_PATH,
|
||||
)
|
||||
from .effect.Role import RoleInstance
|
||||
from .mono.Character import Character
|
||||
from .to_data import api_to_dict
|
||||
|
||||
Excel_path = Path(__file__).parent / 'effect'
|
||||
with Path.open(Excel_path / 'Excel' / 'seele.json', encoding='utf-8') as f:
|
||||
with Path.open(Excel_path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||
skill_dict = json.load(f)
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
||||
|
||||
bg_img = Image.open(TEXT_PATH / "bg.png")
|
||||
@ -105,9 +103,8 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
1201,
|
||||
1212,
|
||||
]:
|
||||
skill_list = skill_dict[str(char.char_id)]['skilllist']
|
||||
skill_list = skill_dict[str(char.char_id)]['skillList']
|
||||
damage_len = len(skill_list)
|
||||
# print(damage_len)
|
||||
bg_height = 0
|
||||
if damage_len > 0:
|
||||
bg_height = 48 * (1 + damage_len) + 48
|
||||
@ -172,12 +169,11 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
attr_bg = Image.open(TEXT_PATH / 'attr_bg.png')
|
||||
attr_bg_draw = ImageDraw.Draw(attr_bg)
|
||||
# 生命值
|
||||
hp = mp.mpf(char.base_attributes.get('hp'))
|
||||
add_hp = mp.mpf(char.add_attr.get('HPDelta', 0)) + hp * mp.mpf(
|
||||
char.add_attr.get('HPAddedRatio', 0)
|
||||
)
|
||||
hp = int(mp.floor(hp))
|
||||
add_hp = int(mp.floor(add_hp))
|
||||
hp = int(char.base_attributes.get('hp'))
|
||||
add_hp = int(char.add_attr.get('HPDelta', 0)
|
||||
+ hp
|
||||
* char.add_attr.get('HPAddedRatio', 0)
|
||||
)
|
||||
attr_bg_draw.text(
|
||||
(413, 31), f'{hp + add_hp}', white_color, sr_font_26, 'rm'
|
||||
)
|
||||
@ -189,15 +185,14 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
anchor='lm',
|
||||
)
|
||||
# 攻击力
|
||||
attack = mp.mpf(char.base_attributes['attack'])
|
||||
add_attack = mp.mpf(char.add_attr.get('AttackDelta', 0)) + attack * mp.mpf(
|
||||
char.add_attr.get('AttackAddedRatio', 0)
|
||||
)
|
||||
atk = int(mp.floor(attack))
|
||||
add_attack = int(mp.floor(add_attack))
|
||||
attack = int(char.base_attributes['attack'])
|
||||
add_attack = int(char.add_attr.get('AttackDelta', 0)
|
||||
+ attack
|
||||
* char.add_attr.get('AttackAddedRatio', 0)
|
||||
)
|
||||
attr_bg_draw.text(
|
||||
(413, 31 + 48),
|
||||
f'{atk + add_attack}',
|
||||
f'{attack + add_attack}',
|
||||
white_color,
|
||||
sr_font_26,
|
||||
'rm',
|
||||
@ -210,12 +205,11 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
anchor='lm',
|
||||
)
|
||||
# 防御力
|
||||
defence = mp.mpf(char.base_attributes['defence'])
|
||||
add_defence = mp.mpf(
|
||||
char.add_attr.get('DefenceDelta', 0)
|
||||
) + defence * mp.mpf(char.add_attr.get('DefenceAddedRatio', 0))
|
||||
defence = int(mp.floor(defence))
|
||||
add_defence = int(mp.floor(add_defence))
|
||||
defence = int(char.base_attributes['defence'])
|
||||
add_defence = int(char.add_attr.get('DefenceDelta', 0)
|
||||
+ defence
|
||||
* char.add_attr.get('DefenceAddedRatio', 0)
|
||||
)
|
||||
attr_bg_draw.text(
|
||||
(413, 31 + 48 * 2),
|
||||
f'{defence + add_defence}',
|
||||
@ -231,10 +225,8 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
anchor='lm',
|
||||
)
|
||||
# 速度
|
||||
speed = mp.mpf(char.base_attributes['speed'])
|
||||
add_speed = mp.mpf(char.add_attr.get('SpeedDelta', 0))
|
||||
speed = int(mp.floor(speed))
|
||||
add_speed = int(mp.floor(add_speed))
|
||||
speed = int(char.base_attributes['speed'])
|
||||
add_speed = int(char.add_attr.get('SpeedDelta', 0))
|
||||
attr_bg_draw.text(
|
||||
(413, 31 + 48 * 3),
|
||||
f'{speed + add_speed}',
|
||||
@ -250,49 +242,45 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
anchor='lm',
|
||||
)
|
||||
# 暴击率
|
||||
critical_chance = mp.mpf(char.base_attributes['CriticalChanceBase'])
|
||||
critical_chance_base = mp.mpf(char.add_attr.get('CriticalChanceBase', 0))
|
||||
critical_chance = char.base_attributes['CriticalChanceBase']
|
||||
critical_chance_base = char.add_attr.get('CriticalChanceBase', 0)
|
||||
critical_chance = (critical_chance + critical_chance_base) * 100
|
||||
critical_chance = nstr(critical_chance, 3)
|
||||
attr_bg_draw.text(
|
||||
(500, 31 + 48 * 4),
|
||||
f'{critical_chance}%',
|
||||
"{:.1f}%".format(critical_chance),
|
||||
white_color,
|
||||
sr_font_26,
|
||||
'rm',
|
||||
)
|
||||
# 暴击伤害
|
||||
critical_damage = mp.mpf(char.base_attributes['CriticalDamageBase'])
|
||||
critical_damage_base = mp.mpf(char.add_attr.get('CriticalDamageBase', 0))
|
||||
critical_damage = char.base_attributes['CriticalDamageBase']
|
||||
critical_damage_base = char.add_attr.get('CriticalDamageBase', 0)
|
||||
critical_damage = (critical_damage + critical_damage_base) * 100
|
||||
critical_damage = nstr(critical_damage, 4)
|
||||
attr_bg_draw.text(
|
||||
(500, 31 + 48 * 5),
|
||||
f'{critical_damage}%',
|
||||
"{:.1f}%".format(critical_damage),
|
||||
white_color,
|
||||
sr_font_26,
|
||||
'rm',
|
||||
)
|
||||
# 效果命中
|
||||
status_probability_base = (
|
||||
mp.mpf(char.add_attr.get('StatusProbabilityBase', 0)) * 100
|
||||
char.add_attr.get('StatusProbabilityBase', 0) * 100
|
||||
)
|
||||
status_probability = nstr(status_probability_base, 3)
|
||||
attr_bg_draw.text(
|
||||
(500, 31 + 48 * 6),
|
||||
f'{status_probability}%',
|
||||
"{:.1f}%".format(status_probability_base),
|
||||
white_color,
|
||||
sr_font_26,
|
||||
'rm',
|
||||
)
|
||||
# 效果抵抗
|
||||
status_resistance_base = (
|
||||
mp.mpf(char.add_attr.get('StatusResistanceBase', 0)) * 100
|
||||
char.add_attr.get('StatusResistanceBase', 0) * 100
|
||||
)
|
||||
status_resistance = nstr(status_resistance_base, 3)
|
||||
attr_bg_draw.text(
|
||||
(500, 31 + 48 * 7),
|
||||
f'{status_resistance}%',
|
||||
"{:.1f}%".format(status_resistance_base),
|
||||
white_color,
|
||||
sr_font_26,
|
||||
'rm',
|
||||
@ -475,13 +463,13 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
)
|
||||
|
||||
# 主属性
|
||||
main_value = mp.mpf(relic['MainAffix']['Value'])
|
||||
main_value = relic['MainAffix']['Value']
|
||||
main_name: str = relic['MainAffix']['Name']
|
||||
main_property: str = relic['MainAffix']['Property']
|
||||
main_level: int = relic['Level']
|
||||
|
||||
if main_name in ['攻击力', '生命值', '防御力', '速度']:
|
||||
mainValueStr = nstr(main_value, 3)
|
||||
mainValueStr = "{:.1f}".format(main_value)
|
||||
else:
|
||||
mainValueStr = str(math.floor(main_value * 1000) / 10) + '%'
|
||||
|
||||
@ -534,7 +522,7 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
single_relic_score += main_value_score
|
||||
for index, i in enumerate(relic['SubAffixList']):
|
||||
subName: str = i['Name']
|
||||
subValue = mp.mpf(i['Value'])
|
||||
subValue = i['Value']
|
||||
subProperty = i['Property']
|
||||
|
||||
tmp_score = await get_relic_score(
|
||||
@ -543,9 +531,9 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
single_relic_score += tmp_score
|
||||
|
||||
if subName in ['攻击力', '生命值', '防御力', '速度']:
|
||||
subValueStr = nstr(subValue, 3)
|
||||
subValueStr = "{:.1f}".format(subValue)
|
||||
else:
|
||||
subValueStr = nstr(subValue * 100, 3) + '%' # type: ignore
|
||||
subValueStr = "{:.1f}".format(subValue * 100) + '%' # type: ignore
|
||||
subNameStr = subName.replace('百分比', '').replace('元素', '')
|
||||
# 副词条文字颜色
|
||||
relic_color = (255, 255, 255)
|
||||
|
@ -1,12 +1,9 @@
|
||||
from typing import List
|
||||
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ..Base.AvatarBase import BaseAvatar, BaseAvatarBuff
|
||||
from ..Base.model import DamageInstanceSkill, DamageInstanceAvatar
|
||||
|
||||
mp.dps = 14
|
||||
from ..Base.model import DamageInstanceAvatar, DamageInstanceSkill
|
||||
|
||||
|
||||
class Seele(BaseAvatar):
|
||||
@ -26,17 +23,15 @@ class Seele(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank < 2:
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.25)
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = 0.25
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['CriticalChanceBase'] = mp.mpf(0.15)
|
||||
self.eidolon_attribute['CriticalChanceBase'] = 0.15
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.5)
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = 0.5
|
||||
|
||||
def extra_ability(self):
|
||||
# 额外能力 割裂 抗性穿透提高20
|
||||
self.extra_ability_attribute['QuantumResistancePenetration'] = mp.mpf(
|
||||
0.2
|
||||
)
|
||||
self.extra_ability_attribute['QuantumResistancePenetration'] = 0.2
|
||||
|
||||
|
||||
class JingYuan(BaseAvatar):
|
||||
@ -56,18 +51,18 @@ class JingYuan(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['NormalDmgAdd'] = mp.mpf(0.2)
|
||||
self.eidolon_attribute['BPSkillDmgAdd'] = mp.mpf(0.2)
|
||||
self.eidolon_attribute['UltraDmgAdd'] = mp.mpf(0.2)
|
||||
self.eidolon_attribute['NormalDmgAdd'] = 0.2
|
||||
self.eidolon_attribute['BPSkillDmgAdd'] = 0.2
|
||||
self.eidolon_attribute['UltraDmgAdd'] = 0.2
|
||||
if self.avatar_rank >= 6:
|
||||
self.eidolon_attribute['Talent_DmgRatio'] = mp.mpf(0.288)
|
||||
self.eidolon_attribute['Talent_DmgRatio'] = 0.288
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('【神君】下回合的攻击段数大于等于6段,则其下回合的暴击伤害提高25%。')
|
||||
self.extra_ability_attribute['CriticalDamageBase'] = mp.mpf(0.25)
|
||||
self.extra_ability_attribute['CriticalDamageBase'] = 0.25
|
||||
logger.info('施放战技后,暴击率提升10%')
|
||||
self.extra_ability_attribute['CriticalChanceBase'] = mp.mpf(0.1)
|
||||
self.extra_ability_attribute['CriticalChanceBase'] = 0.1
|
||||
|
||||
|
||||
class Clara(BaseAvatar):
|
||||
@ -87,13 +82,13 @@ class Clara(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['AttackAddedRatio'] = mp.mpf(0.2)
|
||||
self.eidolon_attribute['AttackAddedRatio'] = 0.2
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('史瓦罗的反击造成的伤害提高30%')
|
||||
self.extra_ability_attribute['TalentDmgAdd'] = mp.mpf(0.3)
|
||||
self.extra_ability_attribute['UltraDmgAdd'] = mp.mpf(0.3)
|
||||
self.extra_ability_attribute['TalentDmgAdd'] = 0.3
|
||||
self.extra_ability_attribute['UltraDmgAdd'] = 0.3
|
||||
|
||||
|
||||
class Danhengil(BaseAvatar):
|
||||
@ -113,18 +108,18 @@ class Danhengil(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['Atk_buff'] = mp.mpf(1)
|
||||
self.eidolon_attribute['Atk_buff'] = 1
|
||||
if self.avatar_rank >= 4:
|
||||
self.eidolon_attribute['Normal_buff'] = mp.mpf(4)
|
||||
self.eidolon_attribute['Normal_buff'] = 4
|
||||
if self.avatar_rank >= 6:
|
||||
self.extra_ability_attribute[
|
||||
'Normal_ImaginaryResistancePenetration'
|
||||
] = mp.mpf(0.6)
|
||||
] = 0.6
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('对拥有虚数属性弱点的敌方目标造成伤害时,暴击伤害提高24%。')
|
||||
self.extra_ability_attribute['CriticalDamageBase'] = mp.mpf(0.24)
|
||||
self.extra_ability_attribute['CriticalDamageBase'] = 0.24
|
||||
|
||||
|
||||
class Silverwolf(BaseAvatar):
|
||||
@ -144,22 +139,20 @@ class Silverwolf(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 6:
|
||||
self.extra_ability_attribute['AllDamageAddedRatio'] = mp.mpf(1)
|
||||
self.extra_ability_attribute['AllDamageAddedRatio'] = 1
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('战技降抗')
|
||||
logger.info('战技使目标全属性抗性降低的效果额外降低3%')
|
||||
enemy_status_resistance = self.BPSkill_num('BPSkill_D') + 0.03
|
||||
self.extra_ability_attribute['QuantumResistancePenetration'] = mp.mpf(
|
||||
enemy_status_resistance
|
||||
)
|
||||
self.extra_ability_attribute['QuantumResistancePenetration'] = enemy_status_resistance
|
||||
logger.info('终结技降防')
|
||||
ultra_defence = self.Ultra_num('Ultra_D')
|
||||
logger.info('天赋降防')
|
||||
talent_defence = self.Talent()
|
||||
ignore_defence = ultra_defence + talent_defence
|
||||
self.extra_ability_attribute['ignore_defence'] = mp.mpf(ignore_defence)
|
||||
self.extra_ability_attribute['ignore_defence'] = ignore_defence
|
||||
|
||||
|
||||
class Kafka(BaseAvatar):
|
||||
@ -179,9 +172,9 @@ class Kafka(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.extra_ability_attribute['DOTDmgAdd'] = mp.mpf(0.3)
|
||||
self.extra_ability_attribute['DOTDmgAdd'] = 0.3
|
||||
if self.avatar_rank >= 2:
|
||||
self.extra_ability_attribute['DOTDmgAdd'] = mp.mpf(0.55)
|
||||
self.extra_ability_attribute['DOTDmgAdd'] = 0.55
|
||||
|
||||
def extra_ability(self):
|
||||
pass
|
||||
@ -204,15 +197,15 @@ class Blade(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['CriticalChanceBase'] = mp.mpf(0.15)
|
||||
self.eidolon_attribute['CriticalChanceBase'] = 0.15
|
||||
|
||||
if self.avatar_rank >= 4:
|
||||
self.eidolon_attribute['HPAddedRatio'] = mp.mpf(0.4)
|
||||
self.eidolon_attribute['HPAddedRatio'] = 0.4
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('天赋施放的追加攻击伤害提高20%')
|
||||
self.extra_ability_attribute['TalentDmgAdd'] = mp.mpf(0.2)
|
||||
self.extra_ability_attribute['TalentDmgAdd'] = 0.2
|
||||
|
||||
|
||||
class Fuxuan(BaseAvatar):
|
||||
@ -232,7 +225,7 @@ class Fuxuan(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['CriticalDamageBase'] = mp.mpf(0.3)
|
||||
self.eidolon_attribute['CriticalDamageBase'] = 0.3
|
||||
|
||||
def extra_ability(self):
|
||||
pass
|
||||
@ -277,12 +270,12 @@ class Yanqing(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 4:
|
||||
self.eidolon_attribute['IceResistancePenetration'] = mp.mpf(0.15)
|
||||
self.eidolon_attribute['IceResistancePenetration'] = 0.15
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('触发暴击时,速度提高10%')
|
||||
self.extra_ability_attribute['SpeedAddedRatio'] = mp.mpf(0.1)
|
||||
self.extra_ability_attribute['SpeedAddedRatio'] = 0.1
|
||||
logger.info('【智剑连心】增益')
|
||||
critical_damage_base_t = self.Talent_num('Talent_CD')
|
||||
critical_damage_base_u = self.Ultra_num('Ultra_CD')
|
||||
@ -292,7 +285,7 @@ class Yanqing(BaseAvatar):
|
||||
critical_chance_base = self.Talent_num('Talent_CC')
|
||||
self.extra_ability_attribute[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + mp.mpf(0.6)
|
||||
] = critical_chance_base + 0.6
|
||||
|
||||
|
||||
class Welt(BaseAvatar):
|
||||
@ -317,7 +310,7 @@ class Welt(BaseAvatar):
|
||||
logger.info('额外能力')
|
||||
logger.info('施放终结技时,有100%基础概率使目标受到的伤害提高12%,持续2回合。')
|
||||
logger.info('对被弱点击破的敌方目标造成的伤害提高20')
|
||||
self.extra_ability_attribute['AllDamageAddedRatio'] = mp.mpf(0.32)
|
||||
self.extra_ability_attribute['AllDamageAddedRatio'] = 0.32
|
||||
|
||||
|
||||
class Himeko(BaseAvatar):
|
||||
@ -337,16 +330,16 @@ class Himeko(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = mp.mpf(0.1)
|
||||
self.eidolon_attribute['SpeedAddedRatio'] = 0.1
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['AllDamageAddedRatio'] = mp.mpf(0.15)
|
||||
self.eidolon_attribute['AllDamageAddedRatio'] = 0.15
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('战技对灼烧状态下的敌方目标造成的伤害提高20%。')
|
||||
self.extra_ability_attribute['BPSkillDmgAdd'] = mp.mpf(0.2)
|
||||
self.extra_ability_attribute['BPSkillDmgAdd'] = 0.2
|
||||
logger.info('若当前生命值百分比大于等于80%,则暴击率提高15%。')
|
||||
self.extra_ability_attribute['CriticalChanceBase'] = mp.mpf(0.15)
|
||||
self.extra_ability_attribute['CriticalChanceBase'] = 0.15
|
||||
|
||||
|
||||
class Qingque(BaseAvatar):
|
||||
@ -366,14 +359,14 @@ class Qingque(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['UltraDmgAdd'] = mp.mpf(0.1)
|
||||
self.eidolon_attribute['UltraDmgAdd'] = 0.1
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('施放强化普攻后,青雀的速度提高10%,持续1回合。')
|
||||
self.extra_ability_attribute['SpeedAddedRatio'] = mp.mpf(0.1)
|
||||
self.extra_ability_attribute['SpeedAddedRatio'] = 0.1
|
||||
logger.info('默认4层战技加伤害')
|
||||
all_damage_added_ratio = self.BPSkill() + mp.mpf(0.1)
|
||||
all_damage_added_ratio = self.BPSkill() + 0.1
|
||||
self.extra_ability_attribute['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio * 4
|
||||
)
|
||||
@ -398,24 +391,22 @@ class Jingliu(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['Ultra_CriticalChanceBase'] = mp.mpf(0.12)
|
||||
self.eidolon_attribute['BPSkill1_CriticalChanceBase'] = mp.mpf(
|
||||
0.12
|
||||
)
|
||||
self.eidolon_attribute['Ultra_CriticalChanceBase'] = 0.12
|
||||
self.eidolon_attribute['BPSkill1_CriticalChanceBase'] = 0.12
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['UltraDmgAdd'] = mp.mpf(0.3)
|
||||
self.eidolon_attribute['UltraDmgAdd'] = 0.3
|
||||
if self.avatar_rank >= 4:
|
||||
self.eidolon_attribute['BPSkill1AttackAddedRatio'] = mp.mpf(0.4)
|
||||
self.eidolon_attribute['UltraAttackAddedRatio'] = mp.mpf(0.4)
|
||||
self.eidolon_attribute['BPSkill1AttackAddedRatio'] = 0.4
|
||||
self.eidolon_attribute['UltraAttackAddedRatio'] = 0.4
|
||||
if self.avatar_rank >= 6:
|
||||
self.eidolon_attribute['Ultra_CriticalDamageBase'] = mp.mpf(0.5)
|
||||
self.eidolon_attribute['BPSkill1_CriticalDamageBase'] = mp.mpf(0.5)
|
||||
self.eidolon_attribute['Ultra_CriticalDamageBase'] = 0.5
|
||||
self.eidolon_attribute['BPSkill1_CriticalDamageBase'] = 0.5
|
||||
|
||||
def extra_ability(self):
|
||||
logger.info('额外能力')
|
||||
logger.info('【转魄】状态下,造成的伤害提高10%。')
|
||||
self.extra_ability_attribute['BPSkill1DmgAdd'] = mp.mpf(0.1)
|
||||
self.extra_ability_attribute['UltraDmgAdd'] = mp.mpf(0.1)
|
||||
self.extra_ability_attribute['BPSkill1DmgAdd'] = 0.1
|
||||
self.extra_ability_attribute['UltraDmgAdd'] = 0.1
|
||||
|
||||
|
||||
class Avatar:
|
||||
|
@ -1,19 +1,38 @@
|
||||
import json
|
||||
from typing import List
|
||||
from pathlib import Path
|
||||
from abc import abstractmethod
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from mpmath import mp
|
||||
from msgspec import Struct
|
||||
|
||||
from ....utils.excel.model import AvatarPromotionConfig
|
||||
from .model import DamageInstanceAvatar, DamageInstanceSkill
|
||||
from .SkillBase import BaseSkills
|
||||
from ....utils.excel.read_excel import AvatarPromotion
|
||||
from .model import DamageInstanceSkill, DamageInstanceAvatar
|
||||
|
||||
path = Path(__file__).parent.parent
|
||||
with Path.open(path / 'Excel' / 'seele.json', encoding='utf-8') as f:
|
||||
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||
skill_dict = json.load(f)
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
class BaseAvatarAttribute(Struct):
|
||||
attack: float
|
||||
defence: float
|
||||
hp: float
|
||||
speed: float
|
||||
CriticalChanceBase: float
|
||||
CriticalDamageBase: float
|
||||
BaseAggro: float
|
||||
|
||||
def items(self):
|
||||
return [
|
||||
('attack', self.attack),
|
||||
('defence', self.defence),
|
||||
('hp', self.hp),
|
||||
('speed', self.speed),
|
||||
('CriticalChanceBase', self.CriticalChanceBase),
|
||||
('CriticalDamageBase', self.CriticalDamageBase),
|
||||
('BaseAggro', self.BaseAggro),
|
||||
]
|
||||
|
||||
|
||||
class BaseAvatarBuff:
|
||||
@ -53,123 +72,100 @@ class BaseAvatar:
|
||||
self.avatar_promotion = char.promotion
|
||||
self.avatar_attribute_bonus = char.attribute_bonus
|
||||
self.avatar_extra_ability = char.extra_ability
|
||||
self.avatar_attribute = {}
|
||||
self.get_attribute()
|
||||
self.avatar_attribute = self.get_attribute()
|
||||
|
||||
def get_attribute(self):
|
||||
promotion = AvatarPromotion[str(self.avatar_id)][
|
||||
str(self.avatar_promotion)
|
||||
]
|
||||
promotion = AvatarPromotionConfig.Avatar[
|
||||
str(self.avatar_id)
|
||||
][str(self.avatar_promotion)]
|
||||
|
||||
# 攻击力
|
||||
self.avatar_attribute['attack'] = mp.mpf(
|
||||
promotion["AttackBase"]['Value']
|
||||
) + mp.mpf(promotion["AttackAdd"]['Value']) * (self.avatar_level - 1)
|
||||
# 防御力
|
||||
self.avatar_attribute['defence'] = mp.mpf(
|
||||
promotion["DefenceBase"]['Value']
|
||||
) + mp.mpf(promotion["DefenceAdd"]['Value']) * (self.avatar_level - 1)
|
||||
# 血量
|
||||
self.avatar_attribute['hp'] = mp.mpf(
|
||||
promotion["HPBase"]['Value']
|
||||
) + mp.mpf(promotion["HPAdd"]['Value']) * (self.avatar_level - 1)
|
||||
# 速度
|
||||
self.avatar_attribute['speed'] = mp.mpf(
|
||||
promotion["SpeedBase"]['Value']
|
||||
)
|
||||
# 暴击率
|
||||
self.avatar_attribute['CriticalChanceBase'] = mp.mpf(
|
||||
promotion["CriticalChance"]['Value']
|
||||
)
|
||||
# 暴击伤害
|
||||
self.avatar_attribute['CriticalDamageBase'] = mp.mpf(
|
||||
promotion["CriticalDamage"]['Value']
|
||||
)
|
||||
# 嘲讽
|
||||
self.avatar_attribute['BaseAggro'] = mp.mpf(
|
||||
promotion["BaseAggro"]['Value']
|
||||
return BaseAvatarAttribute(
|
||||
# 攻击力
|
||||
attack = (
|
||||
promotion.AttackBase.Value
|
||||
+ promotion.AttackAdd.Value
|
||||
* (self.avatar_level - 1)
|
||||
),
|
||||
# 防御力
|
||||
defence = (
|
||||
promotion.DefenceBase.Value
|
||||
+ promotion.DefenceAdd.Value
|
||||
* (self.avatar_level - 1)
|
||||
),
|
||||
# 血量
|
||||
hp = (
|
||||
promotion.HPBase.Value
|
||||
+ promotion.HPAdd.Value
|
||||
* (self.avatar_level - 1)
|
||||
),
|
||||
# 速度
|
||||
speed = promotion.SpeedBase.Value,
|
||||
# 暴击率
|
||||
CriticalChanceBase = promotion.CriticalChance.Value,
|
||||
# 暴击伤害
|
||||
CriticalDamageBase = promotion.CriticalDamage.Value,
|
||||
# 嘲讽
|
||||
BaseAggro = promotion.BaseAggro.Value
|
||||
)
|
||||
|
||||
def Skill_Info(self, skill_type):
|
||||
skill_info = skill_dict[str(self.avatar_id)]['skilllist'][skill_type]
|
||||
def Skill_Info(self, skill_type: str):
|
||||
skill_info = skill_dict[str(self.avatar_id)]['skillList'][skill_type]
|
||||
return skill_info
|
||||
|
||||
def Normalnum(self, skill_type):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.Normal_.level - 1
|
||||
]
|
||||
)
|
||||
def Normalnum(self, skill_type: str) -> float:
|
||||
return skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.Normal_.level - 1
|
||||
]
|
||||
|
||||
def Normal(self):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['Normal'][
|
||||
self.Skill.Normal_.level - 1
|
||||
]
|
||||
)
|
||||
def Normal(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Normal'][
|
||||
self.Skill.Normal_.level - 1
|
||||
]
|
||||
|
||||
def BPSkill(self):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['BPSkill'][
|
||||
self.Skill.BPSkill_.level - 1
|
||||
]
|
||||
)
|
||||
def BPSkill(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['BPSkill'][
|
||||
self.Skill.BPSkill_.level - 1
|
||||
]
|
||||
|
||||
def Ultra(self):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['Ultra'][
|
||||
self.Skill.Ultra_.level - 1
|
||||
]
|
||||
)
|
||||
def Ultra(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Ultra'][
|
||||
self.Skill.Ultra_.level - 1
|
||||
]
|
||||
|
||||
def Maze(self):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['Maze'][self.Skill.Maze_.level - 1]
|
||||
)
|
||||
def Maze(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Maze'][self.Skill.Maze_.level - 1]
|
||||
|
||||
def Talent(self):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['Talent'][
|
||||
self.Skill.Talent_.level - 1
|
||||
]
|
||||
)
|
||||
def Talent(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Talent'][
|
||||
self.Skill.Talent_.level - 1
|
||||
]
|
||||
|
||||
def BPSkill_num(self, skill_type):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.BPSkill_.level - 1
|
||||
]
|
||||
)
|
||||
def BPSkill_num(self, skill_type) -> float:
|
||||
return skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.BPSkill_.level - 1
|
||||
]
|
||||
|
||||
def Ultra_num(self, skill_type):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.Ultra_.level - 1
|
||||
]
|
||||
)
|
||||
def Ultra_num(self, skill_type) -> float:
|
||||
return skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.Ultra_.level - 1
|
||||
]
|
||||
|
||||
def Talent_num(self, skill_type):
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.Talent_.level - 1
|
||||
]
|
||||
)
|
||||
def Talent_num(self, skill_type) -> float:
|
||||
return skill_dict[str(self.avatar_id)][skill_type][
|
||||
self.Skill.Talent_.level - 1
|
||||
]
|
||||
|
||||
def Talent_add(self):
|
||||
def Talent_add(self) -> float:
|
||||
if self.avatar_id in [1102]:
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['Talent'][
|
||||
self.Skill.Talent_.level - 1
|
||||
]
|
||||
)
|
||||
return float(skill_dict[str(self.avatar_id)]['Talent'][
|
||||
self.Skill.Talent_.level - 1
|
||||
])
|
||||
elif self.avatar_id in [1205]:
|
||||
return mp.mpf(
|
||||
skill_dict[str(self.avatar_id)]['BPSkill'][
|
||||
self.Skill.BPSkill_.level - 1
|
||||
]
|
||||
)
|
||||
return float(skill_dict[str(self.avatar_id)]['BPSkill'][
|
||||
self.Skill.BPSkill_.level - 1
|
||||
])
|
||||
else:
|
||||
return mp.mpf(0)
|
||||
return float(0)
|
||||
|
||||
def Ultra_Use(self):
|
||||
def Ultra_Use(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Ultra_Use'][0]
|
||||
|
@ -1,13 +1,10 @@
|
||||
from typing import Dict
|
||||
from abc import abstractmethod
|
||||
from typing import Dict
|
||||
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from .model import DamageInstanceRelic
|
||||
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
||||
|
||||
mp.dps = 14
|
||||
from .model import DamageInstanceRelic
|
||||
|
||||
|
||||
class SingleRelic:
|
||||
@ -24,17 +21,17 @@ class SingleRelic:
|
||||
if self.raw_relic.MainAffix.Property in self.relic_attribute_bonus:
|
||||
self.relic_attribute_bonus[
|
||||
self.raw_relic.MainAffix.Property
|
||||
] += mp.mpf(self.raw_relic.MainAffix.Value)
|
||||
] += self.raw_relic.MainAffix.Value
|
||||
else:
|
||||
self.relic_attribute_bonus[
|
||||
self.raw_relic.MainAffix.Property
|
||||
] = mp.mpf(self.raw_relic.MainAffix.Value)
|
||||
] = self.raw_relic.MainAffix.Value
|
||||
|
||||
# SubAffix
|
||||
if self.raw_relic.SubAffixList:
|
||||
for sub_affix in self.raw_relic.SubAffixList:
|
||||
sub_affix_property = sub_affix.Property
|
||||
value = mp.mpf(sub_affix.Value)
|
||||
value = sub_affix.Value
|
||||
if sub_affix_property in self.relic_attribute_bonus:
|
||||
self.relic_attribute_bonus[sub_affix_property] += value
|
||||
else:
|
||||
@ -70,13 +67,13 @@ class BaseRelicSetSkill:
|
||||
|
||||
def set_skill_property_ability(self):
|
||||
set_property = ''
|
||||
set_value = mp.mpf(0)
|
||||
set_value = 0
|
||||
if self.pieces2 and RelicSetSkill[str(self.setId)]['2'] != {}:
|
||||
set_property = RelicSetSkill[str(self.setId)]['2']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(self.setId)]['2']['Value'])
|
||||
set_value = RelicSetSkill[str(self.setId)]['2']['Value']
|
||||
if self.pieces4 and RelicSetSkill[str(self.setId)]['4'] != {}:
|
||||
set_property = RelicSetSkill[str(self.setId)]['4']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(self.setId)]['4']['Value'])
|
||||
set_value = RelicSetSkill[str(self.setId)]['4']['Value']
|
||||
if set_property != '':
|
||||
if set_property in self.relicSetAttribute:
|
||||
self.relicSetAttribute[set_property] = (
|
||||
|
@ -1,16 +1,11 @@
|
||||
import json
|
||||
from typing import List
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
from mpmath import mp
|
||||
|
||||
from .model import DamageInstanceSkill, DamageInstanceAvatar
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
from .model import DamageInstanceAvatar, DamageInstanceSkill
|
||||
|
||||
path = Path(__file__).parent.parent
|
||||
with Path.open(path / 'Excel' / 'seele.json', encoding='utf-8') as f:
|
||||
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||
skill_dict = json.load(f)
|
||||
|
||||
|
||||
|
@ -1,13 +1,24 @@
|
||||
from typing import Dict
|
||||
from abc import abstractmethod
|
||||
from typing import Dict
|
||||
|
||||
from mpmath import mp
|
||||
from msgspec import Struct
|
||||
|
||||
from .model import DamageInstanceWeapon
|
||||
from ....utils.excel.read_excel import EquipmentPromotion
|
||||
from ....utils.excel.model import EquipmentPromotionConfig
|
||||
from ....utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty
|
||||
from .model import DamageInstanceWeapon
|
||||
|
||||
mp.dps = 14
|
||||
|
||||
class BaseWeaponAttribute(Struct):
|
||||
hp: float
|
||||
attack: float
|
||||
defence: float
|
||||
|
||||
def items(self):
|
||||
return [
|
||||
('hp', self.hp),
|
||||
('attack', self.attack),
|
||||
('defence', self.defence)
|
||||
]
|
||||
|
||||
|
||||
class BaseWeapon:
|
||||
@ -16,7 +27,7 @@ class BaseWeapon:
|
||||
self.weapon_level = weapon.level
|
||||
self.weapon_rank = weapon.rank
|
||||
self.weapon_promotion = weapon.promotion
|
||||
self.weapon_base_attribute = {}
|
||||
self.weapon_base_attribute = self.get_attribute()
|
||||
self.weapon_attribute = {}
|
||||
self.get_attribute()
|
||||
self.weapon_property_ability()
|
||||
@ -47,22 +58,25 @@ class BaseWeapon:
|
||||
...
|
||||
|
||||
def get_attribute(self):
|
||||
promotion = EquipmentPromotion[str(self.weapon_id)][
|
||||
str(self.weapon_promotion)
|
||||
]
|
||||
promotion = EquipmentPromotionConfig.Equipment[
|
||||
str(self.weapon_id)
|
||||
][str(self.weapon_promotion)]
|
||||
print(promotion)
|
||||
|
||||
self.weapon_base_attribute['hp'] = mp.mpf(
|
||||
promotion["BaseHP"]['Value']
|
||||
) + mp.mpf(promotion["BaseHPAdd"]['Value']) * (self.weapon_level - 1)
|
||||
|
||||
self.weapon_base_attribute['attack'] = mp.mpf(
|
||||
promotion["BaseAttack"]['Value']
|
||||
) + mp.mpf(promotion["BaseAttackAdd"]['Value']) * (
|
||||
self.weapon_level - 1
|
||||
)
|
||||
|
||||
self.weapon_base_attribute['defence'] = mp.mpf(
|
||||
promotion["BaseDefence"]['Value']
|
||||
) + mp.mpf(promotion["BaseDefenceAdd"]['Value']) * (
|
||||
self.weapon_level - 1
|
||||
return BaseWeaponAttribute(
|
||||
hp = (
|
||||
promotion.BaseHP.Value
|
||||
+ promotion.BaseHPAdd.Value
|
||||
* (self.weapon_level - 1)
|
||||
),
|
||||
attack = (
|
||||
promotion.BaseAttack.Value
|
||||
+ promotion.BaseAttackAdd.Value
|
||||
* (self.weapon_level - 1)
|
||||
),
|
||||
defence = (
|
||||
promotion.BaseDefence.Value
|
||||
+ promotion.BaseDefenceAdd.Value
|
||||
* (self.weapon_level - 1)
|
||||
)
|
||||
)
|
||||
|
@ -18,14 +18,14 @@ class DamageInstanceRelicSubAffix(Struct):
|
||||
Name: str
|
||||
Cnt: int
|
||||
Step: int
|
||||
Value: str
|
||||
Value: float
|
||||
|
||||
|
||||
class DamageInstanceRelicMainAffix(Struct):
|
||||
AffixID: int
|
||||
Property: str
|
||||
Name: str
|
||||
Value: str
|
||||
Value: float
|
||||
|
||||
|
||||
class DamageInstanceRelic(Struct):
|
||||
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"1102": [
|
||||
{
|
||||
"id": 1102102,
|
||||
"property": "QuantumResistancePenetration",
|
||||
"value": 0.2
|
||||
}
|
||||
]
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"1102": [
|
||||
{
|
||||
"rank": 1,
|
||||
"property" :"CriticalDamageBase",
|
||||
"value": 0.2
|
||||
}
|
||||
]
|
||||
}
|
604
StarRailUID/starrailuid_charinfo/effect/Excel/SkillData.json
Normal file
604
StarRailUID/starrailuid_charinfo/effect/Excel/SkillData.json
Normal file
@ -0,0 +1,604 @@
|
||||
{
|
||||
"1102": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
1.1000000000931323, 1.2100000001955777, 1.3200000002980232,
|
||||
1.4300000004004687, 1.5400000005029142, 1.6500000006053597,
|
||||
1.7875000005587935, 1.9250000005122274, 2.0625000002328306,
|
||||
2.2000000001862645, 2.31000000028871, 2.4200000003911555,
|
||||
2.530000000493601, 2.6400000005960464, 2.750000000698492
|
||||
],
|
||||
"Ultra": [
|
||||
2.5500000005122274, 2.7200000006705523, 2.890000000828877,
|
||||
3.0600000000558794, 3.230000000214204, 3.400000000372529,
|
||||
3.612500000745058, 3.825000000419095, 4.037499999860302,
|
||||
4.250000000232831, 4.4200000003911555, 4.59000000054948,
|
||||
4.760000000707805, 4.93000000086613, 5.100000000093132
|
||||
],
|
||||
"Talent": [
|
||||
0.40000000037252903, 0.44000000040978193, 0.48000000044703484,
|
||||
0.5200000004842877, 0.5600000005215406, 0.6000000005587935,
|
||||
0.6500000006053597, 0.7000000006519258, 0.7500000006984919,
|
||||
0.8000000007450581, 0.840000000782311, 0.8800000008195639,
|
||||
0.9200000008568168, 0.9600000008940697, 1
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [120],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1204": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
0.5000000004656613, 0.5500000004656613, 0.6000000005587935,
|
||||
0.6500000005587935, 0.7000000006519258, 0.7500000006519258,
|
||||
0.8000000007450581, 0.8500000007450581, 0.9000000008381903,
|
||||
0.9500000008381903, 1.0000000000931323, 1.0500000000931323,
|
||||
1.1000000001862645, 1.1500000001862645, 1.2000000002793968,
|
||||
1.2500000002793968
|
||||
],
|
||||
"Ultra": [
|
||||
1.2000000002793968, 1.2800000002793968, 1.3600000002793968,
|
||||
1.4400000002793968, 1.5200000002793968, 1.6000000002793968,
|
||||
1.6800000002793968, 1.7600000002793968, 1.8400000002793968,
|
||||
1.9200000002793968, 2.0000000002793968, 2.0800000002793968,
|
||||
2.1600000002793968, 2.2400000002793968, 2.3200000002793968,
|
||||
2.4000000002793968
|
||||
],
|
||||
"Talent": [
|
||||
3.300000000372529, 3.63000000372529, 3.960000000372529,
|
||||
4.290000000372529, 4.620000000372529, 4.495000000372529,
|
||||
5.363000000372529, 5.775000000372529, 6.188000000372529,
|
||||
6.600000000372529, 6.930000000372529, 7.260000000372529,
|
||||
7.590000000372529, 7.920000000372529, 8.250000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [130],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"],
|
||||
"Talent": ["attack", "10层神君", 1, "Talent"]
|
||||
}
|
||||
},
|
||||
"1107": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
0.6000000004656613, 0.6600000004656613, 0.7200000005587935,
|
||||
0.7800000005587935, 0.8400000006519258, 0.9000000006519258,
|
||||
0.9600000007450581, 1.0200000007450581, 1.0800000008381903,
|
||||
1.1400000008381903, 1.2000000000931323, 1.2600000000931323,
|
||||
1.3200000001862645, 1.3800000001862645, 1.4400000002793968,
|
||||
1.5000000002793968
|
||||
],
|
||||
"Ultra": [
|
||||
0.9600000002793968, 1.0240000002793968, 1.0880000002793968,
|
||||
1.1520000002793968, 1.2160000002793968, 1.2800000002793968,
|
||||
1.3600000002793968, 1.4400000002793968, 1.5200000002793968,
|
||||
1.6000000002793968, 1.6640000002793968, 1.7280000002793968,
|
||||
1.7920000002793968, 1.1850000002793968, 1.9200000002793968
|
||||
],
|
||||
"Talent": [
|
||||
0.800000000372529, 0.880000000372529, 0.960000000372529,
|
||||
1.040000000372529, 1.120000000372529, 1.200000000372529,
|
||||
1.300000000372529, 1.400000000372529, 1.500000000372529,
|
||||
1.600000000372529, 1.680000000372529, 1.760000000372529,
|
||||
1.840000000372529, 1.920000000372529, 2.000000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [130],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "强化反击", 1, "Ultra"],
|
||||
"Talent": ["attack", "反击", 1, "Talent"]
|
||||
}
|
||||
},
|
||||
"1213": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968, 1.3000000002793968
|
||||
],
|
||||
"Normal1": [
|
||||
1.3000000004656613, 1.5600000005587935, 1.8200000006519258,
|
||||
2.0800000007450581, 2.3400000008381903, 2.6000000000931323,
|
||||
2.8600000001862645, 3.1200000002793968, 3.3800000002793968
|
||||
],
|
||||
"Normal2": [
|
||||
1.9000000004656613, 2.2800000005587935, 2.6600000006519258,
|
||||
3.0400000007450581, 3.4200000008381903, 3.8000000000931323,
|
||||
4.1800000001862645, 4.5600000002793968, 4.9400000002793968
|
||||
],
|
||||
"Normal3": [
|
||||
2.5000000004656613, 3.0000000005587935, 3.5000000006519258,
|
||||
4.0000000007450581, 4.5000000008381903, 5.0000000000931323,
|
||||
5.5000000001862645, 6.0000000002793968, 6.5000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
0.0600000004656613, 0.0660000004656613, 0.0720000005587935,
|
||||
0.0780000005587935, 0.0840000006519258, 0.0900000006519258,
|
||||
0.0975000007450581, 0.1050000007450581, 0.1125000008381903,
|
||||
0.1200000008381903, 0.1260000000931323, 0.1320000000931323,
|
||||
0.1380000001862645, 0.1440000001862645, 0.1500000002793968,
|
||||
0.1560000002793968
|
||||
],
|
||||
"Ultra": [
|
||||
1.8000000002793968, 1.9200000002793968, 2.0400000002793968,
|
||||
2.1600000002793968, 2.2800000002793968, 2.4000000002793968,
|
||||
2.5500000002793968, 2.7000000002793968, 2.8500000002793968,
|
||||
3.0000000002793968, 3.1200000002793968, 3.2400000002793968,
|
||||
3.3600000002793968, 3.4800000002793968, 3.6000000002793968
|
||||
],
|
||||
"Talent": [
|
||||
0.050000000372529, 0.055000000372529, 0.060000000372529,
|
||||
0.065000000372529, 0.070000000372529, 0.075000000372529,
|
||||
0.081300000372529, 0.087500000372529, 0.093800000372529,
|
||||
0.100000000372529, 0.105000000372529, 0.110000000372529,
|
||||
0.115000000372529, 0.120000000372529, 0.125000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [140],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 2, "Normal"],
|
||||
"Normal1": ["attack", "瞬华", 3, "Normal1"],
|
||||
"Normal2": ["attack", "天矢阴", 5, "Normal2"],
|
||||
"Normal3": ["attack", "盘拏耀跃", 7, "Normal3"],
|
||||
"Ultra": ["attack", "终结技", 3, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1006": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
0.9800000004656613, 1.0790000004656613, 1.1760000005587935,
|
||||
1.2740000005587935, 1.3720000006519258, 1.4700000006519258,
|
||||
1.5925000007450581, 1.7150000007450581, 1.8375000008381903,
|
||||
1.9600000008381903, 2.0580000000931323, 2.1560000000931323,
|
||||
2.2540000001862645, 2.3520000001862645, 2.4500000002793968
|
||||
],
|
||||
"BPSkill_D": [
|
||||
0.075000000372529, 0.077500000372529, 0.080000000372529,
|
||||
0.082500000372529, 0.085000000372529, 0.087500000372529,
|
||||
0.090600000372529, 0.093800000372529, 0.096900000372529,
|
||||
0.100000000372529, 0.102500000372529, 0.105000000372529,
|
||||
0.107500000372529, 0.110000000372529, 0.112500000372529
|
||||
],
|
||||
"Ultra": [
|
||||
2.280000000372529, 2.432000000372529, 2.584000000372529,
|
||||
2.736000000372529, 2.888000000372529, 3.040000000372529,
|
||||
3.230000000372529, 3.420000000372529, 3.610000000372529,
|
||||
3.800000000372529, 3.952000000372529, 4.104000000372529,
|
||||
4.256000000372529, 4.408000000372529, 4.560000000372529
|
||||
],
|
||||
"Ultra_D": [
|
||||
0.360000000372529, 0.369000000372529, 0.378000000372529,
|
||||
0.387000000372529, 0.396000000372529, 0.405000000372529,
|
||||
0.416300000372529, 0.427500000372529, 0.438800000372529,
|
||||
0.450000000372529, 0.459000000372529, 0.468000000372529,
|
||||
0.477000000372529, 0.486000000372529, 0.495000000372529
|
||||
],
|
||||
"Talent": [
|
||||
0.040000000372529, 0.044000000372529, 0.048000000372529,
|
||||
0.052000000372529, 0.056000000372529, 0.040000000372529,
|
||||
0.060000000372529, 0.065000000372529, 0.070000000372529,
|
||||
0.075000000372529, 0.080000000372529, 0.084000000372529,
|
||||
0.088000000372529, 0.096000000372529, 0.100000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [110],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1005": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
0.8000000004656613, 0.8800000004656613, 0.9600000005587935,
|
||||
1.0400000005587935, 1.1200000006519258, 1.2000000006519258,
|
||||
1.3000000007450581, 1.4000000007450581, 1.5000000008381903,
|
||||
1.6000000008381903, 1.6800000000931323, 1.7600000000931323,
|
||||
1.8400000001862645, 1.9200000001862645, 2.0000000002793968
|
||||
],
|
||||
"Ultra": [
|
||||
0.480000000372529, 0.512000000372529, 0.544000000372529,
|
||||
0.576000000372529, 0.608000000372529, 0.640000000372529,
|
||||
0.680000000372529, 0.720000000372529, 0.760000000372529,
|
||||
0.800000000372529, 0.832000000372529, 0.864000000372529,
|
||||
0.896000000372529, 0.928000000372529, 0.960000000372529
|
||||
],
|
||||
"DOT": [
|
||||
1.1600000004656613, 1.2688000004656613, 1.3775000005587935,
|
||||
1.4863000005587935, 1.5950000006519258, 1.7581000006519258,
|
||||
1.9756000007450581, 2.2475000007450581, 2.5738000008381903,
|
||||
2.9000000008381903, 3.0414000000931323, 3.1828000000931323,
|
||||
3.3241000001862645, 3.4655000001862645, 3.6069000002793968
|
||||
],
|
||||
"Talent": [
|
||||
0.420000000372529, 0.518000000372529, 0.616000000372529,
|
||||
0.714000000372529, 0.812000000372529, 0.910000000372529,
|
||||
1.032500000372529, 1.155000000372529, 1.277500000372529,
|
||||
1.400000000372529, 1.498000000372529, 1.596000000372529,
|
||||
1.694000000372529, 1.792000000372529, 1.890000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [110],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"],
|
||||
"DOT": ["attack", "单次持续伤害", 1, "DOT"],
|
||||
"Talent": ["attack", "追加攻击", 1, "Talent"]
|
||||
}
|
||||
},
|
||||
"1205": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968, 1.3000000002793968
|
||||
],
|
||||
"Normal1": [
|
||||
0.2000000004656613, 0.2400000005587935, 0.2800000006519258,
|
||||
0.3200000007450581, 0.3600000008381903, 0.4000000000931323,
|
||||
0.4400000001862645, 0.4800000002793968, 0.5200000002793968
|
||||
],
|
||||
"Normal1_HP": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968, 1.3000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
0.1200000004656613, 0.1480000004656613, 0.1760000005587935,
|
||||
0.204000000372529, 0.232000000372529, 0.260000000372529,
|
||||
0.295000000372529, 0.330000000372529, 0.365000000372529,
|
||||
0.400000000372529, 0.428000000372529, 0.456000000372529,
|
||||
0.484000000372529, 0.512000000372529, 0.540000000372529
|
||||
],
|
||||
"Ultra": [
|
||||
0.240000000372529, 0.256000000372529, 0.272000000372529,
|
||||
0.288000000372529, 0.304000000372529, 0.320000000372529,
|
||||
0.340000000372529, 0.360000000372529, 0.380000000372529,
|
||||
0.400000000372529, 0.416000000372529, 0.432000000372529,
|
||||
0.448000000372529, 0.464000000372529, 0.480000000372529
|
||||
],
|
||||
"Ultra_HP": [
|
||||
1.500000000372529, 1.540000000372529, 1.580000000372529,
|
||||
1.620000000372529, 1.660000000372529, 1.700000000372529,
|
||||
1.750000000372529, 1.800000000372529, 1.850000000372529,
|
||||
1.900000000372529, 1.940000000372529, 1.980000000372529,
|
||||
2.020000000372529, 2.060000000372529, 2.100000000372529
|
||||
],
|
||||
"Talent": [
|
||||
0.220000000372529, 0.242000000372529, 0.264000000372529,
|
||||
0.286000000372529, 0.308000000372529, 0.330000000372529,
|
||||
0.357500000372529, 0.385000000372529, 0.412500000372529,
|
||||
0.440000000372529, 0.462000000372529, 0.484000000372529,
|
||||
0.506000000372529, 0.528000000372529, 0.550000000372529
|
||||
],
|
||||
"Talent_HP": [
|
||||
0.550000000372529, 0.605000000372529, 0.660000000372529,
|
||||
0.715000000372529, 0.770000000372529, 0.825000000372529,
|
||||
0.893800000372529, 0.962500000372529, 1.031300000372529,
|
||||
1.100000000372529, 1.155000000372529, 1.210000000372529,
|
||||
1.265000000372529, 1.320000000372529, 1.375000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [110],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"Normal1": ["attack", "无间剑树", 1, "Normal1"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"],
|
||||
"Talent": ["attack", "追加攻击", 1, "Talent"]
|
||||
}
|
||||
},
|
||||
"1208": {
|
||||
"Normal": [0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"Normal_HP": [
|
||||
0.2500000004656613, 0.3000000005587935, 0.3500000006519258,
|
||||
0.4000000007450581, 0.4500000008381903, 0.5000000000931323,
|
||||
0.5500000001862645, 0.6000000002793968, 0.6500000002793968
|
||||
],
|
||||
"BPSkill_HP": [
|
||||
0.0300000004656613, 0.0330000004656613, 0.0360000005587935,
|
||||
0.039000000372529, 0.042000000372529, 0.045000000372529,
|
||||
0.048800000372529, 0.052500000372529, 0.056300000372529,
|
||||
0.060000000372529, 0.063000000372529, 0.066000000372529,
|
||||
0.069000000372529, 0.072000000372529, 0.075000000372529
|
||||
],
|
||||
"BPSkill_CC": [
|
||||
0.0600000004656613, 0.0660000004656613, 0.0720000005587935,
|
||||
0.078000000372529, 0.084000000372529, 0.090000000372529,
|
||||
0.097500000372529, 0.105000000372529, 0.112500000372529,
|
||||
0.120000000372529, 0.126000000372529, 0.132000000372529,
|
||||
0.138000000372529, 0.144000000372529, 0.150000000372529
|
||||
],
|
||||
"Ultra": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
"Ultra_HP": [
|
||||
0.600000000372529, 0.640000000372529, 0.680000000372529,
|
||||
0.720000000372529, 0.760000000372529, 0.800000000372529,
|
||||
0.850000000372529, 0.900000000372529, 0.950000000372529,
|
||||
1.000000000372529, 1.040000000372529, 1.080000000372529,
|
||||
1.120000000372529, 1.160000000372529, 1.200000000372529
|
||||
],
|
||||
"Talent": [
|
||||
0.220000000372529, 0.242000000372529, 0.264000000372529,
|
||||
0.286000000372529, 0.308000000372529, 0.330000000372529,
|
||||
0.357500000372529, 0.385000000372529, 0.412500000372529,
|
||||
0.440000000372529, 0.462000000372529, 0.484000000372529,
|
||||
0.506000000372529, 0.528000000372529, 0.550000000372529
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [135],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1104": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968, 1.3000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
1.0000000004656613, 1.1000000004656613, 1.2000000005587935,
|
||||
1.300000000372529, 1.400000000372529, 1.500000000372529,
|
||||
1.625000000372529, 1.750000000372529, 1.875000000372529,
|
||||
2.000000000372529, 2.100000000372529, 2.200000000372529,
|
||||
2.300000000372529, 2.400000000372529, 2.500000000372529
|
||||
],
|
||||
"Ultra": [
|
||||
0.300000000372529, 0.318800000372529, 0.337500000372529,
|
||||
0.356300000372529, 0.375000000372529, 0.390000000372529,
|
||||
0.405000000372529, 0.420000000372529, 0.435000000372529,
|
||||
0.450000000372529, 0.465000000372529, 0.480000000372529,
|
||||
0.495000000372529, 0.510000000372529, 0.525000000372529
|
||||
],
|
||||
"Ultra_G": [
|
||||
150, 240, 308, 375, 420, 465, 499, 533, 566, 600, 634, 668, 701,
|
||||
735, 769
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [110],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["defence", "终结技(护盾)", 1, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1209": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
1.1000000000931323, 1.2100000001955777, 1.3200000002980232,
|
||||
1.4300000004004687, 1.5400000005029142, 1.6500000006053597,
|
||||
1.7875000005587935, 1.9250000005122274, 2.0625000002328306,
|
||||
2.2000000001862645, 2.31000000028871, 2.4200000003911555,
|
||||
2.530000000493601, 2.6400000005960464, 2.750000000698492
|
||||
],
|
||||
"Ultra": [
|
||||
2.1000000005122274, 2.2400000006705523, 2.380000000828877,
|
||||
2.5200000000558794, 2.660000000214204, 2.800000000372529,
|
||||
2.975000000745058, 3.150000000419095, 3.332499999860302,
|
||||
3.500000000232831, 3.6400000003911555, 3.78000000054948,
|
||||
3.920000000707805, 4.06000000086613, 4.200000000093132
|
||||
],
|
||||
"Ultra_CD": [
|
||||
0.3000000005122274, 0.3200000006705523, 0.340000000828877,
|
||||
0.3600000000558794, 0.380000000214204, 0.400000000372529,
|
||||
0.425000000745058, 0.450000000419095, 0.474999999860302,
|
||||
0.500000000232831, 0.5200000003911555, 0.54000000054948,
|
||||
0.560000000707805, 0.58000000086613, 0.600000000093132
|
||||
],
|
||||
"Talent": [
|
||||
0.25000000037252903, 0.27500000040978193, 0.30000000044703484,
|
||||
0.3250000004842877, 0.3500000005215406, 0.3750000005587935,
|
||||
0.4063000006053597, 0.4375000006519258, 0.4688000006984919,
|
||||
0.5000000007450581, 0.525000000782311, 0.5500000008195639,
|
||||
0.5750000008568168, 0.6000000008940697, 0.6250000008940697
|
||||
],
|
||||
"Talent_CC": [
|
||||
0.15000000037252903, 0.15500000040978193, 0.16000000044703484,
|
||||
0.1650000004842877, 0.1700000005215406, 0.1750000005587935,
|
||||
0.1813000006053597, 0.1875000006519258, 0.1938000006984919,
|
||||
0.2000000007450581, 0.205000000782311, 0.2100000008195639,
|
||||
0.2150000008568168, 0.2200000008940697, 0.2250000008940697
|
||||
],
|
||||
"Talent_CD": [
|
||||
0.15000000037252903, 0.16500000040978193, 0.18000000044703484,
|
||||
0.1950000004842877, 0.2100000005215406, 0.2250000005587935,
|
||||
0.2438000006053597, 0.2625000006519258, 0.2813000006984919,
|
||||
0.3000000007450581, 0.315000000782311, 0.3300000008195639,
|
||||
0.3450000008568168, 0.3600000008940697, 0.3750000008940697
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [120],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"],
|
||||
"Talent": ["attack", "附加伤害", 1, "Talent"]
|
||||
}
|
||||
},
|
||||
"1004": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
1.0800000000931323, 1.1880000001955777, 1.2960000002980232,
|
||||
1.4040000004004687, 1.5120000005029142, 1.6200000006053597,
|
||||
1.7550000005587935, 1.8900000005122274, 2.0550000002328306,
|
||||
2.1600000001862645, 2.26800000028871, 2.3760000003911555,
|
||||
2.484000000493601, 2.5920000005960464, 2.700000000698492
|
||||
],
|
||||
"Ultra": [
|
||||
0.9000000005122274, 0.9600000006705523, 1.020000000828877,
|
||||
1.0800000000558794, 1.140000000214204, 1.200000000372529,
|
||||
1.275000000745058, 1.350000000419095, 1.424999999860302,
|
||||
1.500000000232831, 1.5600000003911555, 1.62000000054948,
|
||||
1.680000000707805, 1.74000000086613, 1.800000000093132
|
||||
],
|
||||
"Talent": [
|
||||
0.30000000037252903, 0.33000000040978193, 0.36000000044703484,
|
||||
0.3900000004842877, 0.4200000005215406, 0.4500000005587935,
|
||||
0.4875000006053597, 0.525000006519258, 0.5625000006984919,
|
||||
0.6000000007450581, 0.63000000782311, 0.6600000008195639,
|
||||
0.6900000008568168, 0.7200000008940697, 0.7500000008940697
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [120],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 3, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1003": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
1.0000000000931323, 1.1000000001955777, 1.2000000002980232,
|
||||
1.3000000004004687, 1.4000000005029142, 1.5000000006053597,
|
||||
1.6250000005587935, 1.7500000005122274, 1.8750000002328306,
|
||||
2.0000000001862645, 2.10000000028871, 2.2000000003911555,
|
||||
2.300000000493601, 2.4000000005960464, 2.500000000698492
|
||||
],
|
||||
"Ultra": [
|
||||
1.3800000005122274, 1.4720000006705523, 1.564000000828877,
|
||||
1.6560000000558794, 1.748000000214204, 1.840000000372529,
|
||||
1.955000000745058, 2.070000000419095, 2.185000000860302,
|
||||
2.300000000232831, 2.3920000003911555, 2.48400000054948,
|
||||
2.596000000707805, 2.66800000086613, 2.76000000093132
|
||||
],
|
||||
"Talent": [
|
||||
0.70000000037252903, 0.77000000040978193, 0.84000000044703484,
|
||||
0.9100000004842877, 0.9800000005215406, 1.0500000005587935,
|
||||
1.1375000006053597, 1.225000006519258, 1.312500006984919,
|
||||
1.4000000007450581, 1.47000000782311, 1.5400000008195639,
|
||||
1.6100000008568168, 1.6800000008940697, 1.7500000008940697
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [120],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"],
|
||||
"Talent": ["attack", "追加攻击", 1, "Talent"]
|
||||
}
|
||||
},
|
||||
"1201": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968
|
||||
],
|
||||
"Normal1": [
|
||||
1.2000000000931323, 1.4400000001955777, 1.6800000002980232,
|
||||
1.9200000004004687, 2.1600000005029142, 2.4000000006053597,
|
||||
2.6450000005587935, 2.8800000005122274, 3.1200000002328306
|
||||
],
|
||||
"BPSkill": [
|
||||
0.14000000037252903, 0.15400000040978193, 0.16800000044703484,
|
||||
0.1820000004842877, 0.1960000005215406, 0.2100000005587935,
|
||||
0.2275000006053597, 0.2450000006519258, 0.2625000006984919,
|
||||
0.2800000007450581, 0.294000000782311, 0.3080000008195639,
|
||||
0.3220000008568168, 0.3360000008940697, 0.3500000008940697
|
||||
],
|
||||
"Ultra": [
|
||||
1.2000000005122274, 1.2800000006705523, 1.360000000828877,
|
||||
1.440000000558794, 1.520000000214204, 1.600000000372529,
|
||||
1.700000000745058, 1.800000000419095, 1.900000000860302,
|
||||
2.000000000232831, 2.0800000003911555, 2.16000000054948,
|
||||
2.240000000707805, 2.32000000086613, 2.40000000093132
|
||||
],
|
||||
"Talent": [
|
||||
0.36000000037252903, 0.39600000040978193, 0.43200000044703484,
|
||||
0.4680000004842877, 0.5040000005215406, 0.5400000005587935,
|
||||
0.5850000006053597, 0.6300000006519258, 0.6750000006984919,
|
||||
0.7200000007450581, 0.756000000782311, 0.7920000008195639,
|
||||
0.8280000008568168, 0.8640000008940697, 0.9000000008940697
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [140],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"Normal1": ["attack", "杠上开花!", 1, "Normal1"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"]
|
||||
}
|
||||
},
|
||||
"1212": {
|
||||
"Normal": [
|
||||
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
|
||||
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
|
||||
1.1000000001862645, 1.2000000002793968, 1.3000000002793968
|
||||
],
|
||||
"BPSkill": [
|
||||
1.0000000005122274, 1.1000000006705523, 1.200000000828877,
|
||||
1.300000000558794, 1.400000000214204, 1.500000000372529,
|
||||
1.630000000745058, 1.750000000419095, 1.880000000860302,
|
||||
2.000000000232831, 2.1000000003911555, 2.20000000054948,
|
||||
2.300000000707805, 2.40000000086613, 2.50000000093132
|
||||
],
|
||||
"BPSkill1": [
|
||||
1.2000000005122274, 1.3200000006705523, 1.440000000828877,
|
||||
1.560000000558794, 1.680000000214204, 1.800000000372529,
|
||||
1.950000000745058, 2.100000000419095, 2.250000000860302,
|
||||
2.400000000232831, 2.5200000003911555, 2.64000000054948,
|
||||
2.760000000707805, 2.88000000086613, 3.00000000093132
|
||||
],
|
||||
"Ultra": [
|
||||
1.8000000005122274, 1.9200000006705523, 2.040000000828877,
|
||||
2.160000000558794, 2.280000000214204, 2.400000000372529,
|
||||
2.550000000745058, 2.700000000419095, 2.850000000860302,
|
||||
3.000000000232831, 3.1200000003911555, 3.24000000054948,
|
||||
3.360000000707805, 3.48000000086613, 3.60000000093132
|
||||
],
|
||||
"Talent": [
|
||||
0.60000000037252903, 0.66000000040978193, 0.72000000044703484,
|
||||
0.7800000004842877, 0.8400000005215406, 0.9000000005587935,
|
||||
0.9800000006053597, 1.0500000006519258, 1.1200000006984919,
|
||||
1.2000000007450581, 1.260000000782311, 1.3200000008195639,
|
||||
1.3800000008568168, 1.4400000008940697, 1.5000000008940697
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [140],
|
||||
"skillList": {
|
||||
"Normal": ["attack", "普攻", 1, "Normal"],
|
||||
"BPSkill": ["attack", "战技", 1, "BPSkill"],
|
||||
"BPSkill1": ["attack", "寒川映月", 1, "BPSkill1"],
|
||||
"Ultra": ["attack", "终结技", 1, "Ultra"]
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,12 +1,11 @@
|
||||
from typing import Dict, List
|
||||
from collections import Counter
|
||||
from typing import Dict, List
|
||||
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ..utils import merge_attribute
|
||||
from ..Base.model import DamageInstanceRelic
|
||||
from ..Base.RelicBase import SingleRelic, BaseRelicSetSkill
|
||||
from ..Base.RelicBase import BaseRelicSetSkill, SingleRelic
|
||||
from ..utils import merge_attribute
|
||||
|
||||
|
||||
class Relic101(BaseRelicSetSkill):
|
||||
@ -40,9 +39,7 @@ class Relic102(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
a_dmg = attribute_bonus.get('NormalDmgAdd', 0)
|
||||
attribute_bonus['NormalDmgAdd'] = a_dmg + mp.mpf(
|
||||
0.10000000018626451
|
||||
)
|
||||
attribute_bonus['NormalDmgAdd'] = a_dmg + 0.10000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -62,7 +59,7 @@ class Relic103(BaseRelicSetSkill):
|
||||
shield_added_ratio = attribute_bonus.get('shield_added_ratio', 0)
|
||||
attribute_bonus[
|
||||
'shield_added_ratio'
|
||||
] = shield_added_ratio + mp.mpf(0.20000000018626451)
|
||||
] = shield_added_ratio + 0.20000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -82,7 +79,7 @@ class Relic104(BaseRelicSetSkill):
|
||||
critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalDamageBase'
|
||||
] = critical_damage_base + mp.mpf(0.25000000023283064)
|
||||
] = critical_damage_base + 0.25000000023283064
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -100,9 +97,7 @@ class Relic105(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio + mp.mpf(0.05000000004656613) * 5
|
||||
)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.05000000004656613 * 5
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -138,17 +133,11 @@ class Relic107(BaseRelicSetSkill):
|
||||
if self.pieces4:
|
||||
e_dmg = attribute_bonus.get('BPSkillDmgAdd', {})
|
||||
q_dmg = attribute_bonus.get('UltraSkillDmgAdd', {})
|
||||
attribute_bonus['BPSkillDmgAdd'] = e_dmg + mp.mpf(
|
||||
0.12000000011175871
|
||||
)
|
||||
attribute_bonus['UltraSkillDmgAdd'] = q_dmg + mp.mpf(
|
||||
0.12000000011175871
|
||||
)
|
||||
attribute_bonus['BPSkillDmgAdd'] = e_dmg + 0.12000000011175871
|
||||
attribute_bonus['UltraSkillDmgAdd'] = q_dmg + 0.12000000011175871
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
fire_added_ratio = attribute_bonus.get('FireAddedRatio', {})
|
||||
attribute_bonus['FireAddedRatio'] = fire_added_ratio + mp.mpf(
|
||||
0.12000000011175871
|
||||
)
|
||||
attribute_bonus['FireAddedRatio'] = fire_added_ratio + 0.12000000011175871
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -168,9 +157,7 @@ class Relic108(BaseRelicSetSkill):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
logger.info(attribute_bonus)
|
||||
ignore_defence = attribute_bonus.get('ignore_defence', 0)
|
||||
attribute_bonus['ignore_defence'] = (
|
||||
ignore_defence + mp.mpf(0.10000000009313226) * 2
|
||||
)
|
||||
attribute_bonus['ignore_defence'] = ignore_defence + 0.10000000009313226 * 2
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -189,9 +176,7 @@ class Relic109(BaseRelicSetSkill):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
logger.info(attribute_bonus)
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf(
|
||||
0.20000000018626451
|
||||
)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.20000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -251,13 +236,13 @@ class Relic112(BaseRelicSetSkill):
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + mp.mpf(0.10000000009313226)
|
||||
] = critical_chance_base + 0.10000000009313226
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
logger.info('对陷入禁锢状态的敌方目标造成伤害')
|
||||
critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalDamageBase'
|
||||
] = critical_damage_base + mp.mpf(0.20000000018626451)
|
||||
] = critical_damage_base + 0.20000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -277,9 +262,7 @@ class Relic113(BaseRelicSetSkill):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
logger.info('当装备者受到攻击或被我方目标消耗生命值后')
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base + mp.mpf(0.08000000009313226) * 2
|
||||
)
|
||||
attribute_bonus['CriticalChanceBase'] = critical_chance_base + 0.08000000009313226 * 2
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -298,9 +281,7 @@ class Relic114(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0)
|
||||
attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + mp.mpf(
|
||||
0.12000000011175871
|
||||
)
|
||||
attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + 0.12000000011175871
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -313,7 +294,7 @@ class Relic301(BaseRelicSetSkill):
|
||||
装备者的速度大于等于120
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['speed'] >= mp.mpf(120):
|
||||
if merged_attr['speed'] >= 120:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -321,9 +302,7 @@ class Relic301(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf(
|
||||
0.12000000011175871
|
||||
)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.12000000011175871
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -336,7 +315,7 @@ class Relic302(BaseRelicSetSkill):
|
||||
装备者的速度大于等于120
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['speed'] >= mp.mpf(120):
|
||||
if merged_attr['speed'] >= 120:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -344,9 +323,7 @@ class Relic302(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + mp.mpf(
|
||||
0.0800000000745058
|
||||
)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + 0.0800000000745058
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -365,8 +342,8 @@ class Relic303(BaseRelicSetSkill):
|
||||
status_probability = merged_attr.get('StatusProbabilityBase', 0)
|
||||
# 提高装备者等同于当前效果命中25%的攻击力,最多提高25%
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + min(
|
||||
mp.mpf(0.25000000023283064), status_probability / mp.mpf(0.25)
|
||||
)
|
||||
0.25000000023283064, status_probability / 0.25
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -379,7 +356,7 @@ class Relic304(BaseRelicSetSkill):
|
||||
备者的效果命中大于等于50%
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['StatusResistanceBase'] >= mp.mpf(0.5000000004656613):
|
||||
if merged_attr['StatusResistanceBase'] >= 0.5000000004656613:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -389,7 +366,7 @@ class Relic304(BaseRelicSetSkill):
|
||||
defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0)
|
||||
attribute_bonus[
|
||||
'DefenceAddedRatio'
|
||||
] = defence_added_ratio + mp.mpf(0.1500000001396984)
|
||||
] = defence_added_ratio + 0.1500000001396984
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -402,7 +379,7 @@ class Relic305(BaseRelicSetSkill):
|
||||
装备者的暴击伤害大于等于120%
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['CriticalDamageBase'] >= mp.mpf(1.2000000001862645):
|
||||
if merged_attr['CriticalDamageBase'] >= 1.2000000001862645:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -412,7 +389,7 @@ class Relic305(BaseRelicSetSkill):
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + mp.mpf(0.6000000005587935)
|
||||
] = critical_chance_base + 0.6000000005587935
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -425,7 +402,7 @@ class Relic306(BaseRelicSetSkill):
|
||||
装备者当前暴击率大于等于50%
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['CriticalChanceBase'] >= mp.mpf(0.5):
|
||||
if merged_attr['CriticalChanceBase'] >= 0.5:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -433,11 +410,9 @@ class Relic306(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
q_dmg = attribute_bonus.get('UltraDmgAdd', 0)
|
||||
attribute_bonus['UltraDmgAdd'] = q_dmg + mp.mpf(0.1500000001396984)
|
||||
attribute_bonus['UltraDmgAdd'] = q_dmg + 0.1500000001396984
|
||||
a3_dmg = attribute_bonus.get('TalentDmgAdd', 0)
|
||||
attribute_bonus['TalentDmgAdd'] = a3_dmg + mp.mpf(
|
||||
0.1500000001396984
|
||||
)
|
||||
attribute_bonus['TalentDmgAdd'] = a3_dmg + 0.1500000001396984
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -450,7 +425,7 @@ class Relic307(BaseRelicSetSkill):
|
||||
装备者的速度大于等于145
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['speed'] >= mp.mpf(145):
|
||||
if merged_attr['speed'] >= 145:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -462,7 +437,7 @@ class Relic307(BaseRelicSetSkill):
|
||||
)
|
||||
attribute_bonus[
|
||||
'BreakDamageAddedRatioBase'
|
||||
] = break_damage_added_ratio_base + mp.mpf(0.20000000018626451)
|
||||
] = break_damage_added_ratio_base + 0.20000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -475,7 +450,7 @@ class Relic308(BaseRelicSetSkill):
|
||||
装备者的速度大于等于120
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['speed'] >= mp.mpf(120):
|
||||
if merged_attr['speed'] >= 120:
|
||||
logger.info('Relic306 check success')
|
||||
return True
|
||||
return None
|
||||
@ -495,7 +470,7 @@ class Relic309(BaseRelicSetSkill):
|
||||
当装备者的当前暴击率大于等于70%时,普攻和战技造成的伤害提高20%。
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['CriticalChanceBase'] >= mp.mpf(0.7):
|
||||
if merged_attr['CriticalChanceBase'] >= 0.7:
|
||||
logger.info('Relic309 check success')
|
||||
return True
|
||||
return None
|
||||
@ -503,13 +478,9 @@ class Relic309(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
a_dmg = attribute_bonus.get('NormalDmgAdd', 0)
|
||||
attribute_bonus['NormalDmgAdd'] = a_dmg + mp.mpf(
|
||||
0.20000000018626451
|
||||
)
|
||||
attribute_bonus['NormalDmgAdd'] = a_dmg + 0.20000000018626451
|
||||
a2_dmg = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
attribute_bonus['BPSkillDmgAdd'] = a2_dmg + mp.mpf(
|
||||
0.20000000018626451
|
||||
)
|
||||
attribute_bonus['BPSkillDmgAdd'] = a2_dmg + 0.20000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -522,7 +493,7 @@ class Relic310(BaseRelicSetSkill):
|
||||
当装备者的效果抵抗大于等于30%时,我方全体暴击伤害提高10%。
|
||||
'''
|
||||
merged_attr = await merge_attribute(base_attr, attribute_bonus)
|
||||
if merged_attr['StatusResistanceBase'] >= mp.mpf(0.3):
|
||||
if merged_attr['StatusResistanceBase'] >= 0.3:
|
||||
logger.info('Relic310 check success')
|
||||
return True
|
||||
return None
|
||||
@ -532,7 +503,7 @@ class Relic310(BaseRelicSetSkill):
|
||||
critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalDamageBase'
|
||||
] = critical_damage_base + mp.mpf(0.10000000018626451)
|
||||
] = critical_damage_base + 0.10000000018626451
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
from mpmath import mp
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from .Avatar.Avatar import Avatar
|
||||
from .Weapon.Weapon import Weapon
|
||||
from .utils import merge_attribute
|
||||
from ..mono.Character import Character
|
||||
from .Avatar.Avatar import Avatar
|
||||
from .Base.model import DamageInstance
|
||||
from .Relic.Relic import RelicSet, SingleRelic
|
||||
|
||||
mp.dps = 14
|
||||
from .utils import merge_attribute
|
||||
from .Weapon.Weapon import Weapon
|
||||
|
||||
|
||||
class RoleInstance:
|
||||
@ -19,10 +16,9 @@ class RoleInstance:
|
||||
self.weapon = Weapon.create(self.raw_data.weapon)
|
||||
self.relic_set = RelicSet.create(self.raw_data.relic)
|
||||
|
||||
self.base_attr = {}
|
||||
self.base_attr = self.cal_role_base_attr()
|
||||
self.attribute_bonus = {}
|
||||
|
||||
self.cal_role_base_attr()
|
||||
self.cal_relic_attr_add()
|
||||
self.cal_avatar_attr_add()
|
||||
self.cal_avatar_eidolon_add()
|
||||
@ -30,24 +26,23 @@ class RoleInstance:
|
||||
|
||||
def cal_role_base_attr(self):
|
||||
logger.info('cal_role_base_attr')
|
||||
avatar_attribute = self.avatar.__dict__['avatar_attribute']
|
||||
logger.info(avatar_attribute)
|
||||
for attribute in avatar_attribute:
|
||||
if attribute in self.base_attr:
|
||||
self.base_attr[attribute] += avatar_attribute[attribute]
|
||||
base_attr = {}
|
||||
avatar_attribute = self.avatar.avatar_attribute
|
||||
for attr_name, attr_value in avatar_attribute.items():
|
||||
if attr_name in base_attr:
|
||||
base_attr[attr_name] += attr_value
|
||||
else:
|
||||
self.base_attr[attribute] = avatar_attribute[attribute]
|
||||
base_attr[attr_name] = attr_value
|
||||
|
||||
weapon_attribute = self.weapon.__dict__['weapon_base_attribute']
|
||||
for attribute in weapon_attribute:
|
||||
if attribute in self.base_attr:
|
||||
self.base_attr[attribute] += weapon_attribute[attribute]
|
||||
weapon_attribute = self.weapon.weapon_base_attribute
|
||||
for attr_name, attr_value in weapon_attribute.items():
|
||||
if attr_name in base_attr:
|
||||
base_attr[attr_name] += attr_value
|
||||
else:
|
||||
self.base_attr[attribute] = weapon_attribute[attribute]
|
||||
base_attr[attr_name] = attr_value
|
||||
return base_attr
|
||||
|
||||
def cal_relic_attr_add(self):
|
||||
if self.attribute_bonus is None:
|
||||
raise Exception('attribute_bonus is None')
|
||||
# 单件属性
|
||||
for relic_type in self.relic_set.__dict__:
|
||||
if type(self.relic_set.__dict__[relic_type]) == SingleRelic:
|
||||
@ -80,17 +75,13 @@ class RoleInstance:
|
||||
for bonus in attribute_bonus:
|
||||
status_add = bonus.statusAdd
|
||||
bonus_property = status_add.property
|
||||
value = mp.mpf(status_add.value)
|
||||
if self.attribute_bonus is None:
|
||||
raise Exception('attribute_bonus is None')
|
||||
value = status_add.value
|
||||
if bonus_property in self.attribute_bonus:
|
||||
self.attribute_bonus[bonus_property] += value
|
||||
else:
|
||||
self.attribute_bonus[bonus_property] = value
|
||||
|
||||
def cal_avatar_eidolon_add(self):
|
||||
if self.attribute_bonus is None:
|
||||
raise Exception('attribute_bonus is None')
|
||||
for attribute in self.avatar.eidolon_attribute:
|
||||
if attribute in self.attribute_bonus:
|
||||
self.attribute_bonus[
|
||||
@ -111,19 +102,17 @@ class RoleInstance:
|
||||
] = self.avatar.extra_ability_attribute[attribute]
|
||||
|
||||
def cal_weapon_attr_add(self):
|
||||
if self.attribute_bonus is None:
|
||||
raise Exception('attribute_bonus is None')
|
||||
for attribute in self.weapon.__dict__['weapon_attribute']:
|
||||
for attribute in self.weapon.weapon_attribute:
|
||||
if attribute in self.attribute_bonus:
|
||||
self.attribute_bonus[attribute] += self.weapon.__dict__[
|
||||
'weapon_attribute'
|
||||
][attribute]
|
||||
self.attribute_bonus[attribute] += self.weapon.weapon_attribute[
|
||||
attribute
|
||||
]
|
||||
else:
|
||||
self.attribute_bonus[attribute] = self.weapon.__dict__[
|
||||
'weapon_attribute'
|
||||
][attribute]
|
||||
self.attribute_bonus[attribute] = self.weapon.weapon_attribute[
|
||||
attribute
|
||||
]
|
||||
|
||||
async def cal_damage(self, skill_type):
|
||||
async def cal_damage(self, skill_type: str):
|
||||
logger.info('base_attr')
|
||||
logger.info(self.base_attr)
|
||||
logger.info('attribute_bonus')
|
||||
@ -189,20 +178,16 @@ class RoleInstance:
|
||||
)
|
||||
self.attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + mp.mpf(fx_cc_up)
|
||||
] = critical_chance_base + fx_cc_up
|
||||
|
||||
hp_added_ratio = self.attribute_bonus.get('HPAddedRatio', 0)
|
||||
self.attribute_bonus['HPAddedRatio'] = hp_added_ratio + mp.mpf(
|
||||
fx_hp_up
|
||||
)
|
||||
self.attribute_bonus['HPAddedRatio'] = hp_added_ratio + fx_hp_up
|
||||
|
||||
# 检查武器战斗生效的buff
|
||||
logger.info('检查武器战斗生效的buff')
|
||||
Ultra_Use = self.avatar.Ultra_Use()
|
||||
logger.info('Ultra_Use')
|
||||
logger.info(Ultra_Use)
|
||||
if self.attribute_bonus is None:
|
||||
raise Exception('attribute_bonus is None')
|
||||
self.attribute_bonus = await self.weapon.weapon_ability(
|
||||
Ultra_Use, self.base_attr, self.attribute_bonus
|
||||
)
|
||||
@ -210,19 +195,17 @@ class RoleInstance:
|
||||
|
||||
# 检查是否有对某一个技能的属性加成
|
||||
logger.info('检查是否有对某一个技能的属性加成')
|
||||
if self.attribute_bonus is None:
|
||||
raise Exception('attribute_bonus is None')
|
||||
for attr in self.attribute_bonus:
|
||||
# 攻击加成
|
||||
if attr.__contains__('AttackAddedRatio'):
|
||||
attr_name = attr.split('AttackAddedRatio')[0]
|
||||
attr_name: str = attr.split('AttackAddedRatio')[0]
|
||||
if attr_name == skill_type or attr_name == skill_info[3]:
|
||||
attack_added_ratio = self.attribute_bonus.get(
|
||||
'AttackAddedRatio', 0
|
||||
)
|
||||
self.attribute_bonus[
|
||||
'AttackAddedRatio'
|
||||
] = attack_added_ratio + mp.mpf(self.attribute_bonus[attr])
|
||||
] = attack_added_ratio + self.attribute_bonus[attr]
|
||||
# 效果命中加成
|
||||
if attr.__contains__('StatusProbabilityBase'):
|
||||
attr_name = attr.split('StatusProbabilityBase')[0]
|
||||
@ -232,7 +215,7 @@ class RoleInstance:
|
||||
)
|
||||
self.attribute_bonus[
|
||||
'StatusProbabilityBase'
|
||||
] = status_probability + mp.mpf(self.attribute_bonus[attr])
|
||||
] = status_probability + self.attribute_bonus[attr]
|
||||
logger.info(self.attribute_bonus)
|
||||
logger.info('检查遗器套装战斗生效的buff')
|
||||
for set_skill in self.relic_set.SetSkill:
|
||||
@ -565,6 +548,7 @@ class RoleInstance:
|
||||
if skill_info[0] == 'defence':
|
||||
defence = merged_attr['defence']
|
||||
logger.info(f'防御力: {defence}')
|
||||
defence_multiplier = 0
|
||||
|
||||
# 获取技能提供的固定护盾值
|
||||
if skill_type == 'Normal':
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,13 +1,10 @@
|
||||
import json
|
||||
from typing import Dict
|
||||
from collections import Counter
|
||||
from typing import Dict
|
||||
|
||||
from mpmath import mp
|
||||
from loguru import logger
|
||||
|
||||
from ...utils.map.SR_MAP_PATH import RelicSetSkill, EquipmentID2AbilityProperty
|
||||
|
||||
mp.dps = 14
|
||||
from ...utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty, RelicSetSkill
|
||||
|
||||
|
||||
class Character:
|
||||
@ -34,20 +31,6 @@ class Character:
|
||||
card_prop['rankList'] if card_prop.get('rankList') else []
|
||||
)
|
||||
|
||||
# 伤害计算
|
||||
self.def_ignore = 0
|
||||
self.q_dmg = 0
|
||||
self.q_crit_dmg = 0
|
||||
self.e_dmg = 0
|
||||
self.a_dmg = 0
|
||||
self.a3_dmg = 0
|
||||
|
||||
# 角色的圣遗物总分
|
||||
self.artifacts_all_score: float = 0
|
||||
self.percent: str = '0.0'
|
||||
self.dmg_data: Dict = {}
|
||||
self.seq_str: str = '无匹配'
|
||||
|
||||
async def get_equipment_info(self):
|
||||
if self.equipment == {}:
|
||||
return
|
||||
@ -61,16 +44,9 @@ class Character:
|
||||
equip_ability_property = ability_property[str(equip_rank)]
|
||||
|
||||
equip_add_base_attr = equip['baseAttributes']
|
||||
hp = mp.mpf(base_attr['hp']) + mp.mpf(equip_add_base_attr['hp'])
|
||||
attack = mp.mpf(base_attr['attack']) + mp.mpf(
|
||||
equip_add_base_attr['attack']
|
||||
)
|
||||
defence = mp.mpf(base_attr['defence']) + mp.mpf(
|
||||
equip_add_base_attr['defence']
|
||||
)
|
||||
base_attr['hp'] = str(hp)
|
||||
base_attr['attack'] = str(attack)
|
||||
base_attr['defence'] = str(defence)
|
||||
base_attr['hp'] = base_attr['hp'] + equip_add_base_attr['hp']
|
||||
base_attr['attack'] = base_attr['attack'] + equip_add_base_attr['attack']
|
||||
base_attr['defence'] = base_attr['defence'] + equip_add_base_attr['defence']
|
||||
self.base_attributes = base_attr
|
||||
|
||||
for equip_ability in equip_ability_property:
|
||||
@ -99,23 +75,23 @@ class Character:
|
||||
set_id_list.append(relic['SetId'])
|
||||
# 处理主属性
|
||||
relic_property = relic['MainAffix']['Property']
|
||||
property_value = mp.mpf(relic['MainAffix']['Value'])
|
||||
property_value = relic['MainAffix']['Value']
|
||||
if relic_property in self.add_attr:
|
||||
self.add_attr[relic_property] = str(
|
||||
mp.mpf(self.add_attr[relic_property]) + property_value
|
||||
self.add_attr[relic_property] = (
|
||||
self.add_attr[relic_property] + property_value
|
||||
)
|
||||
else:
|
||||
self.add_attr[relic_property] = str(property_value)
|
||||
self.add_attr[relic_property] = property_value
|
||||
# 处理副词条
|
||||
for sub in relic['SubAffixList']:
|
||||
sub_property = sub['Property']
|
||||
sub_value = mp.mpf(sub['Value'])
|
||||
sub_value = sub['Value']
|
||||
if sub_property in self.add_attr:
|
||||
self.add_attr[sub_property] = str(
|
||||
mp.mpf(self.add_attr[sub_property]) + sub_value
|
||||
self.add_attr[sub_property] = (
|
||||
self.add_attr[sub_property] + sub_value
|
||||
)
|
||||
else:
|
||||
self.add_attr[sub_property] = str(sub_value)
|
||||
self.add_attr[sub_property] = sub_value
|
||||
# 处理套装属性
|
||||
set_id_dict = Counter(set_id_list)
|
||||
for item in set_id_dict.most_common():
|
||||
@ -125,17 +101,17 @@ class Character:
|
||||
set_value = 0
|
||||
if count >= 2 and RelicSetSkill[str(set_id)]['2'] != {}:
|
||||
set_property = RelicSetSkill[str(set_id)]['2']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(set_id)]['2']['Value'])
|
||||
set_value = RelicSetSkill[str(set_id)]['2']['Value']
|
||||
if count == 4 and RelicSetSkill[str(set_id)]['4'] != {}:
|
||||
set_property = RelicSetSkill[str(set_id)]['4']['Property']
|
||||
set_value = mp.mpf(RelicSetSkill[str(set_id)]['4']['Value'])
|
||||
set_value = RelicSetSkill[str(set_id)]['4']['Value']
|
||||
if set_property != '':
|
||||
if set_property in self.add_attr:
|
||||
self.add_attr[set_property] = str(
|
||||
mp.mpf(self.add_attr[set_property]) + set_value
|
||||
self.add_attr[set_property] = (
|
||||
self.add_attr[set_property] + set_value
|
||||
)
|
||||
else:
|
||||
self.add_attr[set_property] = str(set_value)
|
||||
self.add_attr[set_property] = set_value
|
||||
|
||||
logger.info(json.dumps(self.base_attributes))
|
||||
logger.info(json.dumps(self.add_attr))
|
||||
|
@ -55,7 +55,6 @@ async def draw_enka_card(uid: str, char_list: List, showfrom: int = 0):
|
||||
return await convert_img(Image.new('RGBA', (0, 1), (255, 255, 255)))
|
||||
else:
|
||||
line1 = f'UID {uid} 刷新成功'
|
||||
# print(char_list)
|
||||
line2 = f'可以使用 sr查询{char_data_list[0]["avatarName"]} 查询详情角色面板'
|
||||
char_num = len(char_data_list)
|
||||
if char_num <= 4:
|
||||
|
@ -1,39 +1,34 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import List, Union, Optional
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from mpmath import mp
|
||||
from httpx import ReadTimeout
|
||||
|
||||
from ..utils.error_reply import UID_HINT
|
||||
from ..sruid_utils.api.mihomo import MihomoData
|
||||
from ..sruid_utils.api.mihomo.models import Avatar
|
||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||
from ..sruid_utils.api.mihomo.requests import get_char_card_info
|
||||
|
||||
# from gsuid_core.utils.api.minigg.request import get_weapon_info
|
||||
from .cal_value import cal_relic_sub_affix, cal_relic_main_affix
|
||||
from ..utils.excel.read_excel import AvatarPromotion, EquipmentPromotion
|
||||
from ..utils.error_reply import UID_HINT
|
||||
from ..utils.excel.model import AvatarPromotionConfig, EquipmentPromotionConfig
|
||||
from ..utils.map.SR_MAP_PATH import (
|
||||
SetId2Name,
|
||||
AvatarRankSkillUp,
|
||||
EquipmentID2Name,
|
||||
EquipmentID2Rarity,
|
||||
ItemId2Name,
|
||||
Property2Name,
|
||||
RelicId2SetId,
|
||||
EquipmentID2Name,
|
||||
AvatarRankSkillUp,
|
||||
EquipmentID2Rarity,
|
||||
rankId2Name,
|
||||
skillId2Name,
|
||||
avatarId2Name,
|
||||
skillId2Effect,
|
||||
SetId2Name,
|
||||
avatarId2DamageType,
|
||||
avatarId2EnName,
|
||||
avatarId2Name,
|
||||
avatarId2Rarity,
|
||||
characterSkillTree,
|
||||
rankId2Name,
|
||||
skillId2AttackType,
|
||||
avatarId2DamageType,
|
||||
skillId2Effect,
|
||||
skillId2Name,
|
||||
)
|
||||
|
||||
mp.dps = 14
|
||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||
from .cal_value import cal_relic_main_affix, cal_relic_sub_affix
|
||||
|
||||
|
||||
async def api_to_dict(
|
||||
@ -55,6 +50,8 @@ async def api_to_dict(
|
||||
sr_data = await get_char_card_info(sr_uid)
|
||||
except ReadTimeout:
|
||||
return '网络不太稳定...'
|
||||
except json.decoder.JSONDecodeError:
|
||||
return '网络不太稳定...'
|
||||
if isinstance(sr_data, str):
|
||||
return []
|
||||
if isinstance(sr_data, dict):
|
||||
@ -195,6 +192,7 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str):
|
||||
relic_type=relic['type'],
|
||||
relic_level=relic_temp['Level'],
|
||||
)
|
||||
print(affix_property)
|
||||
relic_temp['MainAffix']['Property'] = affix_property
|
||||
relic_temp['MainAffix']['Name'] = Property2Name[affix_property]
|
||||
relic_temp['MainAffix']['Value'] = value
|
||||
@ -253,42 +251,42 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str):
|
||||
|
||||
# 处理基础属性
|
||||
base_attributes = {}
|
||||
avatar_promotion_base = AvatarPromotion[str(char['avatarId'])][
|
||||
avatar_promotion_base = AvatarPromotionConfig.Avatar[str(char['avatarId'])][
|
||||
str(char.get('promotion', 0))
|
||||
]
|
||||
|
||||
# 攻击力
|
||||
base_attributes['attack'] = str(
|
||||
mp.mpf(avatar_promotion_base["AttackBase"]['Value'])
|
||||
+ mp.mpf(avatar_promotion_base["AttackAdd"]['Value'])
|
||||
base_attributes['attack'] = (
|
||||
avatar_promotion_base.AttackBase.Value
|
||||
+ avatar_promotion_base.AttackAdd.Value
|
||||
* (char['level'] - 1)
|
||||
)
|
||||
# 防御力
|
||||
base_attributes['defence'] = str(
|
||||
mp.mpf(avatar_promotion_base["DefenceBase"]['Value'])
|
||||
+ mp.mpf(avatar_promotion_base["DefenceAdd"]['Value'])
|
||||
base_attributes['defence'] = (
|
||||
avatar_promotion_base.DefenceBase.Value
|
||||
+ avatar_promotion_base.DefenceAdd.Value
|
||||
* (char['level'] - 1)
|
||||
)
|
||||
# 血量
|
||||
base_attributes['hp'] = str(
|
||||
mp.mpf(avatar_promotion_base["HPBase"]['Value'])
|
||||
+ mp.mpf(avatar_promotion_base["HPAdd"]['Value']) * (char['level'] - 1)
|
||||
base_attributes['hp'] = (
|
||||
avatar_promotion_base.HPBase.Value
|
||||
+ avatar_promotion_base.HPAdd.Value * (char['level'] - 1)
|
||||
)
|
||||
# 速度
|
||||
base_attributes['speed'] = str(
|
||||
mp.mpf(avatar_promotion_base["SpeedBase"]['Value'])
|
||||
base_attributes['speed'] = (
|
||||
avatar_promotion_base.SpeedBase.Value
|
||||
)
|
||||
# 暴击率
|
||||
base_attributes['CriticalChanceBase'] = str(
|
||||
mp.mpf(avatar_promotion_base["CriticalChance"]['Value'])
|
||||
base_attributes['CriticalChanceBase'] = (
|
||||
avatar_promotion_base.CriticalChance.Value
|
||||
)
|
||||
# 暴击伤害
|
||||
base_attributes['CriticalDamageBase'] = str(
|
||||
mp.mpf(avatar_promotion_base["CriticalDamage"]['Value'])
|
||||
base_attributes['CriticalDamageBase'] = (
|
||||
avatar_promotion_base.CriticalDamage.Value
|
||||
)
|
||||
# 嘲讽
|
||||
base_attributes['BaseAggro'] = str(
|
||||
mp.mpf(avatar_promotion_base["BaseAggro"]['Value'])
|
||||
base_attributes['BaseAggro'] = (
|
||||
avatar_promotion_base.BaseAggro.Value
|
||||
)
|
||||
|
||||
char_data['baseAttributes'] = base_attributes
|
||||
@ -311,26 +309,26 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str):
|
||||
str(char['equipment']['tid'])
|
||||
]
|
||||
equipment_base_attributes = {}
|
||||
equipment_promotion_base = EquipmentPromotion[
|
||||
equipment_promotion_base = EquipmentPromotionConfig.Equipment[
|
||||
str(char['equipment']['tid'])
|
||||
][str(equipment_info['equipmentPromotion'])]
|
||||
|
||||
# 生命值
|
||||
equipment_base_attributes['hp'] = str(
|
||||
mp.mpf(equipment_promotion_base["BaseHP"]['Value'])
|
||||
+ mp.mpf(equipment_promotion_base["BaseHPAdd"]['Value'])
|
||||
equipment_base_attributes['hp'] = (
|
||||
equipment_promotion_base.BaseHP.Value
|
||||
+ equipment_promotion_base.BaseHPAdd.Value
|
||||
* (char['equipment']['level'] - 1)
|
||||
)
|
||||
# 攻击力
|
||||
equipment_base_attributes['attack'] = str(
|
||||
mp.mpf(equipment_promotion_base["BaseAttack"]['Value'])
|
||||
+ mp.mpf(equipment_promotion_base["BaseAttackAdd"]['Value'])
|
||||
equipment_base_attributes['attack'] = (
|
||||
equipment_promotion_base.BaseAttack.Value
|
||||
+ equipment_promotion_base.BaseAttackAdd.Value
|
||||
* (char['equipment']['level'] - 1)
|
||||
)
|
||||
# 防御力
|
||||
equipment_base_attributes['defence'] = str(
|
||||
mp.mpf(equipment_promotion_base["BaseDefence"]['Value'])
|
||||
+ mp.mpf(equipment_promotion_base["BaseDefenceAdd"]['Value'])
|
||||
equipment_base_attributes['defence'] = (
|
||||
equipment_promotion_base.BaseDefence.Value
|
||||
+ equipment_promotion_base.BaseDefenceAdd.Value
|
||||
* (char['equipment']['level'] - 1)
|
||||
)
|
||||
equipment_info['baseAttributes'] = equipment_base_attributes
|
||||
|
@ -1,30 +1,31 @@
|
||||
import math
|
||||
from pathlib import Path
|
||||
from typing import List, Union, Optional
|
||||
from typing import List, Optional, Union
|
||||
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
from gsuid_core.logger import logger
|
||||
from gsuid_core.utils.error_reply import get_error
|
||||
from gsuid_core.utils.image.image_tools import (
|
||||
get_qq_avatar,
|
||||
draw_pic_with_ring,
|
||||
get_qq_avatar,
|
||||
)
|
||||
|
||||
from .utils import get_icon
|
||||
from ..sruid_utils.api.mys.models import (
|
||||
LocustBlocks,
|
||||
RogueAvatar,
|
||||
RogueBuffitems,
|
||||
RogueMiracles,
|
||||
)
|
||||
from ..utils.convert import GsCookie
|
||||
from ..utils.image.convert import convert_img
|
||||
from ..utils.fonts.starrail_fonts import (
|
||||
sr_font_22,
|
||||
sr_font_28,
|
||||
sr_font_34,
|
||||
sr_font_42,
|
||||
)
|
||||
from ..sruid_utils.api.mys.models import (
|
||||
RogueAvatar,
|
||||
LocustBlocks,
|
||||
RogueMiracles,
|
||||
RogueBuffitems,
|
||||
)
|
||||
from ..utils.image.convert import convert_img
|
||||
from .utils import get_icon
|
||||
|
||||
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
||||
white_color = (255, 255, 255)
|
||||
@ -585,6 +586,7 @@ async def draw_rogue_locust_img(
|
||||
detail_h = detail_h + miracles_h
|
||||
|
||||
# 事件
|
||||
blocks_h = 0
|
||||
if len(detail['blocks']) > 0:
|
||||
blocks_h = 60
|
||||
blocks_num = len(detail['blocks'])
|
||||
|
245
StarRailUID/utils/excel/model.py
Normal file
245
StarRailUID/utils/excel/model.py
Normal file
@ -0,0 +1,245 @@
|
||||
from typing import Dict, List
|
||||
|
||||
from msgspec import Struct
|
||||
|
||||
from .read_excel import (
|
||||
AvatarPromotion,
|
||||
EquipmentPromotion,
|
||||
RelicMainAffix,
|
||||
RelicSubAffix,
|
||||
)
|
||||
|
||||
|
||||
class PromotionCost(Struct):
|
||||
ItemID: int
|
||||
ItemNum: int
|
||||
|
||||
|
||||
class PromotionAttr(Struct):
|
||||
Value: float
|
||||
|
||||
|
||||
class SingleAvatarPromotion(Struct):
|
||||
AvatarID: int
|
||||
Promotion: int
|
||||
PromotionCostList: List[PromotionCost]
|
||||
MaxLevel: int
|
||||
PlayerLevelRequire: int | None
|
||||
WorldLevelRequire: int | None
|
||||
AttackBase: PromotionAttr
|
||||
AttackAdd: PromotionAttr
|
||||
DefenceBase: PromotionAttr
|
||||
DefenceAdd: PromotionAttr
|
||||
HPBase: PromotionAttr
|
||||
HPAdd: PromotionAttr
|
||||
SpeedBase: PromotionAttr
|
||||
CriticalChance: PromotionAttr
|
||||
CriticalDamage: PromotionAttr
|
||||
BaseAggro: PromotionAttr
|
||||
|
||||
|
||||
class SingleEquipmentPromotion(Struct):
|
||||
EquipmentID: int
|
||||
Promotion: int
|
||||
PromotionCostList: List[PromotionCost]
|
||||
MaxLevel: int
|
||||
PlayerLevelRequire: int | None
|
||||
WorldLevelRequire: int | None
|
||||
BaseHP: PromotionAttr
|
||||
BaseHPAdd: PromotionAttr
|
||||
BaseAttack: PromotionAttr
|
||||
BaseAttackAdd: PromotionAttr
|
||||
BaseDefence: PromotionAttr
|
||||
BaseDefenceAdd: PromotionAttr
|
||||
|
||||
|
||||
class SingleRelicMainAffix(Struct):
|
||||
GroupID: int
|
||||
AffixID: int
|
||||
Property: str
|
||||
BaseValue: PromotionAttr
|
||||
LevelAdd: PromotionAttr
|
||||
IsAvailable: bool
|
||||
|
||||
|
||||
class SingleRelicSubAffix(Struct):
|
||||
GroupID: int
|
||||
AffixID: int
|
||||
Property: str
|
||||
BaseValue: PromotionAttr
|
||||
StepValue: PromotionAttr
|
||||
StepNum: int
|
||||
|
||||
|
||||
class AvatarPromotionConfigModel(Struct):
|
||||
Avatar: Dict[str, Dict[str, SingleAvatarPromotion]]
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, data: Dict):
|
||||
return cls(
|
||||
Avatar={
|
||||
avatar_id: {
|
||||
promotion: SingleAvatarPromotion(
|
||||
AvatarID=promotion_dict[promotion]['AvatarID'],
|
||||
Promotion=promotion_dict[promotion]['Promotion'],
|
||||
PromotionCostList=[
|
||||
PromotionCost(
|
||||
ItemID=item['ItemID'],
|
||||
ItemNum=item['ItemNum']
|
||||
)
|
||||
for item in promotion_dict[promotion]['PromotionCostList']
|
||||
],
|
||||
PlayerLevelRequire=promotion_dict[promotion].get(
|
||||
'PlayerLevelRequire', None
|
||||
),
|
||||
WorldLevelRequire=promotion_dict[promotion].get(
|
||||
'WorldLevelRequire', None
|
||||
),
|
||||
MaxLevel=promotion_dict[promotion]['MaxLevel'],
|
||||
AttackBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['AttackBase']['Value']
|
||||
),
|
||||
AttackAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['AttackAdd']['Value']
|
||||
),
|
||||
DefenceBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['DefenceBase']['Value']
|
||||
),
|
||||
DefenceAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['DefenceAdd']['Value']
|
||||
),
|
||||
HPBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['HPBase']['Value']
|
||||
),
|
||||
HPAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['HPAdd']['Value']
|
||||
),
|
||||
SpeedBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['SpeedBase']['Value']
|
||||
),
|
||||
CriticalChance=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['CriticalChance']['Value']
|
||||
),
|
||||
CriticalDamage=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['CriticalDamage']['Value']
|
||||
),
|
||||
BaseAggro=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseAggro']['Value']
|
||||
)
|
||||
)
|
||||
for promotion in promotion_dict.keys()
|
||||
}
|
||||
for avatar_id, promotion_dict in data.items()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class EquipmentPromotionConfigModel(Struct):
|
||||
Equipment: Dict[str, Dict[str, SingleEquipmentPromotion]]
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, data: Dict):
|
||||
return cls(
|
||||
Equipment={
|
||||
equipment_id: {
|
||||
promotion: SingleEquipmentPromotion(
|
||||
EquipmentID=promotion_dict[promotion]['EquipmentID'],
|
||||
Promotion=promotion_dict[promotion]['Promotion'],
|
||||
PromotionCostList=[
|
||||
PromotionCost(
|
||||
ItemID=item['ItemID'],
|
||||
ItemNum=item['ItemNum']
|
||||
)
|
||||
for item in promotion_dict[promotion]['PromotionCostList']
|
||||
],
|
||||
PlayerLevelRequire=promotion_dict[promotion].get(
|
||||
'PlayerLevelRequire', None
|
||||
),
|
||||
WorldLevelRequire=promotion_dict[promotion].get(
|
||||
'WorldLevelRequire', None
|
||||
),
|
||||
MaxLevel=promotion_dict[promotion]['MaxLevel'],
|
||||
BaseHP=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseHP']['Value']
|
||||
),
|
||||
BaseHPAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseHPAdd']['Value']
|
||||
),
|
||||
BaseAttack=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseAttack']['Value']
|
||||
),
|
||||
BaseAttackAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseAttackAdd']['Value']
|
||||
),
|
||||
BaseDefence=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseDefence']['Value']
|
||||
),
|
||||
BaseDefenceAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseDefenceAdd']['Value']
|
||||
)
|
||||
)
|
||||
for promotion in promotion_dict.keys()
|
||||
}
|
||||
for equipment_id, promotion_dict in data.items()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class RelicMainAffixConfigModel(Struct):
|
||||
Relic: Dict[str, Dict[str, SingleRelicMainAffix]]
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, data: Dict):
|
||||
return cls(
|
||||
Relic={
|
||||
relic_id: {
|
||||
group_id: SingleRelicMainAffix(
|
||||
GroupID=affix_dict[group_id]['GroupID'],
|
||||
AffixID=affix_dict[group_id]['AffixID'],
|
||||
Property=affix_dict[group_id]['Property'],
|
||||
BaseValue=PromotionAttr(
|
||||
Value=affix_dict[group_id]['BaseValue']['Value']
|
||||
),
|
||||
LevelAdd=PromotionAttr(
|
||||
Value=affix_dict[group_id]['LevelAdd']['Value']
|
||||
),
|
||||
IsAvailable=affix_dict[group_id]['IsAvailable']
|
||||
)
|
||||
for group_id in affix_dict.keys()
|
||||
}
|
||||
for relic_id, affix_dict in data.items()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class RelicSubAffixConfigModel(Struct):
|
||||
Relic: Dict[str, Dict[str, SingleRelicSubAffix]]
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, data: Dict):
|
||||
return cls(
|
||||
Relic={
|
||||
relic_id: {
|
||||
group_id: SingleRelicSubAffix(
|
||||
GroupID=affix_dict[group_id]['GroupID'],
|
||||
AffixID=affix_dict[group_id]['AffixID'],
|
||||
Property=affix_dict[group_id]['Property'],
|
||||
BaseValue=PromotionAttr(
|
||||
Value=affix_dict[group_id]['BaseValue']['Value']
|
||||
),
|
||||
StepValue=PromotionAttr(
|
||||
Value=affix_dict[group_id]['StepValue']['Value']
|
||||
),
|
||||
StepNum=affix_dict[group_id]['StepNum']
|
||||
)
|
||||
for group_id in affix_dict.keys()
|
||||
}
|
||||
for relic_id, affix_dict in data.items()
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
AvatarPromotionConfig = AvatarPromotionConfigModel.from_json(AvatarPromotion)
|
||||
EquipmentPromotionConfig = EquipmentPromotionConfigModel.from_json(EquipmentPromotion)
|
||||
RelicMainAffixConfig = RelicMainAffixConfigModel.from_json(RelicMainAffix)
|
||||
RelicSubAffixConfig = RelicSubAffixConfigModel.from_json(RelicSubAffix)
|
@ -1,31 +1,31 @@
|
||||
import copy
|
||||
import time
|
||||
import random
|
||||
from string import digits, ascii_letters
|
||||
from typing import Any, Dict, Union, Optional, cast
|
||||
import time
|
||||
from string import ascii_letters, digits
|
||||
from typing import Any, Dict, Optional, Union, cast
|
||||
|
||||
from gsuid_core.utils.api.mys_api import _MysApi
|
||||
from gsuid_core.utils.api.mys.models import MysSign, SignInfo, SignList
|
||||
from gsuid_core.utils.api.mys.tools import (
|
||||
_random_int_ds,
|
||||
generate_os_ds,
|
||||
get_web_ds_token,
|
||||
)
|
||||
from gsuid_core.utils.api.mys_api import _MysApi
|
||||
|
||||
from .api import srdbsqla
|
||||
from ..sruid_utils.api.mys.api import _API
|
||||
from ..sruid_utils.api.mys.models import (
|
||||
GachaLog,
|
||||
AbyssData,
|
||||
RogueData,
|
||||
RoleIndex,
|
||||
AvatarInfo,
|
||||
MonthlyAward,
|
||||
DailyNoteData,
|
||||
RoleBasicInfo,
|
||||
WidgetStamina,
|
||||
GachaLog,
|
||||
MonthlyAward,
|
||||
RogueData,
|
||||
RogueLocustData,
|
||||
RoleBasicInfo,
|
||||
RoleIndex,
|
||||
WidgetStamina,
|
||||
)
|
||||
from .api import srdbsqla
|
||||
|
||||
RECOGNIZE_SERVER = {
|
||||
'1': 'prod_gf_cn',
|
||||
@ -386,7 +386,7 @@ class MysApi(_MysApi):
|
||||
)
|
||||
# print(data)
|
||||
if isinstance(data, Dict):
|
||||
data = cast(RogueData, data['data'])
|
||||
data = cast(RogueLocustData, data['data'])
|
||||
return data
|
||||
|
||||
async def mys_sign(
|
||||
|
Loading…
x
Reference in New Issue
Block a user