feat(draugh): add the Human Meat item the Bonemass perk has always promised

Two places in the mod used an item called "HumanMeat" and nothing registered
it: the drop in Draugh_DeathAura_Patch and the "fatal to the living" block in
DraughFoodPatches. Both check for null, so the perk has been a no-op since
it was written - a README line with no item behind it. The two consumers are
unchanged; what was missing was the producer.

Built from two vanilla items, one for the look and one for the numbers.
RawMeat gives the model and icon, because that is what a piece of somebody
looks like and because raw flesh is the Draugh's whole food identity.
BloodPudding gives the nourishment, copied field by field at start-up rather
than written down here, so the item stays balanced against the game's own
progression and follows any change made to it.

Blood Pudding's stamina goes onto health and stamina is left at zero. A
Draugh does not use stamina, so nourishment spent there is thrown away: the
food slot would read full while giving the race half of what it cost.

RawMeat is a Material in vanilla - raw meat is not edible - so m_itemType is
forced to Consumable. That is the one assumption worth knowing about, and
the registration logs what it produced so a silent failure cannot hide. The
meat is tinted on copies of the materials, never the shared ones, or every
piece of raw meat in the world would darken with it.

The README said humanoids drop it. The patch is on Player.OnDeath and always
was, so the line now says what the code does: a player who dies inside the
death aura, the Draugh included.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
kanym 2026-09-26 00:20:16 +02:00
commit 276ff93834
4 changed files with 150 additions and 1 deletions

View file

@ -33,6 +33,7 @@ namespace RacesOfValheim
// ─── Undead Fortitude (tier 4+: crit on staggered, death aura) ──────────
public static ConfigEntry<float> StaggerCritMultiplier;
public static ConfigEntry<float> DeathAuraRadius;
public static ConfigEntry<float> HumanMeatNourishmentMultiplier;
// ─── North Wind (tier 5+: AoE frost on parry, on the same cooldown) ──────
public static ConfigEntry<float> NorthWindCooldown;
@ -79,6 +80,10 @@ namespace RacesOfValheim
new ConfigDescription("Multiplies physical damage dealt to staggered enemies, tier 4+.", new AcceptableValueRange<float>(1f, 3f)));
DeathAuraRadius = config.Bind(fortitude, "Death Aura Radius", 100f,
new ConfigDescription("Meters within which an ally's death drops Human Meat for you, tier 4+.", new AcceptableValueRange<float>(10f, 300f)));
// A multiplier rather than absolute numbers: Human Meat is built from Blood Pudding's own
// nourishment at start-up, and those are the game's values, not ours to hardcode.
HumanMeatNourishmentMultiplier = config.Bind(fortitude, "Human Meat Nourishment Multiplier", 1f,
new ConfigDescription("Scales Human Meat's health, stamina and eitr against the Blood Pudding it is built from. Read once at start-up.", new AcceptableValueRange<float>(0.1f, 3f)));
const string northWind = "Draugh - North Wind";
NorthWindCooldown = config.Bind(northWind, "Cooldown", 20f,