Skip to content

Commit

Permalink
feat(single-mode): adjust training score
Browse files Browse the repository at this point in the history
  • Loading branch information
NateScarlet committed Aug 18, 2021
1 parent 83b0c49 commit c40fda9
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion auto_derby/single_mode/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,12 @@ def score(self, ctx: Context) -> float:
),
)

partner_effect = 0
for i in self.partners:
if i.type != i.TYPE_OTHER:
# already included in other attrs
continue
partner_effect = 2 + i.level
friendship_score = len(
tuple(i for i in self.partners if i.level < 4 and i.type != i.TYPE_OTHER)
) * mathtools.interpolate(
Expand Down Expand Up @@ -504,7 +510,15 @@ def score(self, ctx: Context) -> float:
target_level_score -= (self.level - target_level) * 5

return (
spd + sta + pow + per + int_ + skill + target_level_score + friendship_score
spd
+ sta
+ pow
+ per
+ int_
+ skill
+ partner_effect
+ friendship_score
+ target_level_score
) * success_rate


Expand Down

0 comments on commit c40fda9

Please sign in to comment.