Require fully-charged hits for kit abilities

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.
This commit is contained in:
TDSTOS
2026-04-12 10:14:28 +02:00
parent 7d7a57b99b
commit 159cf9155d

View File

@@ -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