Merge branch 'feat-form-attack-stamina': Form attacks cost stamina

This commit is contained in:
kanym 2026-10-29 13:22:45 +01:00
commit 62ebc13116
5 changed files with 114 additions and 11 deletions

View file

@ -47,6 +47,20 @@ namespace RacesOfValheim
public static ConfigEntry<float> WolfFormFallDamageReduction;
public static ConfigEntry<float> FormStaminaRegenMultiplier;
public static ConfigEntry<float> FormStaminaDrainReduction;
public static ConfigEntry<float> FormAdrenalineMultiplier;
// ─── Form attack stamina (base cost, before the Unarmed skill discount) ─
public static ConfigEntry<float> FenringLightClawStamina;
public static ConfigEntry<float> FenringHeavyClawStamina;
public static ConfigEntry<float> FenringJumpAttackStamina;
public static ConfigEntry<float> CultistClawStamina;
public static ConfigEntry<float> CultistDoubleClawStamina;
public static ConfigEntry<float> WolfAttack1Stamina;
public static ConfigEntry<float> WolfAttack2Stamina;
public static ConfigEntry<float> WolfAttack3Stamina;
public static ConfigEntry<float> UlvBiteStamina;
public static ConfigEntry<float> UlvHeavyBiteStamina;
public static ConfigEntry<float> UlvJumpAttackStamina;
// ─── Fenring form attacks ─────────────────────────────────────────────
public static ConfigEntry<float> FenringHeavyClawDamage;
@ -194,6 +208,35 @@ namespace RacesOfValheim
UlvPushForce = config.Bind(ulv, "Push Force", 25f,
new ConfigDescription("Knockback applied on a hit.", new AcceptableValueRange<float>(0f, 100f)));
// Form attack stamina, beside each form's damage. Lower than a weapon's on purpose: the
// forms pay less per swing and fill the adrenaline bar faster instead (Form Adrenaline
// Multiplier). For scale, vanilla fists cost 4, Bjorn claws 6, Fenris claws 10.
const string staminaNote = " Base stamina, cut by up to a third with the Unarmed skill as a weapon's is. 0 makes it free.";
FormAdrenalineMultiplier = config.Bind(buffs, "Form Adrenaline Multiplier", 1.5f,
new ConfigDescription("Adrenaline per form hit, times the bare-handed amount, in any Fenrir form.", new AcceptableValueRange<float>(0f, 5f)));
FenringLightClawStamina = config.Bind(fenring, "Light Claw Stamina", 6f,
new ConfigDescription("Stamina for the light claw (Left Mouse)." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
FenringHeavyClawStamina = config.Bind(fenring, "Heavy Claw Stamina", 10f,
new ConfigDescription("Stamina for the heavy claw (Right Mouse)." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
FenringJumpAttackStamina = config.Bind(fenring, "Jump Attack Stamina", 16f,
new ConfigDescription("Stamina for the leaping attack (Middle Mouse)." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
CultistClawStamina = config.Bind(cultist, "Claw Stamina", 6f,
new ConfigDescription("Stamina for the single claw (Left Mouse)." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
CultistDoubleClawStamina = config.Bind(cultist, "Double Claw Stamina", 12f,
new ConfigDescription("Stamina for the double claw (Middle Mouse)." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
WolfAttack1Stamina = config.Bind(wolf, "Attack 1 Stamina", 4f,
new ConfigDescription("Stamina for the Left Mouse attack." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
WolfAttack2Stamina = config.Bind(wolf, "Attack 2 Stamina", 6f,
new ConfigDescription("Stamina for the Right Mouse attack." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
WolfAttack3Stamina = config.Bind(wolf, "Attack 3 Stamina", 10f,
new ConfigDescription("Stamina for the Middle Mouse attack." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
UlvBiteStamina = config.Bind(ulv, "Bite Stamina", 5f,
new ConfigDescription("Stamina for the Left Mouse bite." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
UlvHeavyBiteStamina = config.Bind(ulv, "Heavy Bite Stamina", 8f,
new ConfigDescription("Stamina for the Right Mouse bite." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
UlvJumpAttackStamina = config.Bind(ulv, "Jump Attack Stamina", 14f,
new ConfigDescription("Stamina for the leaping Middle Mouse attack." + staminaNote, new AcceptableValueRange<float>(0f, 50f)));
// The whole section stays local - see ConfigSync.LocalSections.
const string appearance = "Fenrir - Appearance";
ReadyMessage = config.Bind(appearance, "Ready Message", true,