Merge branch 'war-vulture' into main

Brings in v1.4.3-v1.4.5 work: Trol's Hammer, Bone Servants, War Vulture
craftability, and the Aswid/Fenrir timed-claws rework, on top of the
bugfixes merged into main since v1.4.2.

Resolved conflicts in 7 files where main's post-v1.4.2 fixes overlapped
war-vulture's claws rework:
- README.md, manifest.json: took war-vulture's v1.4.5 content (main
  hadn't touched either since the v1.4.2 release).
- RacesOfValheim.cs: plugin version -> 1.4.5.
- RaceClaws.cs: kept war-vulture's lazy EnsureRoster() fix for the
  Fenrir claw-registration bug over main's belt-and-suspenders
  Register(this), and dropped the now-stale comment referencing the
  removed static constructor. Main's SetupDragItem race-ownership fix
  carried through untouched.
- AswidConfig.cs/AswidRace.cs/AswidPatches.cs: adopted war-vulture's
  single-key design (I toggles both Vampiric Aura and Devour together)
  to match the documented v1.4.5 trader-safety fix, removing a duplicate
  AuraEnabled field the two branches had each declared independently.
  Kept main's IsDownIgnoringHeldKeys() input fix on top.
- RaceCompendium.cs: kept main's fact-checked Aswid/Fenrir entries
  (war-vulture's copies were pre-fix stubs, one referencing a
  nonexistent variable) and layered in war-vulture's timed-claws
  wording.

Build verified clean (0 errors) after resolution.
This commit is contained in:
kanym 2026-08-18 17:36:42 +02:00
commit c2212df322
38 changed files with 3831 additions and 192 deletions

View file

@ -5,9 +5,10 @@ namespace RacesOfValheim
/// <summary>
/// The Claws of the Beast: the Bjorn claw, burned down to almost black.
///
/// Everything about how they behave - issued once, never dropped, back in hand the moment the
/// hands are free, tier damage as slash - lives in RaceClawSet. This file is only the Aswid's
/// half of the answer: which model, what colour, and when the race is wearing another body.
/// Everything about how they behave - a timed skill (RaceClawsConfig.ActivateKey), issued and
/// retracted on its own, back in hand the moment the hands are free while it runs, tier damage
/// as slash - lives in RaceClawSet. This file is only the Aswid's half of the answer: which
/// model, what colour, and when the race is wearing another body.
///
/// The tint is config rather than a constant because "almost black" is a look, not a number,
/// and it needs one pass in front of a mirror. It is applied to the item's own copies of the

View file

@ -23,7 +23,6 @@ namespace RacesOfValheim
public static ConfigEntry<KeyboardShortcut> MistFormKey;
public static ConfigEntry<KeyboardShortcut> EclipseKey;
public static ConfigEntry<KeyboardShortcut> TameKey;
public static ConfigEntry<KeyboardShortcut> ToggleAuraKey;
public static ConfigEntry<KeyboardShortcut> ToggleDevourKey;
// ─── Passive combat (scales with progression state, doubles at night) ────
@ -106,13 +105,8 @@ namespace RacesOfValheim
new ConfigDescription("Casts Eclipse, tier 6+. Fails silently at night."));
TameKey = config.Bind(keybinds, "Tame", new KeyboardShortcut(KeyCode.U),
new ConfigDescription("Tames the creature under your cursor, if your tier allows it."));
ToggleAuraKey = config.Bind(keybinds, "Toggle Vampiric Aura", new KeyboardShortcut(KeyCode.I),
new ConfigDescription("Turns the passive Vampiric Aura's damage/lifesteal on or off."));
// Unbound by default: Devour always stays on now that I is the Aura's toggle. Left as
// a real keybind, not removed, so anyone who still wants a switch for it can bind one
// themselves in Configuration Manager.
ToggleDevourKey = config.Bind(keybinds, "Toggle Devour Ability", new KeyboardShortcut(KeyCode.None),
new ConfigDescription("Turns the automatic Devour-on-kill behavior on or off. Unbound by default - Devour stays on unless you assign a key here."));
ToggleDevourKey = config.Bind(keybinds, "Toggle Devour Ability", new KeyboardShortcut(KeyCode.I),
new ConfigDescription("Turns the Vampiric Aura and the automatic Devour-on-kill behavior on or off together. Turn this off before talking to Haldor/Hildir - the aura does not recognize traders and will attack them."));
const string combat = "Aswid - Passive Combat";
DamageBonusPerState = config.Bind(combat, "Damage Bonus Per State", 2f,

View file

@ -529,17 +529,11 @@ namespace RacesOfValheim
ZNetView nview = __instance.GetComponent<ZNetView>();
if (nview != null && nview.IsValid() && nview.GetZDO().GetString("RacesOfValheim_Race", "Human") == "Aswid")
{
if (__instance == Player.m_localPlayer && RaceInput.Allowed && AswidConfig.ToggleAuraKey.Value.IsDownIgnoringHeldKeys())
{
AswidRace.AuraEnabled = !AswidRace.AuraEnabled;
string msg = AswidRace.AuraEnabled ? "Vampiric Aura: ENABLED" : "Vampiric Aura: DISABLED";
__instance.Message(MessageHud.MessageType.Center, msg);
}
if (__instance == Player.m_localPlayer && RaceInput.Allowed && AswidConfig.ToggleDevourKey.Value.IsDownIgnoringHeldKeys())
{
AswidRace.DevourEnabled = !AswidRace.DevourEnabled;
string msg = AswidRace.DevourEnabled ? "Devour Ability: ENABLED" : "Devour Ability: DISABLED";
AswidRace.AuraEnabled = AswidRace.DevourEnabled;
string msg = AswidRace.DevourEnabled ? "Vampiric Aura: ENABLED" : "Vampiric Aura: DISABLED";
__instance.Message(MessageHud.MessageType.Center, msg);
}

View file

@ -831,17 +831,18 @@ namespace RacesOfValheim
private float damageTickTimer = 0f;
/// <summary>Toggled by AswidConfig.ToggleAuraKey (Aswid_PlayerUpdate_Patch); on by default.</summary>
public static bool AuraEnabled = true;
/// <summary>
/// The Vampiric Aura is passive: it drains on its own, in every form, with no key to hold and
/// no icon or message of its own beyond the on/off toggle. The form only decides how hard it
/// bites.
/// The Vampiric Aura drains on its own, in every form, with no key to hold - but it does not
/// distinguish traders from monsters, so it can execute Haldor/Hildir on approach. AuraEnabled
/// (toggled with Devour on the same key) is the escape hatch for that.
/// </summary>
private void HandleVampiricAura()
{
if (!AuraEnabled) return;
if (!AuraEnabled)
{
damageTickTimer = 0f;
return;
}
damageTickTimer += Time.deltaTime;
if (damageTickTimer < AswidConfig.AuraTickInterval.Value) return;
@ -920,6 +921,7 @@ namespace RacesOfValheim
}
public static bool DevourEnabled = true;
public static bool AuraEnabled = true;
private static float lastConsumeTime = 0f;
public static void TryConsumeMob(Character c, float maxHp, bool bypassCooldown = false)