refactor(xp): remove reducer

This commit is contained in:
Anhgelus Morhtuuzh 2025-05-13 13:26:32 +02:00
parent 5af6bd672c
commit e0a8f66344
Signed by: anhgelus
GPG key ID: CAD341EFA92DDDE5
4 changed files with 1 additions and 228 deletions

View file

@ -1,7 +1,6 @@
package exp
import (
"github.com/anhgelus/gokord"
"math"
"slices"
)
@ -43,14 +42,3 @@ func LevelXP(level uint) uint {
math.Pow(float64(5*level), 2),
))
}
func Lose(time uint, xp uint) uint {
if gokord.Debug {
return uint(math.Floor(
math.Pow(float64(time), 3) * math.Pow(10, -2+math.Log(float64(time))) * math.Floor(float64(xp/500)+1),
)) // a little bit faster to lose exp
}
return uint(math.Floor(
math.Pow(float64(time), 2) * math.Pow(10, -2+math.Log(float64(time/85))) * math.Floor(float64(xp/500)+1),
))
}