更新黄泉伤害计算

This commit is contained in:
a376148946 2024-03-22 16:58:20 +08:00
parent e227eff522
commit 70a5d0f56f
6 changed files with 315 additions and 3 deletions

View File

@ -4894,6 +4894,156 @@ class Sparkle(BaseAvatar):
return skill_info_list
class Acheron(BaseAvatar):
Buff: BaseAvatarBuff
def __init__(self, char: DamageInstanceAvatar, skills: List[DamageInstanceSkill]):
super().__init__(char=char, skills=skills)
self.eidolon_attribute: Dict[str, float] = {}
self.extra_ability_attribute: Dict[str, float] = {}
self.eidolons()
self.extra_ability()
def Technique(self):
pass
def eidolons(self):
if self.avatar_rank >= 1:
self.eidolon_attribute["CriticalChanceBase"] = 0.18
if self.avatar_rank >= 4:
self.eidolon_attribute["Ultra_DmgRatio"] = 0.08
if self.avatar_rank >= 6:
self.eidolon_attribute["Ultra_AllDamageResistancePenetration"] = 0.2
def extra_ability(self):
self.extra_ability_attribute["AttackAddedRatio"] = 0.45
async def getdamage(
self,
base_attr: Dict[str, float],
attribute_bonus: Dict[str, float],
):
attribute_bonus["AllDamageAddedRatio"] = attribute_bonus.get("AllDamageAddedRatio", 0) + 0.9
damage1, damage2, damage3 = await calculate_damage(
base_attr,
attribute_bonus,
"fujia",
"fujia",
"Thunder",
0.44,
self.avatar_level,
)
skill_info_list = []
# 计算普攻伤害
skill_multiplier = self.Skill_num("Normal", "Normal")
if self.avatar_rank >= 6:
damagelist1 = await calculate_damage(
base_attr,
attribute_bonus,
"Normal",
"Ultra",
self.avatar_element,
skill_multiplier,
self.avatar_level,
)
else:
damagelist1 = await calculate_damage(
base_attr,
attribute_bonus,
"Normal",
"Normal",
self.avatar_element,
skill_multiplier,
self.avatar_level,
)
damagelist1[0] = damagelist1[0] * 1.6
damagelist1[1] = damagelist1[1] * 1.6
damagelist1[2] = damagelist1[2] * 1.6 + damage3
skill_info_list.append({"name": "普攻", "damagelist": damagelist1})
# 计算战技伤害
skill_multiplier = self.Skill_num("BPSkill", "BPSkill")
if self.avatar_rank >= 6:
damagelist2 = await calculate_damage(
base_attr,
attribute_bonus,
"BPSkill",
"Ultra",
self.avatar_element,
skill_multiplier,
self.avatar_level,
)
else:
damagelist2 = await calculate_damage(
base_attr,
attribute_bonus,
"BPSkill",
"Normal",
self.avatar_element,
skill_multiplier,
self.avatar_level,
)
damagelist2[0] = damagelist2[0] * 1.6
damagelist2[1] = damagelist2[1] * 1.6
damagelist2[2] = damagelist2[2] * 1.6 + damage3
skill_info_list.append({"name": "战技", "damagelist": damagelist2})
# 计算终结技
add_attr_bonus = copy.deepcopy(attribute_bonus)
add_attr_bonus["AllDamageResistancePenetration"] = (
add_attr_bonus.get("AllDamageResistancePenetration", 0) + 0.2
)
#啼泽雨斩
skill_multiplier = self.Skill_num("Ultra", "Ultra_1_d")
damagelist_u_1_d = await calculate_damage(
base_attr,
add_attr_bonus,
"Ultra",
"Ultra",
self.avatar_element,
skill_multiplier,
self.avatar_level,
)
damagelist_u_1_d[0] = damagelist_u_1_d[0] * 1.6
damagelist_u_1_d[1] = damagelist_u_1_d[1] * 1.6
damagelist_u_1_d[2] = damagelist_u_1_d[2] * 1.6 + damage3
skill_info_list.append({"name": "啼泽雨斩", "damagelist": damagelist_u_1_d})
#黄泉返渡
skill_multiplier = self.Skill_num("Ultra", "Ultra_1_a")
damagelist_u_1_a = await calculate_damage(
base_attr,
add_attr_bonus,
"Ultra",
"Ultra",
self.avatar_element,
skill_multiplier,
self.avatar_level,
)
damagelist_u_1_a_e = await calculate_damage(
base_attr,
add_attr_bonus,
"Ultra",
"Ultra",
self.avatar_element,
0.25,
self.avatar_level,
)
damagelist_u_1_a[0] = damagelist_u_1_a[0] * 1.6 + (damagelist_u_1_a_e[0] * 1.6) * 6
damagelist_u_1_a[1] = damagelist_u_1_a[1] * 1.6 + (damagelist_u_1_a_e[1] * 1.6) * 6
damagelist_u_1_a[2] = damagelist_u_1_a[2] * 1.6 + (damagelist_u_1_a_e[2] * 1.6) * 6 + damage3
skill_info_list.append({"name": "黄泉返渡", "damagelist": damagelist_u_1_a})
#总伤害
damagelist_u = {}
damagelist_u[0] = damagelist_u_1_d[0] * 3 + damagelist_u_1_a[0]
damagelist_u[1] = damagelist_u_1_d[1] * 3 + damagelist_u_1_a[1]
damagelist_u[2] = damagelist_u_1_d[2] * 3 + damagelist_u_1_a[2]
skill_info_list.append({"name": "终结技总伤", "damagelist": damagelist_u})
return skill_info_list
class AvatarDamage:
@classmethod
def create(cls, char: DamageInstanceAvatar, skills: List[DamageInstanceSkill]):
@ -4901,6 +5051,8 @@ class AvatarDamage:
return XueYi(char, skills)
if char.id_ == 1306:
return Sparkle(char, skills)
if char.id_ == 1308:
return Acheron(char, skills)
if char.id_ == 1303:
return RuanMei(char, skills)
if char.id_ == 1307:

