From 1663f8afc12760e8d73da13f12d6c9684a5d0669 Mon Sep 17 00:00:00 2001 From: ElTata <eltata@firemail.cc> Date: Fri, 10 Jul 2020 17:00:11 +0200 Subject: [PATCH] fix: chclass pen is exactly full ttl Change rppenstep in chclass pen to rpstep, and different formula for lvl >60. --- Irpg/Main.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Irpg/Main.pm b/Irpg/Main.pm index 0cf90c1..9fccd84 100644 --- a/Irpg/Main.pm +++ b/Irpg/Main.pm @@ -158,7 +158,10 @@ sub penalize { $pen_key = 'pen_title'; } elsif ($type eq "chclass") { - $pen = int($opts->{rpbase} * ($opts->{rppenstep}**$rps->{$username}{level})); + $pen = $rps->{$username}{level} <= 60 ? + int( $opts->{rpbase} * ($opts->{rpstep}**$rps->{$username}{level})) : + int(($opts->{rpbase} * ($opts->{rpstep}**60)) + + (86400*($rps->{$username}{level} - 60))); $reason = 'training'; $pen_key = 'pen_class'; } -- GitLab