Skip to content

Commit 89d3ac4

Browse files
committed
Fix Mar7th defence clac
1 parent f96b7a9 commit 89d3ac4

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "starrail_damage_cal"
3-
version = "1.5.4"
3+
version = "1.5.5"
44
description = "For StarRail Role Damage Cal"
55
authors = [
66
{name = "qwerdvd", email = "105906879+qwerdvd@users.noreply.github.com"},

starrail_damage_cal/damage/AvatarDamage/AvatarDamage.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,10 +2291,9 @@ async def getdamage(
22912291
self.avatar_level,
22922292
)
22932293
if self.avatar_rank >= 4:
2294-
defence = (
2295-
base_attr["defence"] * (1 + attribute_bonus["DefenceAddedRatio"])
2296-
+ attribute_bonus["DefenceDelta"]
2297-
)
2294+
defence = base_attr.get("defence", 0) * (
2295+
1 + attribute_bonus.get("DefenceAddedRatio", 0)
2296+
) + attribute_bonus.get("DefenceDelta", 0)
22982297
damage_add = defence * 0.3
22992298
damagelist4[0] += damage_add
23002299
damagelist4[1] += damage_add

0 commit comments

Comments
 (0)