View File

@ -1293,5 +1293,56 @@
],
"Maze": [20],
"Ultra_Use": [120]
},
"1308": {
"Normal": [
0.5000000004656613, 0.6000000005587935, 0.7000000006519258,
0.8000000007450581, 0.9000000008381903, 1.0000000000931323,
1.1000000000931323, 1.2000000001862645, 1.3000000002793968
],
"BPSkill": [
0.8000000007450581, 0.8800000008195639, 0.9600000008940697,
1.040000000037253, 1.1200000001117587, 1.2000000001862645,
1.3000000002793968, 1.400000000372529, 1.5000000004656613,
1.6000000005587935, 1.6800000006332994, 1.7600000007078052,
1.840000000782311, 1.9200000008568168, 2
],
"Ultra_1_d": [
0.14399999985471368, 0.1536000003106892, 0.1632000000681728,
0.17280000052414834, 0.18240000028163195, 0.19200000003911555,
0.20399999991059303, 0.21599999978207052, 0.227999999653548,
0.24000000022351742, 0.24959999998100102, 0.2591999997384846,
0.26880000019446015, 0.27839999995194376, 0.28799999970942736
],
"Ultra_1_a": [
0.3600000003352761, 0.3840000000782311, 0.40799999982118607,
0.43200000026263297, 0.45600000000558794, 0.48000000044703484,
0.5100000004749745, 0.5400000005029142, 0.5700000005308539,
0.6000000005587935, 0.6240000003017485, 0.6480000000447035,
0.6720000004861504, 0.6960000002291054, 0.7200000006705523
],
"Ultra_2": [
0.7200000006705523, 0.7680000001564622, 0.8160000003408641,
0.8640000005252659, 0.9120000007096678, 0.9600000008940697,
1.0200000000186265, 1.0800000000745058, 1.1400000001303852,
1.2000000001862645, 1.2479999996721745, 1.2959999998565763,
1.3440000000409782, 1.39200000022538, 1.440000000409782
],
"Ultra_d_max": [
2.2320000000763685, 2.380800000857562, 2.5296000002417713,
2.678400000324473, 2.8272000004071742, 2.9760000004898757,
3.162000000011176, 3.3479999997653067, 3.5340000002179295,
3.7200000006705523, 3.8688000007532537, 4.017599999904633,
4.166399999987334, 4.3152000000700355, 4.464000000152737
],
"Talent": [
0.10000000009313226, 0.11000000010244548, 0.12000000011175871,
0.13000000012107193, 0.14000000013038516, 0.1500000001396984,
0.1625000003259629, 0.17499999981373549, 0.1875,
0.20000000018626451, 0.21000000019557774, 0.22000000020489097,
0.2300000002142042, 0.24000000022351742, 0.25000000023283064
],
"Maze": [20],
"Ultra_Use": [120]
}
}

View File

