feat(skadi): add rebindable keybinds for abilities and special attacks

Adds a Skadi - Keybinds config section (bound first, ahead of the other
Skadi sections) covering every ability/attack trigger: dragon primary
attack, cold spell cast, breath attack, Fader spin, flight toggle, and the
three transform keys (Drake/Moder/Fader). Defaults match the previous
fixed inputs exactly. SkadiAttackPatch's kick-suppression check now reads
the configured Cold Spell key instead of a hardcoded Middle Mouse, so it
stays correct if that key is rebound.

Entries within Keybinds carry an explicit Order (via the new
ConfigurationManagerAttributes shim, per CONFIGURATION-MANAGER-HOWTO.md)
so they list as attack -> cast -> breath -> spin -> flight -> the three
transform keys, rather than alphabetically.
This commit is contained in:
kanym 2026-08-06 13:08:05 +02:00
commit 7708599ff9
5 changed files with 108 additions and 22 deletions

View file

@ -467,12 +467,13 @@ namespace RacesOfValheim
}
// Valheim binds its own SecondaryAttack action to Middle Mouse, the same button the
// Cold Spell casts on, so pressing it also swung the unarmed secondary - the kick that
// kept showing up alongside the cast no matter which animation trigger we used. For a
// Skadi who has the spell, Middle Mouse belongs to the spell. Keyed off the live button
// state rather than a flag set during our Update, so it does not depend on whether
// Cold Spell casts on by default, so pressing it also swung the unarmed secondary -
// the kick that kept showing up alongside the cast no matter which animation trigger
// we used. For a Skadi who has the spell, that button belongs to the spell. Keyed off
// the live button state (via the configured shortcut, so a rebind stays in sync)
// rather than a flag set during our Update, so it does not depend on whether
// PlayerController's FixedUpdate happens to run first.
if (secondaryAttack && Input.GetMouseButton(2) &&
if (secondaryAttack && SkadiConfig.ColdSpellKey.Value.IsPressed() &&
SkadiRace.Instance != null && SkadiRace.Instance.IsSkadi())
{
var rules = SkadiProgression.GetRules(BossProgressionManager.GetCurrentProgressionState());