From c01d28e92646a46fe02e8e8dd3c60c1abff2e1d3 Mon Sep 17 00:00:00 2001 From: Soopyboo32 <49228220+Soopyboo32@users.noreply.github.com> Date: Wed, 8 Jun 2022 06:41:21 +0800 Subject: Make eman hype hits number parsing more lenient --- features/slayers/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/features/slayers/index.js b/features/slayers/index.js index ed7bb04..7076736 100644 --- a/features/slayers/index.js +++ b/features/slayers/index.js @@ -91,7 +91,7 @@ class Slayers extends Feature { } } - this.slayerExp[this.lastSlayerType] = this.lastSlayerExp* multiplier + (this.slayerExp[this.lastSlayerType] || 0) ; + this.slayerExp[this.lastSlayerType] = this.lastSlayerExp * multiplier + (this.slayerExp[this.lastSlayerType] || 0); if (this.expOnKill.getValue()) { cancel(e); @@ -407,12 +407,12 @@ class Slayers extends Feature { if (emanHealth.includes("k")) { emanText += " &c0 Hits" - } else if (emanHealth.includes("M") && parseInt(emanHealth) <= this.whenToShowHitsLeft.getValue()) { + } else if (emanHealth.includes("M") && parseInt(emanHealth) <= parseFloat(this.whenToShowHitsLeft.getValue())) { let thunderLevel = MathLib.clamp(parseInt(this.thunderLevel.getValue()), 5, 7) let thunderMultiplier = 1 + ((thunderLevel - 1) / 10); - let hits = parseInt(emanHealth) / (this.rcmDamagePerHit.getValue() * thunderMultiplier); + let hits = parseInt(emanHealth) / (parseFloat(this.rcmDamagePerHit.getValue()) * thunderMultiplier); emanText += ` &c${Math.max(0, Math.floor(hits - 0.75))} Hits` } -- cgit