@ -627,6 +627,30 @@
]
}
},
"23024": {
"Param": {
"AllDamageAddedRatio": [
0.24000000022351742, 0.2800000002607703, 0.3200000002980232,
0.3600000003352761, 0.40000000037252903
],
"UltraDmgAdd": [
0.24000000022351742, 0.2800000002607703, 0.3200000002980232,
0.3600000003352761, 0.40000000037252903
]
}
},
"23023": {
"Param": {
"CriticalDamageBase": [
0.40000000037252903, 0.4600000004284084, 0.5200000004842877,
0.5800000005401671, 0.6400000005960464
],
"DmgRatio": [
0.10000000009313226, 1.1500000001396984, 1.3000000002793968,
1.4500000004190952, 1.6000000005587935
]
}
},
"21041": {
"Param": {
"AllDamageAddedRatio": [

View File

@ -2670,7 +2670,83 @@ class ConcertforTwo(BaseWeapon):
weapon_effect["21043"]["Param"]["AllDamageAddedRatio"][
self.weapon_rank - 1
]
* 2
* 4
)
)
return attribute_bonus
# 行于流逝的岸
class AlongthePassingShore(BaseWeapon):
weapon_base_attributes: Dict
def __init__(self, weapon: DamageInstanceWeapon):
super().__init__(weapon)
async def check(self):
# 装备者对陷入【泡影】状态的目标造成的伤害提高24%终结技造成的伤害额外提高24%
return True
async def weapon_ability(
self,
Ultra_Use: float,
base_attr: Dict[str, float],
attribute_bonus: Dict[str, float],
):
if await self.check():
all_damage_added_ratio = attribute_bonus.get("AllDamageAddedRatio", 0)
attribute_bonus["AllDamageAddedRatio"] = (
all_damage_added_ratio
+ (
weapon_effect["23024"]["Param"]["AllDamageAddedRatio"][
self.weapon_rank - 1
]
)
)
Ultra_Dmg_Add = attribute_bonus.get("UltraDmgAdd", 0)
attribute_bonus["UltraDmgAdd"] = (
Ultra_Dmg_Add
+ (
weapon_effect["23024"]["Param"]["UltraDmgAdd"][
self.weapon_rank - 1
]
)
)
return attribute_bonus
# 命运从未公平
class InherentlyUnjustDestiny(BaseWeapon):
weapon_base_attributes: Dict
def __init__(self, weapon: DamageInstanceWeapon):
super().__init__(weapon)
async def check(self):
# 当装备者为我方目标提供护盾时使装备者的暴击伤害提高40%持续2回合。当装备者发动追加攻击击中敌方目标时有100%的基础概率使受到攻击的敌方目标受到的伤害提高10%持续2回合。
return True
async def weapon_ability(
self,
Ultra_Use: float,
base_attr: Dict[str, float],
attribute_bonus: Dict[str, float],
):
if await self.check():
Critical_Damage_Base = attribute_bonus.get("CriticalDamageBase", 0)
attribute_bonus["CriticalDamageBase"] = (
Critical_Damage_Base
+ (
weapon_effect["23023"]["Param"]["CriticalDamageBase"][
self.weapon_rank - 1
]
)
)
Dmg_Ratio = attribute_bonus.get("DmgRatio", 0)
attribute_bonus["DmgRatio"] = (
Dmg_Ratio
+ (
weapon_effect["23023"]["Param"]["DmgRatio"][
self.weapon_rank - 1
]
)
)
return attribute_bonus
@ -2680,8 +2756,12 @@ class Weapon:
def create(cls, weapon: DamageInstanceWeapon):
if weapon.id_ == 23019:
return PastSelfinMirror(weapon)
if weapon.id_ == 23024:
return AlongthePassingShore(weapon)
if weapon.id_ == 23021:
return EarthlyEscapade(weapon)
if weapon.id_ == 23023:
return InherentlyUnjustDestiny(weapon)
if weapon.id_ == 21035:
return WhatIsReal(weapon)
if weapon.id_ == 21036:

View File

@ -89,7 +89,6 @@
"StatusResistanceBase": 0.0,
"AttributeAddedRatio": 1
},
,
{
"role": "黑天鹅",
"HPDelta": 0.0,

View File

@ -37,11 +37,14 @@
"1215": ["寒鸦"],
"1217": ["藿藿"],
"1302": ["银枝"],
"1305": ["真理医生"],
"1305": ["真理医生","真理"],
"1303": ["阮•梅", "阮梅"],
"1306": ["花火"],
"1307": ["黑天鹅"],
"1312": ["米沙"],
"1301": ["加拉赫"],
"1304": ["砂金"],
"1308": ["黄泉"],
"8000": [
"开拓者",
"爷",
@ -155,8 +158,11 @@
"21040": ["银河沦陷日"],
"21041": ["好戏开演"],
"21042": ["铭记于心的约定"],
"21043": ["两个人的演唱会","演唱会"],
"23021": ["游戏尘寰", "游戏"],
"23022": ["重塑时光之忆", "时光之忆"],
"23023": ["命运从未公平", "从未公平"],
"23024": ["行于流逝的岸", "流逝的岸"],
"24003": ["孤独的疗愈"]
},
"relic_sets": {