From 159cf9155d7751491c63ed743d7f5a4438eb9932 Mon Sep 17 00:00:00 2001 From: TDSTOS Date: Sun, 12 Apr 2026 10:14:28 +0200 Subject: [PATCH] Require fully-charged hits for kit abilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a guard that returns early unless the attacker's cooled attack strength (getCooledAttackStrength(0f)) is at least 0.9 (≥90%). This prevents spam-clicks from accumulating kit hit-counters after the AttackSpeed attribute change, ensuring only fully charged swings trigger kit ability logic; the check is performed before resolving attacker kit/playstyle/charge data. --- .../mcscrims/speedhg/kit/listener/KitEventDispatcher.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/kotlin/club/mcscrims/speedhg/kit/listener/KitEventDispatcher.kt b/src/main/kotlin/club/mcscrims/speedhg/kit/listener/KitEventDispatcher.kt index 0338951..2cfe086 100644 --- a/src/main/kotlin/club/mcscrims/speedhg/kit/listener/KitEventDispatcher.kt +++ b/src/main/kotlin/club/mcscrims/speedhg/kit/listener/KitEventDispatcher.kt @@ -97,6 +97,12 @@ class KitEventDispatcher( if ( !isIngame() ) return if (!isAlive( victim )) return + // ── Fully-charged-hit guard ────────────────────────────────────────────── + // Since the generic AttackSpeed attribute was doubled, spam-clicks would + // otherwise still accumulate kit hit-counters. We only let fully charged + // swings (≥ 90 %) through so kit abilities can't be spammed. + if (attacker.getCooledAttackStrength( 0f ) < 0.9f ) return + val attackerKit = kitManager.getSelectedKit( attacker ) ?: return val attackerPlaystyle = kitManager.getSelectedPlaystyle( attacker ) val chargeData = kitManager.getChargeData( attacker ) ?: return