mirror of
https://github.com/baiqwerdvd/StarRailUID.git
synced 2025-05-05 19:23:45 +08:00
完成镜流V3计算,修改6魂饮月伤害错误 (#75)
* 完成镜流V3计算,修改6魂饮月伤害错误 * 🚨 `pre-commit-ci`修复格式错误 * 修改火套错误 * 🚨 `pre-commit-ci`修复格式错误 --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
dc495e7bcd
commit
9eebaca513
@ -1,6 +1,6 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import List, TypedDict, Union
|
||||
from typing import List, Union, TypedDict
|
||||
|
||||
|
||||
class MihomoData(TypedDict):
|
||||
|
@ -1,5 +1,5 @@
|
||||
from ..utils.excel.model import RelicMainAffixConfig, RelicSubAffixConfig
|
||||
from ..utils.map.SR_MAP_PATH import RelicId2MainAffixGroup
|
||||
from ..utils.excel.model import RelicSubAffixConfig, RelicMainAffixConfig
|
||||
|
||||
|
||||
async def cal_relic_main_affix(
|
||||
|
@ -1,18 +1,33 @@
|
||||
import re
|
||||
import json
|
||||
import math
|
||||
import re
|
||||
from pathlib import Path
|
||||
from typing import Dict, Union
|
||||
|
||||
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 ..utils.error_reply import CHAR_HINT
|
||||
from ..utils.excel.read_excel import light_cone_ranks
|
||||
from .cal_damage import cal, cal_char_info
|
||||
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.starrail_fonts import (
|
||||
sr_font_20,
|
||||
sr_font_23,
|
||||
@ -22,22 +37,6 @@ 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 .cal_damage import cal, cal_char_info
|
||||
from .to_data import api_to_dict
|
||||
|
||||
Excel_path = Path(__file__).parent / 'effect'
|
||||
with Path.open(Excel_path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||
@ -169,10 +168,10 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
attr_bg_draw = ImageDraw.Draw(attr_bg)
|
||||
# 生命值
|
||||
hp = int(char.base_attributes.get('hp'))
|
||||
add_hp = int(char.add_attr.get('HPDelta', 0)
|
||||
+ hp
|
||||
* char.add_attr.get('HPAddedRatio', 0)
|
||||
)
|
||||
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'
|
||||
)
|
||||
@ -185,10 +184,10 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
)
|
||||
# 攻击力
|
||||
attack = int(char.base_attributes['attack'])
|
||||
add_attack = int(char.add_attr.get('AttackDelta', 0)
|
||||
+ attack
|
||||
* char.add_attr.get('AttackAddedRatio', 0)
|
||||
)
|
||||
add_attack = int(
|
||||
char.add_attr.get('AttackDelta', 0)
|
||||
+ attack * char.add_attr.get('AttackAddedRatio', 0)
|
||||
)
|
||||
attr_bg_draw.text(
|
||||
(413, 31 + 48),
|
||||
f'{attack + add_attack}',
|
||||
@ -205,10 +204,10 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
)
|
||||
# 防御力
|
||||
defence = int(char.base_attributes['defence'])
|
||||
add_defence = int(char.add_attr.get('DefenceDelta', 0)
|
||||
+ defence
|
||||
* char.add_attr.get('DefenceAddedRatio', 0)
|
||||
)
|
||||
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}',
|
||||
@ -274,9 +273,7 @@ async def draw_char_info_img(raw_mes: str, sr_uid: str):
|
||||
'rm',
|
||||
)
|
||||
# 效果抵抗
|
||||
status_resistance_base = (
|
||||
char.add_attr.get('StatusResistanceBase', 0) * 100
|
||||
)
|
||||
status_resistance_base = char.add_attr.get('StatusResistanceBase', 0) * 100
|
||||
attr_bg_draw.text(
|
||||
(500, 31 + 48 * 7),
|
||||
"{:.1f}%".format(status_resistance_base),
|
||||
|
@ -3,7 +3,7 @@ from typing import List
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ..Base.AvatarBase import BaseAvatar, BaseAvatarBuff
|
||||
from ..Base.model import DamageInstanceAvatar, DamageInstanceSkill
|
||||
from ..Base.model import DamageInstanceSkill, DamageInstanceAvatar
|
||||
|
||||
|
||||
class Seele(BaseAvatar):
|
||||
@ -146,7 +146,9 @@ class Silverwolf(BaseAvatar):
|
||||
logger.info('战技降抗')
|
||||
logger.info('战技使目标全属性抗性降低的效果额外降低3%')
|
||||
enemy_status_resistance = self.BPSkill_num('BPSkill_D') + 0.03
|
||||
self.extra_ability_attribute['QuantumResistancePenetration'] = enemy_status_resistance
|
||||
self.extra_ability_attribute[
|
||||
'QuantumResistancePenetration'
|
||||
] = enemy_status_resistance
|
||||
logger.info('终结技降防')
|
||||
ultra_defence = self.Ultra_num('Ultra_D')
|
||||
logger.info('天赋降防')
|
||||
@ -283,9 +285,9 @@ class Yanqing(BaseAvatar):
|
||||
critical_damage_base_t + critical_damage_base_u
|
||||
)
|
||||
critical_chance_base = self.Talent_num('Talent_CC')
|
||||
self.extra_ability_attribute[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + 0.6
|
||||
self.extra_ability_attribute['CriticalChanceBase'] = (
|
||||
critical_chance_base + 0.6
|
||||
)
|
||||
|
||||
|
||||
class Welt(BaseAvatar):
|
||||
@ -391,22 +393,36 @@ class Jingliu(BaseAvatar):
|
||||
|
||||
def eidolons(self):
|
||||
if self.avatar_rank >= 1:
|
||||
self.eidolon_attribute['Ultra_CriticalChanceBase'] = 0.12
|
||||
self.eidolon_attribute['BPSkill1_CriticalChanceBase'] = 0.12
|
||||
self.eidolon_attribute['CriticalDamageBase'] = 0.24
|
||||
if self.avatar_rank >= 2:
|
||||
self.eidolon_attribute['UltraDmgAdd'] = 0.3
|
||||
self.eidolon_attribute['BPSkill1DmgAdd'] = 0.8
|
||||
if self.avatar_rank >= 4:
|
||||
self.eidolon_attribute['BPSkill1AttackAddedRatio'] = 0.4
|
||||
self.eidolon_attribute['UltraAttackAddedRatio'] = 0.4
|
||||
self.eidolon_attribute['BPSkill1AttackAddedRatio'] = 0.3
|
||||
self.eidolon_attribute['UltraAttackAddedRatio'] = 0.3
|
||||
if self.avatar_rank >= 6:
|
||||
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'] = 0.1
|
||||
self.extra_ability_attribute['UltraDmgAdd'] = 0.1
|
||||
logger.info('【转魄】状态下,终结技造成的伤害提高20%。')
|
||||
logger.info('【转魄】状态下,暴击率提高。')
|
||||
logger.info('【转魄】状态下,攻击力提高。')
|
||||
self.extra_ability_attribute['UltraDmgAdd'] = 0.2
|
||||
critical_chance_base = self.Talent_num('Talent_CC')
|
||||
self.extra_ability_attribute[
|
||||
'Ultra_CriticalChanceBase'
|
||||
] = critical_chance_base
|
||||
self.extra_ability_attribute[
|
||||
'BPSkill1_CriticalChanceBase'
|
||||
] = critical_chance_base
|
||||
attack_added_ratio = self.Talent_num('Talent_atk')
|
||||
self.extra_ability_attribute[
|
||||
'BPSkill1AttackAddedRatio'
|
||||
] = attack_added_ratio
|
||||
self.extra_ability_attribute[
|
||||
'UltraAttackAddedRatio'
|
||||
] = attack_added_ratio
|
||||
|
||||
|
||||
class Avatar:
|
||||
|
@ -1,13 +1,13 @@
|
||||
import json
|
||||
from abc import abstractmethod
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
from pathlib import Path
|
||||
from abc import abstractmethod
|
||||
|
||||
from msgspec import Struct
|
||||
|
||||
from ....utils.excel.model import AvatarPromotionConfig
|
||||
from .model import DamageInstanceAvatar, DamageInstanceSkill
|
||||
from .SkillBase import BaseSkills
|
||||
from ....utils.excel.model import AvatarPromotionConfig
|
||||
from .model import DamageInstanceSkill, DamageInstanceAvatar
|
||||
|
||||
path = Path(__file__).parent.parent
|
||||
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||
@ -75,37 +75,34 @@ class BaseAvatar:
|
||||
self.avatar_attribute = self.get_attribute()
|
||||
|
||||
def get_attribute(self):
|
||||
promotion = AvatarPromotionConfig.Avatar[
|
||||
str(self.avatar_id)
|
||||
][str(self.avatar_promotion)]
|
||||
promotion = AvatarPromotionConfig.Avatar[str(self.avatar_id)][
|
||||
str(self.avatar_promotion)
|
||||
]
|
||||
|
||||
return BaseAvatarAttribute(
|
||||
# 攻击力
|
||||
attack = (
|
||||
attack=(
|
||||
promotion.AttackBase.Value
|
||||
+ promotion.AttackAdd.Value
|
||||
* (self.avatar_level - 1)
|
||||
+ promotion.AttackAdd.Value * (self.avatar_level - 1)
|
||||
),
|
||||
# 防御力
|
||||
defence = (
|
||||
defence=(
|
||||
promotion.DefenceBase.Value
|
||||
+ promotion.DefenceAdd.Value
|
||||
* (self.avatar_level - 1)
|
||||
+ promotion.DefenceAdd.Value * (self.avatar_level - 1)
|
||||
),
|
||||
# 血量
|
||||
hp = (
|
||||
hp=(
|
||||
promotion.HPBase.Value
|
||||
+ promotion.HPAdd.Value
|
||||
* (self.avatar_level - 1)
|
||||
+ promotion.HPAdd.Value * (self.avatar_level - 1)
|
||||
),
|
||||
# 速度
|
||||
speed = promotion.SpeedBase.Value,
|
||||
speed=promotion.SpeedBase.Value,
|
||||
# 暴击率
|
||||
CriticalChanceBase = promotion.CriticalChance.Value,
|
||||
CriticalChanceBase=promotion.CriticalChance.Value,
|
||||
# 暴击伤害
|
||||
CriticalDamageBase = promotion.CriticalDamage.Value,
|
||||
CriticalDamageBase=promotion.CriticalDamage.Value,
|
||||
# 嘲讽
|
||||
BaseAggro = promotion.BaseAggro.Value
|
||||
BaseAggro=promotion.BaseAggro.Value,
|
||||
)
|
||||
|
||||
def Skill_Info(self, skill_type: str):
|
||||
@ -133,7 +130,9 @@ class BaseAvatar:
|
||||
]
|
||||
|
||||
def Maze(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Maze'][self.Skill.Maze_.level - 1]
|
||||
return skill_dict[str(self.avatar_id)]['Maze'][
|
||||
self.Skill.Maze_.level - 1
|
||||
]
|
||||
|
||||
def Talent(self) -> float:
|
||||
return skill_dict[str(self.avatar_id)]['Talent'][
|
||||
@ -157,13 +156,17 @@ class BaseAvatar:
|
||||
|
||||
def Talent_add(self) -> float:
|
||||
if self.avatar_id in [1102]:
|
||||
return float(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 float(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 float(0)
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
from abc import abstractmethod
|
||||
from typing import Dict
|
||||
from abc import abstractmethod
|
||||
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
||||
from .model import DamageInstanceRelic
|
||||
from ....utils.map.SR_MAP_PATH import RelicSetSkill
|
||||
|
||||
|
||||
class SingleRelic:
|
||||
|
@ -1,8 +1,8 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
from pathlib import Path
|
||||
|
||||
from .model import DamageInstanceAvatar, DamageInstanceSkill
|
||||
from .model import DamageInstanceSkill, DamageInstanceAvatar
|
||||
|
||||
path = Path(__file__).parent.parent
|
||||
with Path.open(path / 'Excel' / 'SkillData.json', encoding='utf-8') as f:
|
||||
|
@ -1,11 +1,11 @@
|
||||
from abc import abstractmethod
|
||||
from typing import Dict
|
||||
from abc import abstractmethod
|
||||
|
||||
from msgspec import Struct
|
||||
|
||||
from .model import DamageInstanceWeapon
|
||||
from ....utils.excel.model import EquipmentPromotionConfig
|
||||
from ....utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty
|
||||
from .model import DamageInstanceWeapon
|
||||
|
||||
|
||||
class BaseWeaponAttribute(Struct):
|
||||
@ -17,7 +17,7 @@ class BaseWeaponAttribute(Struct):
|
||||
return [
|
||||
('hp', self.hp),
|
||||
('attack', self.attack),
|
||||
('defence', self.defence)
|
||||
('defence', self.defence),
|
||||
]
|
||||
|
||||
|
||||
@ -58,24 +58,21 @@ class BaseWeapon:
|
||||
...
|
||||
|
||||
def get_attribute(self):
|
||||
promotion = EquipmentPromotionConfig.Equipment[
|
||||
str(self.weapon_id)
|
||||
][str(self.weapon_promotion)]
|
||||
promotion = EquipmentPromotionConfig.Equipment[str(self.weapon_id)][
|
||||
str(self.weapon_promotion)
|
||||
]
|
||||
|
||||
return BaseWeaponAttribute(
|
||||
hp = (
|
||||
hp=(
|
||||
promotion.BaseHP.Value
|
||||
+ promotion.BaseHPAdd.Value
|
||||
* (self.weapon_level - 1)
|
||||
+ promotion.BaseHPAdd.Value * (self.weapon_level - 1)
|
||||
),
|
||||
attack = (
|
||||
attack=(
|
||||
promotion.BaseAttack.Value
|
||||
+ promotion.BaseAttackAdd.Value
|
||||
* (self.weapon_level - 1)
|
||||
+ promotion.BaseAttackAdd.Value * (self.weapon_level - 1)
|
||||
),
|
||||
defence = (
|
||||
defence=(
|
||||
promotion.BaseDefence.Value
|
||||
+ promotion.BaseDefenceAdd.Value
|
||||
* (self.weapon_level - 1)
|
||||
)
|
||||
+ promotion.BaseDefenceAdd.Value * (self.weapon_level - 1)
|
||||
),
|
||||
)
|
||||
|
@ -585,12 +585,19 @@
|
||||
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
|
||||
"Talent_CC": [
|
||||
0.40000000037252903, 0.41000000040978193, 0.42000000044703484,
|
||||
0.4300000004842877, 0.4400000005215406, 0.4500000005587935,
|
||||
0.4625000006053597, 0.4750000006519258, 0.4875000006984919,
|
||||
0.5000000007450581, 0.510000000782311, 0.5200000008195639,
|
||||
0.5300000008568168, 0.5400000008940697, 0.5500000008940697
|
||||
],
|
||||
"Talent_atk": [
|
||||
0.90000000037252903, 0.99000000040978193, 1.08000000044703484,
|
||||
1.1700000004842877, 1.2600000005215406, 1.3500000005587935,
|
||||
1.4625000006053597, 1.5750000006519258, 1.6875000006984919,
|
||||
1.8000000007450581, 1.890000000782311, 1.9800000008195639,
|
||||
2.0700000008568168, 2.1600000008940697, 2.2500000008940697
|
||||
],
|
||||
"Maze": [20],
|
||||
"Ultra_Use": [140],
|
||||
|
@ -562,19 +562,19 @@
|
||||
},
|
||||
"23014": {
|
||||
"Param": {
|
||||
"e_dmg": [
|
||||
0.3000000000745058,
|
||||
0.35000000009313226,
|
||||
0.40000000011175871,
|
||||
0.45000000013038516,
|
||||
0.5000000001490116
|
||||
"AllDamageAddedRatio": [
|
||||
0.1400000000745058,
|
||||
0.16400000009313226,
|
||||
0.19000000011175871,
|
||||
0.21400000013038516,
|
||||
0.2400000001490116
|
||||
],
|
||||
"CriticalDamageBase": [
|
||||
0.3600000000745058,
|
||||
0.42000000009313226,
|
||||
0.48000000011175871,
|
||||
0.54000000013038516,
|
||||
0.6000000001490116
|
||||
"ResistancePenetration": [
|
||||
0.1200000000745058,
|
||||
0.14000000009313226,
|
||||
0.16000000011175871,
|
||||
0.18000000013038516,
|
||||
0.2000000001490116
|
||||
]
|
||||
}
|
||||
},
|
||||
|
@ -1,11 +1,11 @@
|
||||
from collections import Counter
|
||||
from typing import Dict, List
|
||||
from collections import Counter
|
||||
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ..Base.model import DamageInstanceRelic
|
||||
from ..Base.RelicBase import BaseRelicSetSkill, SingleRelic
|
||||
from ..utils import merge_attribute
|
||||
from ..Base.model import DamageInstanceRelic
|
||||
from ..Base.RelicBase import SingleRelic, BaseRelicSetSkill
|
||||
|
||||
|
||||
class Relic101(BaseRelicSetSkill):
|
||||
@ -57,9 +57,9 @@ class Relic103(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
shield_added_ratio = attribute_bonus.get('shield_added_ratio', 0)
|
||||
attribute_bonus[
|
||||
'shield_added_ratio'
|
||||
] = shield_added_ratio + 0.20000000018626451
|
||||
attribute_bonus['shield_added_ratio'] = (
|
||||
shield_added_ratio + 0.20000000018626451
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -77,9 +77,9 @@ class Relic104(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces4 and await self.check(base_attr, attribute_bonus):
|
||||
critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalDamageBase'
|
||||
] = critical_damage_base + 0.25000000023283064
|
||||
attribute_bonus['CriticalDamageBase'] = (
|
||||
critical_damage_base + 0.25000000023283064
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -97,7 +97,9 @@ 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 + 0.05000000004656613 * 5
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio + 0.05000000004656613 * 5
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -131,13 +133,15 @@ class Relic107(BaseRelicSetSkill):
|
||||
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces4:
|
||||
e_dmg = attribute_bonus.get('BPSkillDmgAdd', {})
|
||||
q_dmg = attribute_bonus.get('UltraSkillDmgAdd', {})
|
||||
e_dmg = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
q_dmg = attribute_bonus.get('UltraSkillDmgAdd', 0)
|
||||
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 + 0.12000000011175871
|
||||
fire_added_ratio = attribute_bonus.get('FireAddedRatio', 0)
|
||||
attribute_bonus['FireAddedRatio'] = (
|
||||
fire_added_ratio + 0.12000000011175871
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -157,7 +161,9 @@ 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 + 0.10000000009313226 * 2
|
||||
attribute_bonus['ignore_defence'] = (
|
||||
ignore_defence + 0.10000000009313226 * 2
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -176,7 +182,9 @@ 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 + 0.20000000018626451
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio + 0.20000000018626451
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -234,15 +242,15 @@ class Relic112(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 + 0.10000000009313226
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
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 + 0.20000000018626451
|
||||
attribute_bonus['CriticalDamageBase'] = (
|
||||
critical_damage_base + 0.20000000018626451
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -262,7 +270,9 @@ 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 + 0.08000000009313226 * 2
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base + 0.08000000009313226 * 2
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -281,7 +291,9 @@ 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 + 0.12000000011175871
|
||||
attribute_bonus['SpeedAddedRatio'] = (
|
||||
speed_added_ratio + 0.12000000011175871
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -302,7 +314,9 @@ 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 + 0.12000000011175871
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio + 0.12000000011175871
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -323,7 +337,9 @@ 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 + 0.0800000000745058
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio + 0.0800000000745058
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -343,7 +359,7 @@ class Relic303(BaseRelicSetSkill):
|
||||
# 提高装备者等同于当前效果命中25%的攻击力,最多提高25%
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + min(
|
||||
0.25000000023283064, status_probability / 0.25
|
||||
)
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -364,9 +380,9 @@ class Relic304(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0)
|
||||
attribute_bonus[
|
||||
'DefenceAddedRatio'
|
||||
] = defence_added_ratio + 0.1500000001396984
|
||||
attribute_bonus['DefenceAddedRatio'] = (
|
||||
defence_added_ratio + 0.1500000001396984
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -387,9 +403,9 @@ class Relic305(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + 0.6000000005587935
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base + 0.6000000005587935
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -435,9 +451,9 @@ class Relic307(BaseRelicSetSkill):
|
||||
break_damage_added_ratio_base = attribute_bonus.get(
|
||||
'BreakDamageAddedRatioBase', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'BreakDamageAddedRatioBase'
|
||||
] = break_damage_added_ratio_base + 0.20000000018626451
|
||||
attribute_bonus['BreakDamageAddedRatioBase'] = (
|
||||
break_damage_added_ratio_base + 0.20000000018626451
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -501,9 +517,9 @@ class Relic310(BaseRelicSetSkill):
|
||||
async def set_skill_ability(self, base_attr: Dict, attribute_bonus: Dict):
|
||||
if self.pieces2 and await self.check(base_attr, attribute_bonus):
|
||||
critical_damage_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalDamageBase'
|
||||
] = critical_damage_base + 0.10000000018626451
|
||||
attribute_bonus['CriticalDamageBase'] = (
|
||||
critical_damage_base + 0.10000000018626451
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
from gsuid_core.logger import logger
|
||||
|
||||
from ..mono.Character import Character
|
||||
from .Avatar.Avatar import Avatar
|
||||
from .Weapon.Weapon import Weapon
|
||||
from .utils import merge_attribute
|
||||
from ..mono.Character import Character
|
||||
from .Base.model import DamageInstance
|
||||
from .Relic.Relic import RelicSet, SingleRelic
|
||||
from .utils import merge_attribute
|
||||
from .Weapon.Weapon import Weapon
|
||||
|
||||
|
||||
class RoleInstance:
|
||||
@ -104,9 +104,9 @@ class RoleInstance:
|
||||
def cal_weapon_attr_add(self):
|
||||
for attribute in self.weapon.weapon_attribute:
|
||||
if attribute in self.attribute_bonus:
|
||||
self.attribute_bonus[attribute] += self.weapon.weapon_attribute[
|
||||
self.attribute_bonus[
|
||||
attribute
|
||||
]
|
||||
] += self.weapon.weapon_attribute[attribute]
|
||||
else:
|
||||
self.attribute_bonus[attribute] = self.weapon.weapon_attribute[
|
||||
attribute
|
||||
@ -176,9 +176,9 @@ class RoleInstance:
|
||||
critical_chance_base = self.attribute_bonus.get(
|
||||
'CriticalChanceBase', 0
|
||||
)
|
||||
self.attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + fx_cc_up
|
||||
self.attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base + fx_cc_up
|
||||
)
|
||||
|
||||
hp_added_ratio = self.attribute_bonus.get('HPAddedRatio', 0)
|
||||
self.attribute_bonus['HPAddedRatio'] = hp_added_ratio + fx_hp_up
|
||||
@ -203,9 +203,9 @@ class RoleInstance:
|
||||
attack_added_ratio = self.attribute_bonus.get(
|
||||
'AttackAddedRatio', 0
|
||||
)
|
||||
self.attribute_bonus[
|
||||
'AttackAddedRatio'
|
||||
] = attack_added_ratio + self.attribute_bonus[attr]
|
||||
self.attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio + self.attribute_bonus[attr]
|
||||
)
|
||||
# 效果命中加成
|
||||
if attr.__contains__('StatusProbabilityBase'):
|
||||
attr_name = attr.split('StatusProbabilityBase')[0]
|
||||
@ -213,9 +213,9 @@ class RoleInstance:
|
||||
status_probability = self.attribute_bonus.get(
|
||||
'StatusProbabilityBase', 0
|
||||
)
|
||||
self.attribute_bonus[
|
||||
'StatusProbabilityBase'
|
||||
] = status_probability + self.attribute_bonus[attr]
|
||||
self.attribute_bonus['StatusProbabilityBase'] = (
|
||||
status_probability + self.attribute_bonus[attr]
|
||||
)
|
||||
logger.info(self.attribute_bonus)
|
||||
logger.info('检查遗器套装战斗生效的buff')
|
||||
for set_skill in self.relic_set.SetSkill:
|
||||
@ -298,8 +298,13 @@ class RoleInstance:
|
||||
enemy_status_resistance = 0
|
||||
for attr in merged_attr:
|
||||
if attr.__contains__('ResistancePenetration'):
|
||||
# 先默认触发
|
||||
enemy_status_resistance = merged_attr[attr]
|
||||
attr_name = attr.split('ResistancePenetration')[0]
|
||||
if (
|
||||
attr_name == self.avatar.avatar_element
|
||||
or attr_name == 'AllDamage'
|
||||
):
|
||||
# 先默认触发
|
||||
enemy_status_resistance = merged_attr[attr]
|
||||
resistance_area = 1 - (0 - enemy_status_resistance)
|
||||
if self.raw_data.avatar.id_ == 1213:
|
||||
if skill_info[2] == 7:
|
||||
@ -336,7 +341,7 @@ class RoleInstance:
|
||||
for attr in merged_attr:
|
||||
if attr.__contains__('DmgAdd'):
|
||||
attr_name = attr.split('DmgAdd')[0]
|
||||
if attr_name == skill_type:
|
||||
if attr_name == skill_type or attr_name == skill_info[3]:
|
||||
logger.info(
|
||||
f'{attr} 对 {skill_type} 有 {merged_attr[attr]} 伤害加成'
|
||||
)
|
||||
@ -517,9 +522,9 @@ class RoleInstance:
|
||||
and self.raw_data.avatar.rank >= 1
|
||||
):
|
||||
if skill_info[3] == 'BPSkill1' or skill_info[3] == 'Ultra':
|
||||
damage_cd_z = damage_cd_z * 1.6
|
||||
damage_qw_z = damage_qw_z * 1.6
|
||||
damage_tz_z = damage_tz_z * 1.6
|
||||
damage_cd_z = damage_cd_z * 1.8
|
||||
damage_qw_z = damage_qw_z * 1.8
|
||||
damage_tz_z = damage_tz_z * 1.8
|
||||
|
||||
if self.avatar.avatar_element == 'Thunder':
|
||||
element_area = 0
|
||||
|
@ -1,9 +1,9 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Dict
|
||||
from pathlib import Path
|
||||
|
||||
from ..Base.model import DamageInstanceWeapon
|
||||
from ..Base.WeaponBase import BaseWeapon
|
||||
from ..Base.model import DamageInstanceWeapon
|
||||
|
||||
path = Path(__file__).parent.parent
|
||||
with Path.open(path / 'Excel' / 'weapon_effect.json', encoding='utf-8') as f:
|
||||
@ -27,7 +27,9 @@ class Arrows(BaseWeapon):
|
||||
critical_chance_base = attribute_bonus.get('CriticalChance', 0)
|
||||
attribute_bonus['CriticalChance'] = (
|
||||
critical_chance_base
|
||||
+ weapon_effect['20000']['Param']['CriticalChance'][self.weapon_rank - 1]
|
||||
+ weapon_effect['20000']['Param']['CriticalChance'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
@ -70,9 +72,9 @@ class Swordplay(BaseWeapon):
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21010']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 5
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 5
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -91,9 +93,12 @@ class DartingArrow(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + weapon_effect['20007']['Param']['AttackAddedRatio'][
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['20007']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -112,9 +117,12 @@ class Adversarial(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0)
|
||||
attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + weapon_effect['20014']['Param']['SpeedAddedRatio'][
|
||||
attribute_bonus['SpeedAddedRatio'] = (
|
||||
speed_added_ratio
|
||||
+ weapon_effect['20014']['Param']['SpeedAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -134,17 +142,25 @@ class SubscribeforMore(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
normal_dmg_add = attribute_bonus.get('NormalDmgAdd', 0)
|
||||
attribute_bonus['NormalDmgAdd'] = normal_dmg_add + (
|
||||
attribute_bonus['NormalDmgAdd'] = (
|
||||
normal_dmg_add
|
||||
+ (
|
||||
weapon_effect['21017']['Param']['a_dmg'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 2
|
||||
)
|
||||
* 2
|
||||
)
|
||||
bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + (
|
||||
attribute_bonus['BPSkillDmgAdd'] = (
|
||||
bp_skill_dmg_add
|
||||
+ (
|
||||
weapon_effect['21017']['Param']['e_dmg'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 2
|
||||
)
|
||||
* 2
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -165,17 +181,21 @@ class RiverFlowsinSpring(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0)
|
||||
attribute_bonus['SpeedAddedRatio'] = speed_added_ratio + weapon_effect['21024']['Param']['SpeedAddedRatio'][
|
||||
attribute_bonus['SpeedAddedRatio'] = (
|
||||
speed_added_ratio
|
||||
+ weapon_effect['21024']['Param']['SpeedAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['21024']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21024']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -214,11 +234,12 @@ class OnlySilenceRemains(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + weapon_effect['21003']['Param']['CriticalChance'][
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base
|
||||
+ weapon_effect['21003']['Param']['CriticalChance'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -239,15 +260,15 @@ class BeforeDawn(BaseWeapon):
|
||||
bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + (
|
||||
weapon_effect['23010']['Param']['e_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
ultra_dmg_add = attribute_bonus.get('UltraDmgAdd', 0)
|
||||
attribute_bonus['UltraDmgAdd'] = ultra_dmg_add + (
|
||||
weapon_effect['23010']['Param']['r_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
talent_dmg_add = attribute_bonus.get('TalentDmgAdd', 0)
|
||||
attribute_bonus['TalentDmgAdd'] = talent_dmg_add + (
|
||||
weapon_effect['23010']['Param']['t_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -264,28 +285,33 @@ class IntheNight(BaseWeapon):
|
||||
self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict
|
||||
):
|
||||
char_speed = (
|
||||
base_attr.get('speed', 0)
|
||||
+ attribute_bonus.get('SpeedDelta', 0)
|
||||
base_attr.get('speed', 0) + attribute_bonus.get('SpeedDelta', 0)
|
||||
) * (attribute_bonus.get('SpeedAddedRatio', 0) + 1)
|
||||
count_ = min(6, int((char_speed - 100) / 10))
|
||||
normal_dmg_add = attribute_bonus.get('NormalDmgAdd', 0)
|
||||
attribute_bonus['NormalDmgAdd'] = normal_dmg_add + (
|
||||
weapon_effect['23001']['Param']['a_dmg'][self.weapon_rank - 1]
|
||||
) * count_
|
||||
attribute_bonus['NormalDmgAdd'] = (
|
||||
normal_dmg_add
|
||||
+ (weapon_effect['23001']['Param']['a_dmg'][self.weapon_rank - 1])
|
||||
* count_
|
||||
)
|
||||
bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + (
|
||||
weapon_effect['23001']['Param']['e_dmg'][self.weapon_rank - 1]
|
||||
) * count_
|
||||
attribute_bonus['BPSkillDmgAdd'] = (
|
||||
bp_skill_dmg_add
|
||||
+ (weapon_effect['23001']['Param']['e_dmg'][self.weapon_rank - 1])
|
||||
* count_
|
||||
)
|
||||
ultra_critical_chance_base = attribute_bonus.get(
|
||||
'Ultra_CriticalDamageBase', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'Ultra_CriticalDamageBase'
|
||||
] = ultra_critical_chance_base + (
|
||||
weapon_effect['23001']['Param']['q_crit_dmg'][
|
||||
attribute_bonus['Ultra_CriticalDamageBase'] = (
|
||||
ultra_critical_chance_base
|
||||
+ (
|
||||
weapon_effect['23001']['Param']['q_crit_dmg'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * count_
|
||||
)
|
||||
* count_
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -305,16 +331,20 @@ class CruisingintheStellarSea(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + weapon_effect['24001']['Param']['CriticalChance'][
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base
|
||||
+ weapon_effect['24001']['Param']['CriticalChance'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
if await self.check():
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + weapon_effect['24001']['Param']['AttackAddedRatio'][
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['24001']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -333,19 +363,20 @@ class SeriousnessofBreakfast(BaseWeapon):
|
||||
self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict
|
||||
):
|
||||
all_damage_added_ratio = attribute_bonus.get('AllDamageAddedRatio', 0)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['21027']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21027']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
if await self.check():
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['21027']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
+ weapon_effect['21027']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -366,17 +397,21 @@ class NightontheMilkyWay(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = attack_added_ratio + weapon_effect['23000']['Param']['AttackAddedRatio'][
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['23000']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['23000']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['23000']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -399,9 +434,9 @@ class TodayIsAnotherPeacefulDay(BaseWeapon):
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21034']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * Ultra_Use
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * Ultra_Use
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -423,10 +458,10 @@ class GeniusesRepose(BaseWeapon):
|
||||
if await self.check():
|
||||
critical_chance_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus['CriticalDamageBase'] = critical_chance_base + (
|
||||
weapon_effect['21020']['Param']['CriticalDamageBase'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
weapon_effect['21020']['Param']['CriticalDamageBase'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -447,7 +482,7 @@ class MaketheWorldClamor(BaseWeapon):
|
||||
ultra_dmg_add = attribute_bonus.get('UltraDmgAdd', 0)
|
||||
attribute_bonus['UltraDmgAdd'] = ultra_dmg_add + (
|
||||
weapon_effect['21013']['Param']['r_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -469,10 +504,8 @@ class TheBirthoftheSelf(BaseWeapon):
|
||||
if await self.check():
|
||||
talent_dmg_add = attribute_bonus.get('TalentDmgAdd', 0)
|
||||
attribute_bonus['TalentDmgAdd'] = talent_dmg_add + (
|
||||
weapon_effect['21006']['Param']['t_dmg'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
weapon_effect['21006']['Param']['t_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -496,11 +529,12 @@ class ASecretVow(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['21012']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21012']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
return attribute_bonus
|
||||
|
||||
@ -524,10 +558,10 @@ class BrighterThantheSun(BaseWeapon):
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['23015']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 2
|
||||
+ weapon_effect['23015']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 2
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -550,11 +584,12 @@ class TheUnreachableSide(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['23009']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['23009']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -577,11 +612,12 @@ class SomethingIrreplaceable(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['23002']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['23002']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -604,18 +640,19 @@ class OntheFallofanAeon(BaseWeapon):
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['24000']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 4
|
||||
+ weapon_effect['24000']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 4
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['24000']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['24000']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -667,11 +704,12 @@ class WoofWalkTime(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['21026']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21026']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -698,11 +736,12 @@ class UndertheBlueSky(BaseWeapon):
|
||||
# )
|
||||
if await self.check():
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + weapon_effect['21019']['Param']['CriticalChance'][
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base
|
||||
+ weapon_effect['21019']['Param']['CriticalChance'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -724,10 +763,10 @@ class TheMolesWelcomeYou(BaseWeapon):
|
||||
attack_added_ratio = attribute_bonus.get('AttackAddedRatio', 0)
|
||||
attribute_bonus['AttackAddedRatio'] = (
|
||||
attack_added_ratio
|
||||
+ weapon_effect['21005']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
+ weapon_effect['21005']['Param']['AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -748,15 +787,19 @@ class IncessantRain(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
damage_ratio = attribute_bonus.get('DmgRatio', 0)
|
||||
attribute_bonus['DmgRatio'] = damage_ratio + weapon_effect['23007']['Param']['DmgRatio'][
|
||||
attribute_bonus['DmgRatio'] = (
|
||||
damage_ratio
|
||||
+ weapon_effect['23007']['Param']['DmgRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + weapon_effect['23007']['Param']['CriticalChance'][
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base
|
||||
+ weapon_effect['23007']['Param']['CriticalChance'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -779,19 +822,20 @@ class PatienceIsAllYouNeed(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['23006']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['23006']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
|
||||
speed_added_ratio = attribute_bonus.get('SpeedAddedRatio', 0)
|
||||
attribute_bonus['SpeedAddedRatio'] = (
|
||||
speed_added_ratio
|
||||
+ weapon_effect['23006']['Param']['SpeedAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
+ weapon_effect['23006']['Param']['SpeedAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -815,29 +859,32 @@ class IntheNameoftheWorld(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['23004']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['23004']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
|
||||
a2_status_probability = attribute_bonus.get(
|
||||
'BPSkillStatusProbabilityBase', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'BPSkillStatusProbabilityBase'
|
||||
] = a2_status_probability + weapon_effect['23004']['Param']['A2_StatusProbability'][
|
||||
attribute_bonus['BPSkillStatusProbabilityBase'] = (
|
||||
a2_status_probability
|
||||
+ weapon_effect['23004']['Param']['A2_StatusProbability'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
|
||||
a2_attack_added_ratio = attribute_bonus.get(
|
||||
'BPSkillAttackAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'BPSkillAttackAddedRatio'
|
||||
] = a2_attack_added_ratio + weapon_effect['23004']['Param']['A2_AttackAddedRatio'][
|
||||
attribute_bonus['BPSkillAttackAddedRatio'] = (
|
||||
a2_attack_added_ratio
|
||||
+ weapon_effect['23004']['Param']['A2_AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -911,11 +958,12 @@ class Fermata(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['21022']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21022']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -935,9 +983,12 @@ class ResolutionShinesAsPearlsofSweat(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
ignore_defence = attribute_bonus.get('ignore_defence', 0)
|
||||
attribute_bonus['ignore_defence'] = ignore_defence + weapon_effect['21015']['Param']['ignore_defence'][
|
||||
attribute_bonus['ignore_defence'] = (
|
||||
ignore_defence
|
||||
+ weapon_effect['21015']['Param']['ignore_defence'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -978,10 +1029,10 @@ class GoodNightandSleepWell(BaseWeapon):
|
||||
)
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['21001']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
+ weapon_effect['21001']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1005,10 +1056,10 @@ class SheAlreadyShutHerEyes(BaseWeapon):
|
||||
)
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['23011']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
+ weapon_effect['23011']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
) * 3
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1028,11 +1079,12 @@ class MomentofVictory(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0)
|
||||
attribute_bonus[
|
||||
'DefenceAddedRatio'
|
||||
] = defence_added_ratio + weapon_effect['23005']['Param']['DefenceAddedRatio'][
|
||||
attribute_bonus['DefenceAddedRatio'] = (
|
||||
defence_added_ratio
|
||||
+ weapon_effect['23005']['Param']['DefenceAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1188,11 +1240,12 @@ class Amber(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
defence_added_ratio = attribute_bonus.get('DefenceAddedRatio', 0)
|
||||
attribute_bonus[
|
||||
'DefenceAddedRatio'
|
||||
] = defence_added_ratio + weapon_effect['20003']['Param']['DefenceAddedRatio'][
|
||||
attribute_bonus['DefenceAddedRatio'] = (
|
||||
defence_added_ratio
|
||||
+ weapon_effect['20003']['Param']['DefenceAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1212,11 +1265,12 @@ class MutualDemise(BaseWeapon):
|
||||
):
|
||||
if await self.check():
|
||||
critical_chance_base = attribute_bonus.get('CriticalChanceBase', 0)
|
||||
attribute_bonus[
|
||||
'CriticalChanceBase'
|
||||
] = critical_chance_base + weapon_effect['20016']['Param']['CriticalChance'][
|
||||
attribute_bonus['CriticalChanceBase'] = (
|
||||
critical_chance_base
|
||||
+ weapon_effect['20016']['Param']['CriticalChance'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1238,11 +1292,12 @@ class ShatteredHome(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['20009']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['20009']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1263,11 +1318,11 @@ class CollapsingSky(BaseWeapon):
|
||||
normal_dmg_add = attribute_bonus.get('NormalDmgAdd', 0)
|
||||
attribute_bonus['NormalDmgAdd'] = normal_dmg_add + (
|
||||
weapon_effect['20002']['Param']['a_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
bp_skill_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
attribute_bonus['BPSkillDmgAdd'] = bp_skill_dmg_add + (
|
||||
weapon_effect['20002']['Param']['e_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1306,11 +1361,12 @@ class Loop(BaseWeapon):
|
||||
all_damage_added_ratio = attribute_bonus.get(
|
||||
'AllDamageAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllDamageAddedRatio'
|
||||
] = all_damage_added_ratio + weapon_effect['20009']['Param']['AllDamageAddedRatio'][
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ weapon_effect['20009']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1332,11 +1388,12 @@ class Void(BaseWeapon):
|
||||
status_probability = attribute_bonus.get(
|
||||
'StatusProbabilityBase', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'StatusProbabilityBase'
|
||||
] = status_probability + weapon_effect['20004']['Param']['StatusProbability'][
|
||||
attribute_bonus['StatusProbabilityBase'] = (
|
||||
status_probability
|
||||
+ weapon_effect['20004']['Param']['StatusProbability'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1358,11 +1415,12 @@ class Sagacity(BaseWeapon):
|
||||
a3_attack_added_ratio = attribute_bonus.get(
|
||||
'UltraAttackAddedRatio', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'UltraAttackAddedRatio'
|
||||
] = a3_attack_added_ratio + weapon_effect['20020']['Param']['A3_AttackAddedRatio'][
|
||||
attribute_bonus['UltraAttackAddedRatio'] = (
|
||||
a3_attack_added_ratio
|
||||
+ weapon_effect['20020']['Param']['A3_AttackAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1400,7 +1458,7 @@ class DataBank(BaseWeapon):
|
||||
ultra_dmg_add = attribute_bonus.get('UltraDmgAdd', 0)
|
||||
attribute_bonus['UltraDmgAdd'] = ultra_dmg_add + (
|
||||
weapon_effect['20006']['Param']['r_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
)
|
||||
return attribute_bonus
|
||||
|
||||
|
||||
@ -1412,23 +1470,34 @@ class Thisbodyisasword(BaseWeapon):
|
||||
super().__init__(weapon)
|
||||
|
||||
async def check(self):
|
||||
# 使装备者战技造成的伤害提高30%。施放终结技时,立即恢复12点能量,并使装备者的暴击伤害提高36%
|
||||
# 当队友受到攻击或消耗生命值后,装备者获得1层【月蚀】,最多叠加3层。每层【月蚀】使装备者下一次攻击造成的伤害提高14%。叠满3层时,额外使该次攻击无视目标12%的防御力。该效果在装备者施放攻击后解除。
|
||||
pass
|
||||
|
||||
async def weapon_ability(
|
||||
self, Ultra_Use: float, base_attr: Dict, attribute_bonus: Dict
|
||||
self, Ultra_Use: int, base_attr: Dict, attribute_bonus: Dict
|
||||
):
|
||||
ultra_dmg_add = attribute_bonus.get('BPSkillDmgAdd', 0)
|
||||
attribute_bonus['BPSkillDmgAdd'] = ultra_dmg_add + (
|
||||
weapon_effect['23014']['Param']['e_dmg'][self.weapon_rank - 1]
|
||||
)
|
||||
|
||||
critical_chance_base = attribute_bonus.get('CriticalDamageBase', 0)
|
||||
attribute_bonus['CriticalDamageBase'] = critical_chance_base + (
|
||||
weapon_effect['23014']['Param']['CriticalDamageBase'][
|
||||
all_damage_added_ratio = attribute_bonus.get('AllDamageAddedRatio', 0)
|
||||
attribute_bonus['AllDamageAddedRatio'] = (
|
||||
all_damage_added_ratio
|
||||
+ (
|
||||
weapon_effect['23014']['Param']['AllDamageAddedRatio'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
) * 3
|
||||
|
||||
resistance_penetration = attribute_bonus.get(
|
||||
'AllResistancePenetration', 0
|
||||
)
|
||||
attribute_bonus[
|
||||
'AllResistancePenetration'
|
||||
] = resistance_penetration + (
|
||||
(
|
||||
weapon_effect['23014']['Param']['ResistancePenetration'][
|
||||
self.weapon_rank - 1
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
return attribute_bonus
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
import json
|
||||
from collections import Counter
|
||||
from typing import Dict
|
||||
from collections import Counter
|
||||
|
||||
from loguru import logger
|
||||
|
||||
from ...utils.map.SR_MAP_PATH import EquipmentID2AbilityProperty, RelicSetSkill
|
||||
from ...utils.map.SR_MAP_PATH import RelicSetSkill, EquipmentID2AbilityProperty
|
||||
|
||||
|
||||
class Character:
|
||||
@ -45,8 +45,12 @@ class Character:
|
||||
|
||||
equip_add_base_attr = equip['baseAttributes']
|
||||
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']
|
||||
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:
|
||||
|
@ -4,13 +4,13 @@ from typing import Dict, List, Union
|
||||
|
||||
from PIL import Image, ImageDraw
|
||||
|
||||
from ..utils.fonts.first_world import fw_font_28
|
||||
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_58
|
||||
from ..utils.image.convert import convert_img
|
||||
from ..utils.map.name_covert import avatar_id_to_char_star
|
||||
from ..utils.map.SR_MAP_PATH import avatarId2Name
|
||||
from ..utils.resource.RESOURCE_PATH import CHAR_ICON_PATH, CHAR_PREVIEW_PATH
|
||||
from .to_data import api_to_dict
|
||||
from ..utils.image.convert import convert_img
|
||||
from ..utils.fonts.first_world import fw_font_28
|
||||
from ..utils.map.SR_MAP_PATH import avatarId2Name
|
||||
from ..utils.map.name_covert import avatar_id_to_char_star
|
||||
from ..utils.fonts.starrail_fonts import sr_font_24, sr_font_30, sr_font_58
|
||||
from ..utils.resource.RESOURCE_PATH import CHAR_ICON_PATH, CHAR_PREVIEW_PATH
|
||||
|
||||
half_color = (255, 255, 255, 120)
|
||||
first_color = (29, 29, 29)
|
||||
|
@ -1,34 +1,34 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, Optional, Union
|
||||
from typing import Dict, List, Union, Optional
|
||||
|
||||
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 ..utils.error_reply import UID_HINT
|
||||
from .cal_value import cal_relic_sub_affix, cal_relic_main_affix
|
||||
from ..utils.excel.model import AvatarPromotionConfig, EquipmentPromotionConfig
|
||||
from ..utils.map.SR_MAP_PATH import (
|
||||
AvatarRankSkillUp,
|
||||
EquipmentID2Name,
|
||||
EquipmentID2Rarity,
|
||||
SetId2Name,
|
||||
ItemId2Name,
|
||||
Property2Name,
|
||||
RelicId2SetId,
|
||||
SetId2Name,
|
||||
avatarId2DamageType,
|
||||
avatarId2EnName,
|
||||
EquipmentID2Name,
|
||||
AvatarRankSkillUp,
|
||||
EquipmentID2Rarity,
|
||||
rankId2Name,
|
||||
skillId2Name,
|
||||
avatarId2Name,
|
||||
skillId2Effect,
|
||||
avatarId2EnName,
|
||||
avatarId2Rarity,
|
||||
characterSkillTree,
|
||||
rankId2Name,
|
||||
skillId2AttackType,
|
||||
skillId2Effect,
|
||||
skillId2Name,
|
||||
avatarId2DamageType,
|
||||
)
|
||||
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(
|
||||
@ -250,21 +250,19 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str):
|
||||
|
||||
# 处理基础属性
|
||||
base_attributes = {}
|
||||
avatar_promotion_base = AvatarPromotionConfig.Avatar[str(char['avatarId'])][
|
||||
str(char.get('promotion', 0))
|
||||
]
|
||||
avatar_promotion_base = AvatarPromotionConfig.Avatar[
|
||||
str(char['avatarId'])
|
||||
][str(char.get('promotion', 0))]
|
||||
|
||||
# 攻击力
|
||||
base_attributes['attack'] = (
|
||||
avatar_promotion_base.AttackBase.Value
|
||||
+ avatar_promotion_base.AttackAdd.Value
|
||||
* (char['level'] - 1)
|
||||
+ avatar_promotion_base.AttackAdd.Value * (char['level'] - 1)
|
||||
)
|
||||
# 防御力
|
||||
base_attributes['defence'] = (
|
||||
avatar_promotion_base.DefenceBase.Value
|
||||
+ avatar_promotion_base.DefenceAdd.Value
|
||||
* (char['level'] - 1)
|
||||
+ avatar_promotion_base.DefenceAdd.Value * (char['level'] - 1)
|
||||
)
|
||||
# 血量
|
||||
base_attributes['hp'] = (
|
||||
@ -272,21 +270,17 @@ async def get_data(char: Avatar, sr_data: MihomoData, sr_uid: str):
|
||||
+ avatar_promotion_base.HPAdd.Value * (char['level'] - 1)
|
||||
)
|
||||
# 速度
|
||||
base_attributes['speed'] = (
|
||||
avatar_promotion_base.SpeedBase.Value
|
||||
)
|
||||
base_attributes['speed'] = avatar_promotion_base.SpeedBase.Value
|
||||
# 暴击率
|
||||
base_attributes['CriticalChanceBase'] = (
|
||||
avatar_promotion_base.CriticalChance.Value
|
||||
)
|
||||
base_attributes[
|
||||
'CriticalChanceBase'
|
||||
] = avatar_promotion_base.CriticalChance.Value
|
||||
# 暴击伤害
|
||||
base_attributes['CriticalDamageBase'] = (
|
||||
avatar_promotion_base.CriticalDamage.Value
|
||||
)
|
||||
base_attributes[
|
||||
'CriticalDamageBase'
|
||||
] = avatar_promotion_base.CriticalDamage.Value
|
||||
# 嘲讽
|
||||
base_attributes['BaseAggro'] = (
|
||||
avatar_promotion_base.BaseAggro.Value
|
||||
)
|
||||
base_attributes['BaseAggro'] = avatar_promotion_base.BaseAggro.Value
|
||||
|
||||
char_data['baseAttributes'] = base_attributes
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
import asyncio
|
||||
import json
|
||||
from datetime import datetime
|
||||
import asyncio
|
||||
from pathlib import Path
|
||||
from typing import Dict, Optional
|
||||
from urllib import parse
|
||||
from datetime import datetime
|
||||
from typing import Dict, Optional
|
||||
|
||||
from ..utils.mys_api import mys_api
|
||||
from ..utils.resource.RESOURCE_PATH import PLAYER_PATH
|
||||
|
@ -1,31 +1,30 @@
|
||||
import math
|
||||
from pathlib import Path
|
||||
from typing import List, Optional, Union
|
||||
from typing import List, Union, Optional
|
||||
|
||||
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 (
|
||||
draw_pic_with_ring,
|
||||
get_qq_avatar,
|
||||
draw_pic_with_ring,
|
||||
)
|
||||
|
||||
from ..sruid_utils.api.mys.models import (
|
||||
LocustBlocks,
|
||||
RogueAvatar,
|
||||
RogueBuffitems,
|
||||
RogueMiracles,
|
||||
)
|
||||
from .utils import get_icon
|
||||
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 ..utils.image.convert import convert_img
|
||||
from .utils import get_icon
|
||||
from ..sruid_utils.api.mys.models import (
|
||||
RogueAvatar,
|
||||
LocustBlocks,
|
||||
RogueMiracles,
|
||||
RogueBuffitems,
|
||||
)
|
||||
|
||||
TEXT_PATH = Path(__file__).parent / 'texture2D'
|
||||
white_color = (255, 255, 255)
|
||||
|
@ -1,16 +1,15 @@
|
||||
import asyncio
|
||||
import base64
|
||||
import io
|
||||
import json
|
||||
import base64
|
||||
import asyncio
|
||||
from http.cookies import SimpleCookie
|
||||
from typing import Any, Dict, List, Literal, Tuple, Union
|
||||
from typing import Any, Dict, List, Tuple, Union, Literal
|
||||
|
||||
import qrcode
|
||||
from qrcode.constants import ERROR_CORRECT_L
|
||||
|
||||
from gsuid_core.bot import Bot
|
||||
from gsuid_core.logger import logger
|
||||
from gsuid_core.models import Event
|
||||
from gsuid_core.logger import logger
|
||||
from qrcode.constants import ERROR_CORRECT_L
|
||||
from gsuid_core.segment import MessageSegment
|
||||
|
||||
from ..utils.api import get_sqla
|
||||
|
@ -3,10 +3,10 @@ from typing import Dict, List, Union
|
||||
from msgspec import Struct
|
||||
|
||||
from .read_excel import (
|
||||
RelicSubAffix,
|
||||
RelicMainAffix,
|
||||
AvatarPromotion,
|
||||
EquipmentPromotion,
|
||||
RelicMainAffix,
|
||||
RelicSubAffix,
|
||||
)
|
||||
|
||||
|
||||
@ -84,10 +84,11 @@ class AvatarPromotionConfigModel(Struct):
|
||||
Promotion=promotion_dict[promotion]['Promotion'],
|
||||
PromotionCostList=[
|
||||
PromotionCost(
|
||||
ItemID=item['ItemID'],
|
||||
ItemNum=item['ItemNum']
|
||||
ItemID=item['ItemID'], ItemNum=item['ItemNum']
|
||||
)
|
||||
for item in promotion_dict[promotion]['PromotionCostList']
|
||||
for item in promotion_dict[promotion][
|
||||
'PromotionCostList'
|
||||
]
|
||||
],
|
||||
PlayerLevelRequire=promotion_dict[promotion].get(
|
||||
'PlayerLevelRequire', None
|
||||
@ -97,16 +98,24 @@ class AvatarPromotionConfigModel(Struct):
|
||||
),
|
||||
MaxLevel=promotion_dict[promotion]['MaxLevel'],
|
||||
AttackBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['AttackBase']['Value']
|
||||
Value=promotion_dict[promotion]['AttackBase'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
AttackAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['AttackAdd']['Value']
|
||||
Value=promotion_dict[promotion]['AttackAdd'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
DefenceBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['DefenceBase']['Value']
|
||||
Value=promotion_dict[promotion]['DefenceBase'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
DefenceAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['DefenceAdd']['Value']
|
||||
Value=promotion_dict[promotion]['DefenceAdd'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
HPBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['HPBase']['Value']
|
||||
@ -115,17 +124,25 @@ class AvatarPromotionConfigModel(Struct):
|
||||
Value=promotion_dict[promotion]['HPAdd']['Value']
|
||||
),
|
||||
SpeedBase=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['SpeedBase']['Value']
|
||||
Value=promotion_dict[promotion]['SpeedBase'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
CriticalChance=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['CriticalChance']['Value']
|
||||
Value=promotion_dict[promotion]['CriticalChance'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
CriticalDamage=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['CriticalDamage']['Value']
|
||||
Value=promotion_dict[promotion]['CriticalDamage'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
BaseAggro=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseAggro']['Value']
|
||||
)
|
||||
Value=promotion_dict[promotion]['BaseAggro'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
)
|
||||
for promotion in promotion_dict.keys()
|
||||
}
|
||||
@ -147,10 +164,11 @@ class EquipmentPromotionConfigModel(Struct):
|
||||
Promotion=promotion_dict[promotion]['Promotion'],
|
||||
PromotionCostList=[
|
||||
PromotionCost(
|
||||
ItemID=item['ItemID'],
|
||||
ItemNum=item['ItemNum']
|
||||
ItemID=item['ItemID'], ItemNum=item['ItemNum']
|
||||
)
|
||||
for item in promotion_dict[promotion]['PromotionCostList']
|
||||
for item in promotion_dict[promotion][
|
||||
'PromotionCostList'
|
||||
]
|
||||
],
|
||||
PlayerLevelRequire=promotion_dict[promotion].get(
|
||||
'PlayerLevelRequire', None
|
||||
@ -163,20 +181,30 @@ class EquipmentPromotionConfigModel(Struct):
|
||||
Value=promotion_dict[promotion]['BaseHP']['Value']
|
||||
),
|
||||
BaseHPAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseHPAdd']['Value']
|
||||
Value=promotion_dict[promotion]['BaseHPAdd'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
BaseAttack=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseAttack']['Value']
|
||||
Value=promotion_dict[promotion]['BaseAttack'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
BaseAttackAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseAttackAdd']['Value']
|
||||
Value=promotion_dict[promotion]['BaseAttackAdd'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
BaseDefence=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseDefence']['Value']
|
||||
Value=promotion_dict[promotion]['BaseDefence'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
BaseDefenceAdd=PromotionAttr(
|
||||
Value=promotion_dict[promotion]['BaseDefenceAdd']['Value']
|
||||
)
|
||||
Value=promotion_dict[promotion]['BaseDefenceAdd'][
|
||||
'Value'
|
||||
]
|
||||
),
|
||||
)
|
||||
for promotion in promotion_dict.keys()
|
||||
}
|
||||
@ -203,7 +231,7 @@ class RelicMainAffixConfigModel(Struct):
|
||||
LevelAdd=PromotionAttr(
|
||||
Value=affix_dict[group_id]['LevelAdd']['Value']
|
||||
),
|
||||
IsAvailable=affix_dict[group_id]['IsAvailable']
|
||||
IsAvailable=affix_dict[group_id]['IsAvailable'],
|
||||
)
|
||||
for group_id in affix_dict.keys()
|
||||
}
|
||||
@ -230,7 +258,7 @@ class RelicSubAffixConfigModel(Struct):
|
||||
StepValue=PromotionAttr(
|
||||
Value=affix_dict[group_id]['StepValue']['Value']
|
||||
),
|
||||
StepNum=affix_dict[group_id]['StepNum']
|
||||
StepNum=affix_dict[group_id]['StepNum'],
|
||||
)
|
||||
for group_id in affix_dict.keys()
|
||||
}
|
||||
@ -240,6 +268,8 @@ class RelicSubAffixConfigModel(Struct):
|
||||
|
||||
|
||||
AvatarPromotionConfig = AvatarPromotionConfigModel.from_json(AvatarPromotion)
|
||||
EquipmentPromotionConfig = EquipmentPromotionConfigModel.from_json(EquipmentPromotion)
|
||||
EquipmentPromotionConfig = EquipmentPromotionConfigModel.from_json(
|
||||
EquipmentPromotion
|
||||
)
|
||||
RelicMainAffixConfig = RelicMainAffixConfigModel.from_json(RelicMainAffix)
|
||||
RelicSubAffixConfig = RelicSubAffixConfigModel.from_json(RelicSubAffix)
|
||||
|
@ -1,5 +1,5 @@
|
||||
from pathlib import Path
|
||||
from typing import Dict, List, TypedDict, Union
|
||||
from typing import Dict, List, Union, TypedDict
|
||||
|
||||
from msgspec import json as msgjson
|
||||
|
||||
|
@ -1,31 +1,31 @@
|
||||
import copy
|
||||
import random
|
||||
import time
|
||||
from string import ascii_letters, digits
|
||||
from typing import Any, Dict, Optional, Union, cast
|
||||
import random
|
||||
from string import digits, ascii_letters
|
||||
from typing import Any, Dict, Union, Optional, 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 (
|
||||
AbyssData,
|
||||
AvatarInfo,
|
||||
DailyNoteData,
|
||||
GachaLog,
|
||||
MonthlyAward,
|
||||
AbyssData,
|
||||
RogueData,
|
||||
RogueLocustData,
|
||||
RoleBasicInfo,
|
||||
RoleIndex,
|
||||
AvatarInfo,
|
||||
MonthlyAward,
|
||||
DailyNoteData,
|
||||
RoleBasicInfo,
|
||||
WidgetStamina,
|
||||
RogueLocustData,
|
||||
)
|
||||
from .api import srdbsqla
|
||||
|
||||
RECOGNIZE_SERVER = {
|
||||
'1': 'prod_gf_cn',
|
||||
|
Loading…
x
Reference in New Issue
Block a user