mirror of
https://github.com/PaiGramTeam/StarRailDamageCal.git
synced 2024-11-30 18:59:26 +00:00
🔥Fix buff cal
This commit is contained in:
parent
092a9d8174
commit
621313dda2
@ -98,8 +98,7 @@ class Seele(BaseAvatar):
|
|||||||
skill_multiplier = self.Skill_num("Ultra", "Ultra")
|
skill_multiplier = self.Skill_num("Ultra", "Ultra")
|
||||||
add_attr_bonus = copy.deepcopy(attribute_bonus)
|
add_attr_bonus = copy.deepcopy(attribute_bonus)
|
||||||
add_attr_bonus["ignore_defence"] = 0.45 + add_attr_bonus.get(
|
add_attr_bonus["ignore_defence"] = 0.45 + add_attr_bonus.get(
|
||||||
"ignore_defence",
|
"ignore_defence", 0
|
||||||
0,
|
|
||||||
)
|
)
|
||||||
damagelist4 = await calculate_damage(
|
damagelist4 = await calculate_damage(
|
||||||
base_attr,
|
base_attr,
|
||||||
@ -511,8 +510,7 @@ class Danhengil(BaseAvatar):
|
|||||||
)
|
)
|
||||||
critical_buff = 4 * critical_damage_add
|
critical_buff = 4 * critical_damage_add
|
||||||
add_attr_bonus["CriticalDamageBase"] = critical_buff + add_attr_bonus.get(
|
add_attr_bonus["CriticalDamageBase"] = critical_buff + add_attr_bonus.get(
|
||||||
"CriticalDamageBase",
|
"CriticalDamageBase", 0
|
||||||
0,
|
|
||||||
)
|
)
|
||||||
damage1, damage2, damage3 = await calculate_damage(
|
damage1, damage2, damage3 = await calculate_damage(
|
||||||
base_attr,
|
base_attr,
|
||||||
@ -568,8 +566,7 @@ class Argenti(BaseAvatar):
|
|||||||
)
|
)
|
||||||
if self.avatar_rank >= 4:
|
if self.avatar_rank >= 4:
|
||||||
attribute_bonus["CriticalDamageBase"] = 0.08 + attribute_bonus.get(
|
attribute_bonus["CriticalDamageBase"] = 0.08 + attribute_bonus.get(
|
||||||
"CriticalDamageBase",
|
"CriticalDamageBase", 0
|
||||||
0,
|
|
||||||
)
|
)
|
||||||
attribute_bonus["CriticalChanceBase"] = (
|
attribute_bonus["CriticalChanceBase"] = (
|
||||||
talent_cc_add * 2 + attribute_bonus.get("CriticalChanceBase", 0)
|
talent_cc_add * 2 + attribute_bonus.get("CriticalChanceBase", 0)
|
||||||
@ -1088,10 +1085,9 @@ class Blade(BaseAvatar):
|
|||||||
damagelist7[1] += damagelist6[1]
|
damagelist7[1] += damagelist6[1]
|
||||||
damagelist7[2] += damagelist6[2]
|
damagelist7[2] += damagelist6[2]
|
||||||
if self.avatar_rank >= 6:
|
if self.avatar_rank >= 6:
|
||||||
hp = (
|
hp = base_attr["hp"] * (
|
||||||
base_attr["hp"] * (1 + attribute_bonus["HPAddedRatio"])
|
1 + attribute_bonus.get("HPAddedRatio", 0)
|
||||||
+ attribute_bonus["HPDelta"]
|
) + attribute_bonus.get("HPDelta", 0)
|
||||||
)
|
|
||||||
damage_add = hp * 0.5
|
damage_add = hp * 0.5
|
||||||
damagelist7[0] += damage_add
|
damagelist7[0] += damage_add
|
||||||
damagelist7[1] += damage_add
|
damagelist7[1] += damage_add
|
||||||
@ -2036,10 +2032,9 @@ class Lynx(BaseAvatar):
|
|||||||
skill_num = self.Skill_num("BPSkill", "BPSkill_HP_G")
|
skill_num = self.Skill_num("BPSkill", "BPSkill_HP_G")
|
||||||
if self.avatar_rank >= 6:
|
if self.avatar_rank >= 6:
|
||||||
skill_multiplier += 0.06
|
skill_multiplier += 0.06
|
||||||
hp = (
|
hp = base_attr["hp"] * (
|
||||||
base_attr["hp"] * (1 + attribute_bonus["HPAddedRatio"])
|
1 + attribute_bonus.get("HPAddedRatio", 0)
|
||||||
+ attribute_bonus["HPDelta"]
|
) + attribute_bonus.get("HPDelta", 0)
|
||||||
)
|
|
||||||
hp_add = hp * skill_multiplier + skill_num
|
hp_add = hp * skill_multiplier + skill_num
|
||||||
attribute_bonus["HPDelta"] = attribute_bonus.get("HPDelta", 0) + hp_add
|
attribute_bonus["HPDelta"] = attribute_bonus.get("HPDelta", 0) + hp_add
|
||||||
|
|
||||||
@ -2341,13 +2336,14 @@ class Bronya(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 终结技增加伤害
|
# 终结技增加伤害
|
||||||
attribute_bonus["AttackAddedRatio"] = attribute_bonus.get(
|
attribute_bonus["AttackAddedRatio"] = attribute_bonus.get(
|
||||||
"AttackAddedRatio",
|
"AttackAddedRatio", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_A")
|
) + self.Skill_num("Ultra", "Ultra_A")
|
||||||
|
|
||||||
add_critical_damage_base = (
|
add_critical_damage_base = (
|
||||||
attribute_bonus.get("CriticalDamageBase", 0)
|
attribute_bonus.get("CriticalDamageBase", 0)
|
||||||
* self.Skill_num("Ultra", "Ultra")
|
* self.Skill_num("Ultra", "Ultra")
|
||||||
) + self.Skill_num("Ultra", "Ultra_G")
|
) + self.Skill_num("Ultra", "Ultra_G")
|
||||||
|
|
||||||
attribute_bonus["CriticalDamageBase"] = (
|
attribute_bonus["CriticalDamageBase"] = (
|
||||||
attribute_bonus.get("CriticalDamageBase", 0) + add_critical_damage_base
|
attribute_bonus.get("CriticalDamageBase", 0) + add_critical_damage_base
|
||||||
)
|
)
|
||||||
@ -2404,16 +2400,13 @@ class Yukong(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 终结技增加伤害
|
# 终结技增加伤害
|
||||||
attribute_bonus["AttackAddedRatio"] = attribute_bonus.get(
|
attribute_bonus["AttackAddedRatio"] = attribute_bonus.get(
|
||||||
"AttackAddedRatio",
|
"AttackAddedRatio", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("BPSkill", "BPSkill")
|
) + self.Skill_num("BPSkill", "BPSkill")
|
||||||
attribute_bonus["CriticalChanceBase"] = attribute_bonus.get(
|
attribute_bonus["CriticalChanceBase"] = attribute_bonus.get(
|
||||||
"CriticalChanceBase",
|
"CriticalChanceBase", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_CC")
|
) + self.Skill_num("Ultra", "Ultra_CC")
|
||||||
attribute_bonus["CriticalDamageBase"] = attribute_bonus.get(
|
attribute_bonus["CriticalDamageBase"] = attribute_bonus.get(
|
||||||
"CriticalDamageBase",
|
"CriticalDamageBase", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_CD")
|
) + self.Skill_num("Ultra", "Ultra_CD")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -2590,8 +2583,7 @@ class Luka(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 计算终结技提供的易伤加成
|
# 计算终结技提供的易伤加成
|
||||||
attribute_bonus["DmgRatio"] = attribute_bonus.get(
|
attribute_bonus["DmgRatio"] = attribute_bonus.get(
|
||||||
"DmgRatio",
|
"DmgRatio", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_d")
|
) + self.Skill_num("Ultra", "Ultra_d")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -2707,8 +2699,7 @@ class DanHeng(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 计算穿透加成
|
# 计算穿透加成
|
||||||
attribute_bonus["WindResistancePenetration"] = attribute_bonus.get(
|
attribute_bonus["WindResistancePenetration"] = attribute_bonus.get(
|
||||||
"WindResistancePenetration",
|
"WindResistancePenetration", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Talent", "Talent")
|
) + self.Skill_num("Talent", "Talent")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -2786,8 +2777,7 @@ class Arlan(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 计算天赋伤害加成
|
# 计算天赋伤害加成
|
||||||
attribute_bonus["AllDamageAddedRatio"] = attribute_bonus.get(
|
attribute_bonus["AllDamageAddedRatio"] = attribute_bonus.get(
|
||||||
"AllDamageAddedRatio",
|
"AllDamageAddedRatio", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Talent", "Talent")
|
) + self.Skill_num("Talent", "Talent")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -2863,8 +2853,7 @@ class Asta(BaseAvatar):
|
|||||||
+ self.Skill_num("Talent", "Talent") * 5
|
+ self.Skill_num("Talent", "Talent") * 5
|
||||||
)
|
)
|
||||||
attribute_bonus["SpeedDelta"] = attribute_bonus.get(
|
attribute_bonus["SpeedDelta"] = attribute_bonus.get(
|
||||||
"SpeedDelta",
|
"SpeedDelta", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra")
|
) + self.Skill_num("Ultra", "Ultra")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -3116,8 +3105,7 @@ class Pela(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 计算终结技降防
|
# 计算终结技降防
|
||||||
attribute_bonus["ignore_defence"] = attribute_bonus.get(
|
attribute_bonus["ignore_defence"] = attribute_bonus.get(
|
||||||
"ignore_defence",
|
"ignore_defence", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_d")
|
) + self.Skill_num("Ultra", "Ultra_d")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -3202,8 +3190,7 @@ class Sampo(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 计算终结技持续伤害加成
|
# 计算终结技持续伤害加成
|
||||||
attribute_bonus["DOTDmgAdd"] = attribute_bonus.get(
|
attribute_bonus["DOTDmgAdd"] = attribute_bonus.get(
|
||||||
"DOTDmgAdd",
|
"DOTDmgAdd", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_d")
|
) + self.Skill_num("Ultra", "Ultra_d")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -3774,15 +3761,13 @@ class Hanya(BaseAvatar):
|
|||||||
):
|
):
|
||||||
# 计算天赋易伤加成
|
# 计算天赋易伤加成
|
||||||
attribute_bonus["DmgRatio"] = attribute_bonus.get(
|
attribute_bonus["DmgRatio"] = attribute_bonus.get(
|
||||||
"DmgRatio",
|
"DmgRatio", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Talent", "Talent")
|
) + self.Skill_num("Talent", "Talent")
|
||||||
if self.avatar_rank >= 6:
|
if self.avatar_rank >= 6:
|
||||||
attribute_bonus["DmgRatio"] = attribute_bonus.get("DmgRatio", 0) + 0.1
|
attribute_bonus["DmgRatio"] = attribute_bonus.get("DmgRatio", 0) + 0.1
|
||||||
|
|
||||||
attribute_bonus["AttackAddedRatio"] = attribute_bonus.get(
|
attribute_bonus["AttackAddedRatio"] = attribute_bonus.get(
|
||||||
"AttackAddedRatio",
|
"AttackAddedRatio", 0
|
||||||
0,
|
|
||||||
) + self.Skill_num("Ultra", "Ultra_A")
|
) + self.Skill_num("Ultra", "Ultra_A")
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
@ -4488,10 +4473,9 @@ class Aventurine(BaseAvatar):
|
|||||||
attribute_bonus: Dict[str, float],
|
attribute_bonus: Dict[str, float],
|
||||||
):
|
):
|
||||||
# 天赋增加暴击
|
# 天赋增加暴击
|
||||||
defence = (
|
defence = base_attr["defence"] * (
|
||||||
base_attr["defence"] * (1 + attribute_bonus["DefenceAddedRatio"])
|
1 + attribute_bonus.get("DefenceAddedRatio", 0)
|
||||||
+ attribute_bonus["DefenceDelta"]
|
) + attribute_bonus.get("DefenceDelta", 0)
|
||||||
)
|
|
||||||
if defence > 1600:
|
if defence > 1600:
|
||||||
adddefrnce = defence - 1600
|
adddefrnce = defence - 1600
|
||||||
Critical_Chance_Base = (defence / 100) * 0.02
|
Critical_Chance_Base = (defence / 100) * 0.02
|
||||||
@ -4695,24 +4679,29 @@ class Robin(BaseAvatar):
|
|||||||
base_attr: Dict[str, float],
|
base_attr: Dict[str, float],
|
||||||
attribute_bonus: Dict[str, float],
|
attribute_bonus: Dict[str, float],
|
||||||
):
|
):
|
||||||
|
|
||||||
# 战技伤害加成
|
# 战技伤害加成
|
||||||
all_damage_added_ratio = attribute_bonus.get("AllDamageAddedRatio", 0)
|
all_damage_added_ratio = attribute_bonus.get("AllDamageAddedRatio", 0)
|
||||||
attribute_bonus["AllDamageAddedRatio"] = all_damage_added_ratio + self.Skill_num("BPSkill", "BPSkill")
|
attribute_bonus["AllDamageAddedRatio"] = (
|
||||||
|
all_damage_added_ratio + self.Skill_num("BPSkill", "BPSkill")
|
||||||
|
)
|
||||||
|
|
||||||
# 终结技攻击加成计算
|
# 终结技攻击加成计算
|
||||||
attack = (
|
attack = (
|
||||||
base_attr["attack"] * (1 + attribute_bonus["AttackAddedRatio"])
|
base_attr["attack"] * (1 + attribute_bonus["AttackAddedRatio"])
|
||||||
+ attribute_bonus["AttackDelta"]
|
+ attribute_bonus["AttackDelta"]
|
||||||
)
|
)
|
||||||
add_attack = (attack * self.Skill_num("Ultra", "Ultra_A")) + self.Skill_num("Ultra", "Ultra_G")
|
add_attack = (attack * self.Skill_num("Ultra", "Ultra_A")) + self.Skill_num(
|
||||||
attribute_bonus["AttackDelta"] = attribute_bonus.get("AttackDelta", 0) + add_attack
|
"Ultra", "Ultra_G"
|
||||||
|
)
|
||||||
|
attribute_bonus["AttackDelta"] = (
|
||||||
|
attribute_bonus.get("AttackDelta", 0) + add_attack
|
||||||
|
)
|
||||||
|
|
||||||
# 天赋爆伤加成
|
# 天赋爆伤加成
|
||||||
Critical_Damage_Base = attribute_bonus.get("CriticalDamageBase", 0)
|
Critical_Damage_Base = attribute_bonus.get("CriticalDamageBase", 0)
|
||||||
attribute_bonus["CriticalDamageBase"] = Critical_Damage_Base + self.Skill_num("Talent", "Talent")
|
attribute_bonus["CriticalDamageBase"] = Critical_Damage_Base + self.Skill_num(
|
||||||
|
"Talent", "Talent"
|
||||||
|
)
|
||||||
|
|
||||||
skill_info_list = []
|
skill_info_list = []
|
||||||
# 计算普攻伤害
|
# 计算普攻伤害
|
||||||
@ -4737,10 +4726,10 @@ class Robin(BaseAvatar):
|
|||||||
# 计算追击伤害
|
# 计算追击伤害
|
||||||
skill_multiplier = self.Skill_num("Ultra", "Ultra")
|
skill_multiplier = self.Skill_num("Ultra", "Ultra")
|
||||||
add_attr_bonus = copy.deepcopy(attribute_bonus)
|
add_attr_bonus = copy.deepcopy(attribute_bonus)
|
||||||
add_attr_bonus['CriticalDamageBase'] = 1
|
add_attr_bonus["CriticalDamageBase"] = 1
|
||||||
add_attr_bonus['CriticalChanceBase'] = 0.95
|
add_attr_bonus["CriticalChanceBase"] = 0.95
|
||||||
if self.avatar_rank >= 6:
|
if self.avatar_rank >= 6:
|
||||||
add_attr_bonus['CriticalDamageBase'] = 5.5
|
add_attr_bonus["CriticalDamageBase"] = 5.5
|
||||||
damagelist4 = await calculate_damage(
|
damagelist4 = await calculate_damage(
|
||||||
base_attr,
|
base_attr,
|
||||||
add_attr_bonus,
|
add_attr_bonus,
|
||||||
|
Loading…
Reference in New Issue
Block a user