aboutsummaryrefslogtreecommitdiff
path: root/xp/functions.go
diff options
context:
space:
mode:
authorWilliam Hergès <anhgelus.morhtuuzh@proton.me>2025-05-13 21:13:59 +0200
committerGitHub <noreply@github.com>2025-05-13 21:13:59 +0200
commit8d6af4b6aa8f4902316c7f30c5229c97b0ec1a81 (patch)
treed19607355cfa0a180d3269d78e7e2249aa3d2277 /xp/functions.go
parent9e826eee980634b82d6981a868b045f3d4b48852 (diff)
parent75ca960199b85f3f4b491652c837d297827e40ce (diff)
Merge pull request #8 from anhgelus/v3
V3
Diffstat (limited to 'xp/functions.go')
-rw-r--r--xp/functions.go41
1 files changed, 0 insertions, 41 deletions
diff --git a/xp/functions.go b/xp/functions.go
deleted file mode 100644
index 7ab57f2..0000000
--- a/xp/functions.go
+++ /dev/null
@@ -1,41 +0,0 @@
-package xp
-
-import (
- "github.com/anhgelus/gokord"
- "math"
-)
-
-func XPMessage(length uint, diversity uint) uint {
- return uint(math.Floor(
- 0.025*math.Pow(float64(length), 1.25)*math.Sqrt(float64(diversity)) + 1,
- ))
-}
-
-func XPVocal(time uint) uint {
- return uint(math.Floor(
- 0.01*math.Pow(float64(time), 1.3) + 1,
- ))
-}
-
-func Level(xp uint) uint {
- return uint(math.Floor(
- 0.2 * math.Sqrt(float64(xp)),
- ))
-}
-
-func XPForLevel(level uint) uint {
- return uint(math.Floor(
- 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 xp
- }
- return uint(math.Floor(
- math.Pow(float64(time), 2) * math.Pow(10, -2+math.Log(float64(time/85))) * math.Floor(float64(xp/500)+1),
- ))
-}