New math
This commit is contained in:
1 parent
3370d5c132
commit
604de30345
7 files changed
+889
-29
No files matched your search
+8
-2
@@ -95,7 +95,13 @@ def calculate_coaching(session: CoachingSession) -> CoachingResult:
|
||||
if minutes <= 0:
|
||||
raise ValueError("Продолжительность захода должна быть больше нуля")
|
||||
|
||||
independence_multiplier = 1.5 if session.kitten_independence == "несамостоятельно" else 1.0
|
||||
# The multiplier belongs to the escort (Krylan/Belka), not to the kitten.
|
||||
# ZU is always treated as independent according to the calculator rules.
|
||||
independence_multiplier = (
|
||||
1.5
|
||||
if session.skill == "ЛУ" and session.kitten_independence == "несамостоятельно"
|
||||
else 1.0
|
||||
)
|
||||
kitten_count = 1 + len(session.extra_kittens)
|
||||
# Several wards share one report: the second ward pays 1.5x, and each
|
||||
# following ward adds a further 1.15x multiplier instead of another full
|
||||
@@ -106,7 +112,7 @@ def calculate_coaching(session: CoachingSession) -> CoachingResult:
|
||||
return CoachingResult(
|
||||
minutes=minutes,
|
||||
escort_points=_points(minutes * escort_multiplier / 5),
|
||||
kitten_points=_points(minutes * 2 / 5),
|
||||
kitten_points=_points(minutes / 5),
|
||||
kitten_count=kitten_count,
|
||||
escort_multiplier=round(escort_multiplier, 4),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user