mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-14 07:54:41 +08:00
Update addPower() to new power level setting values
This commit is contained in:
parent
8ed3a9e1a8
commit
9a9717ddda
1 changed files with 7 additions and 8 deletions
|
@ -179,12 +179,12 @@ export function addPower(good = true, extra = false) {
|
|||
if (
|
||||
!TestLogic.active ||
|
||||
!Config.monkeyPowerUnlocked ||
|
||||
Config.monkeyPowerLevel === 0
|
||||
Config.monkeyPowerLevel === "off"
|
||||
)
|
||||
return;
|
||||
|
||||
// Shake
|
||||
if (Config.monkeyPowerLevel > 2) {
|
||||
if (["ultra", ">9000"].includes(Config.monkeyPowerLevel)) {
|
||||
$("html").css("overflow", "hidden");
|
||||
const shake = [
|
||||
Math.round(shakeAmount - Math.random() * shakeAmount),
|
||||
|
@ -210,12 +210,11 @@ export function addPower(good = true, extra = false) {
|
|||
i > 0;
|
||||
i--
|
||||
) {
|
||||
const color =
|
||||
Config.monkeyPowerLevel > 1
|
||||
? randomColor()
|
||||
: good
|
||||
? ThemeColors.caret
|
||||
: ThemeColors.error;
|
||||
const color = ["high", ">9000"].includes(Config.monkeyPowerLevel)
|
||||
? randomColor()
|
||||
: good
|
||||
? ThemeColors.caret
|
||||
: ThemeColors.error;
|
||||
ctx.particles.push(createParticle(...coords, color));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue