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:
parent
c088eb74f4
commit
7708599ff9
5 changed files with 108 additions and 22 deletions
|
|
@ -221,9 +221,9 @@ namespace RacesOfValheim
|
|||
if (!RaceInput.Allowed) return;
|
||||
|
||||
int state = BossProgressionManager.GetCurrentProgressionState();
|
||||
if (Input.GetKeyDown(KeyCode.G)) { TryTransformWithRules(SkadiProgression.GetGKeyRules(state)); return; }
|
||||
if (Input.GetKeyDown(KeyCode.H)) { TryTransformWithRules(SkadiProgression.GetHKeyRules(state)); return; }
|
||||
if (Input.GetKeyDown(KeyCode.J)) { TryTransformWithRules(SkadiProgression.GetJKeyRules(state)); return; }
|
||||
if (SkadiConfig.DrakeFormKey.Value.IsDown()) { TryTransformWithRules(SkadiProgression.GetGKeyRules(state)); return; }
|
||||
if (SkadiConfig.ModerFormKey.Value.IsDown()) { TryTransformWithRules(SkadiProgression.GetHKeyRules(state)); return; }
|
||||
if (SkadiConfig.FaderFormKey.Value.IsDown()) { TryTransformWithRules(SkadiProgression.GetJKeyRules(state)); return; }
|
||||
|
||||
// Debug Dump
|
||||
if (Input.GetKeyDown(KeyCode.F8))
|
||||
|
|
@ -311,8 +311,8 @@ namespace RacesOfValheim
|
|||
if (Player.m_localPlayer == null || Player.m_localPlayer.IsDead()) return;
|
||||
if (isTransformed) return; // Do not cast human spell while in dragon form
|
||||
|
||||
// Middle Mouse Button to cast
|
||||
if (Input.GetMouseButtonDown(2))
|
||||
// Middle Mouse Button to cast, by default - rebindable via SkadiConfig.ColdSpellKey.
|
||||
if (SkadiConfig.ColdSpellKey.Value.IsDown())
|
||||
{
|
||||
// The improved cast is a burst rather than a rapid-fire, so it waits longer.
|
||||
float cooldown = rules.ImprovedColdSpell ? IMPROVED_SPELL_COOLDOWN : SPELL_COOLDOWN;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue