Formatting and linting
This commit is contained in:
@@ -123,33 +123,33 @@ export = {
|
||||
if (target.isCommunicationDisabled()) {
|
||||
if (time === 0) {
|
||||
title = "Timeout Removed"
|
||||
;(description =
|
||||
description =
|
||||
"Removed timeout of " +
|
||||
userMention(target.id) +
|
||||
" for " +
|
||||
reason),
|
||||
(timeouttime = null)
|
||||
reason
|
||||
timeouttime = null
|
||||
} else {
|
||||
title = "Timeout Updated"
|
||||
;(description =
|
||||
description =
|
||||
"Updated timeout of " +
|
||||
userMention(target.id) +
|
||||
" to " +
|
||||
prettyTime +
|
||||
" for " +
|
||||
reason),
|
||||
(timeouttime = time)
|
||||
reason
|
||||
timeouttime = time
|
||||
}
|
||||
} else {
|
||||
title = "Member Timed Out"
|
||||
;(description =
|
||||
description =
|
||||
"Timed out " +
|
||||
userMention(target.id) +
|
||||
" for " +
|
||||
prettyTime +
|
||||
" for " +
|
||||
reason),
|
||||
(timeouttime = time)
|
||||
reason
|
||||
timeouttime = time
|
||||
}
|
||||
|
||||
await target.timeout(timeouttime, reason)
|
||||
|
||||
@@ -10,14 +10,14 @@ function getExpForLevel(level: number): number {
|
||||
}
|
||||
|
||||
switch (respectedLevel) {
|
||||
case 1:
|
||||
return 500
|
||||
case 2:
|
||||
return 1000
|
||||
case 3:
|
||||
return 2000
|
||||
case 4:
|
||||
return 3500
|
||||
case 1:
|
||||
return 500
|
||||
case 2:
|
||||
return 1000
|
||||
case 3:
|
||||
return 2000
|
||||
case 4:
|
||||
return 3500
|
||||
}
|
||||
return 5000
|
||||
}
|
||||
@@ -31,7 +31,7 @@ function getLevelRespectingPrestige(level: number): number {
|
||||
}
|
||||
|
||||
const EASY_LEVELS = 4
|
||||
const EASY_LEVELS_XP = 7000
|
||||
const EASY_LEVELS_XP = 7004
|
||||
const XP_PER_PRESTIGE = 96 * 5000 + EASY_LEVELS_XP
|
||||
const LEVELS_PER_PRESTIGE = 100
|
||||
const HIGHEST_PRESTIGE = 50
|
||||
|
||||
@@ -6,16 +6,14 @@ const GROWTH = 2500
|
||||
const HALF_GROWTH = 0.5 * GROWTH
|
||||
const REVERSE_PQ_PREFIX = -(BASE - 0.5 * GROWTH) / GROWTH
|
||||
const REVERSE_CONST = REVERSE_PQ_PREFIX * REVERSE_PQ_PREFIX
|
||||
const GROWTH_DIVIDES_2 = 2 / GROWTH
|
||||
const GROWTHDIV2 = 2 / GROWTH
|
||||
|
||||
function getLevel(exp: number): number {
|
||||
return exp <= 1
|
||||
? 1
|
||||
: Math.floor(
|
||||
1 +
|
||||
REVERSE_PQ_PREFIX +
|
||||
Math.sqrt(REVERSE_CONST + GROWTH_DIVIDES_2 * exp),
|
||||
)
|
||||
if (exp <= 1) return 1
|
||||
|
||||
return Math.floor(
|
||||
1 + REVERSE_PQ_PREFIX + Math.sqrt(REVERSE_CONST + GROWTHDIV2 * exp),
|
||||
)
|
||||
}
|
||||
|
||||
function hypixelLevel(exp: number): number {
|
||||
|
||||
Reference in New Issue
Block a user