Skip to content

Commit b6e30b3

Browse files
AmbratolmAmbratolm
authored andcommitted
Fixed attack gold_penalty value validation bug
1 parent f951690 commit b6e30b3

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

db/attack.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,14 @@ def perform(self):
167167
),
168168
),
169169
) # Modifier decreases if winner level > loser level, increases otherwise
170-
self.gold_penalty = min(
171-
int(
172-
min(
173-
(
174-
loser.gold
175-
* (self.GOLD_PENALTY_FACTOR_BASE * self.gold_penalty_modifier)
176-
),
177-
self.GOLD_PENALTY_MAX,
178-
)
179-
),
180-
loser.gold,
170+
self.gold_penalty = int(
171+
min(
172+
(
173+
loser.gold
174+
* (self.GOLD_PENALTY_FACTOR_BASE * self.gold_penalty_modifier)
175+
),
176+
self.GOLD_PENALTY_MAX,
177+
)
181178
)
182179

183180
# Apply Gold Changes

0 commit comments

Comments
 (0)