feat(aswid): running water weakness and a seasick camera

Swimming costs double stamina, scaled on vanilla's own swim charge so
its drowning check does the rest at high settings. Over deep water in
the Ocean, swimming or flying, the Aswid loses health and stamina each
second; a boat protects. A gentle camera roll plays while the sea hurts,
kept local through ConfigSync so a server cannot force it on anyone.
This commit is contained in:
kanym 2026-10-26 15:26:25 +01:00
commit 5c41d80cae
14 changed files with 173 additions and 3 deletions

View file

@ -89,6 +89,21 @@ namespace RacesOfValheim
}
}
/// <summary>
/// The open sea under an Aswid. Only a marker: the burn and the drain are applied by
/// AswidRace.UpdateOpenSea, and the camera sway reads AswidRace.AtSea.
/// </summary>
public class SE_AswidOpenSea : SE_Stats
{
public override void Setup(Character character)
{
base.Setup(character);
name = "SE_AswidOpenSea";
m_name = "$rov_se_aswid_opensea_name";
m_tooltip = "$rov_se_aswid_opensea_tooltip";
}
}
public class SE_MistForm : SE_Stats
{
public override void Setup(Character character)
@ -153,6 +168,11 @@ namespace RacesOfValheim
sunlight.m_icon = PrefabManager.Cache.GetPrefab<ItemDrop>("TrophySurtling")?.m_itemData.m_shared.m_icons[0];
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(sunlight, fixReference: false));
var openSea = ScriptableObject.CreateInstance<SE_AswidOpenSea>();
openSea.name = "SE_AswidOpenSea";
openSea.m_icon = PrefabManager.Cache.GetPrefab<ItemDrop>("TrophySerpent")?.m_itemData.m_shared.m_icons[0];
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(openSea, fixReference: false));
var mistForm = ScriptableObject.CreateInstance<SE_MistForm>();
mistForm.name = "SE_MistForm";
mistForm.m_icon = PrefabManager.Cache.GetPrefab<ItemDrop>("TrophyWraith")?.m_itemData.m_shared.m_icons[0];