feat(aswid): sunlight, fire and pierce weaknesses

Each has its own switch under 'Aswid - Weaknesses'. Sunlight: by day
under open sky, slower regen and movement and a slow burn that stops at
30% health; roofs, dungeons, Swamp, Mistlands, night and Eclipse shield
you. Fire +25% until Fader, pierce +20%; both applied after resistances
and armor, so meads still help and Mist Form stays pierce-immune.
This commit is contained in:
kanym 2026-10-26 15:12:05 +01:00
commit 9149d3f0b5
13 changed files with 191 additions and 0 deletions

View file

@ -476,6 +476,24 @@ namespace RacesOfValheim
Mathf.RoundToInt(AswidConfig.EarlyStaminaShare.Value * 100f),
Mathf.RoundToInt(AswidConfig.DevourStaminaShare.Value * 100f)));
bool fireNow = AswidRace.HasFireWeakness(state);
bool fireGone = AswidConfig.FireWeaknessEnabled.Value && !fireNow;
if (AswidConfig.SunlightEnabled.Value || AswidConfig.FireWeaknessEnabled.Value || AswidConfig.PierceWeaknessEnabled.Value)
sb.AppendLine(ModText.Get("rov_compendium_aswid_weaknesses"));
if (AswidConfig.SunlightEnabled.Value)
sb.AppendLine(ModText.Get("rov_compendium_aswid_weakness_sunlight",
Mathf.RoundToInt(AswidConfig.SunHealthRegenPenalty.Value * 100f),
Mathf.RoundToInt(AswidConfig.SunStaminaRegenPenalty.Value * 100f),
Mathf.RoundToInt(AswidConfig.SunSpeedPenalty.Value * 100f),
AswidConfig.SunHealthLossPerSecond.Value.ToString("0.#"),
Mathf.RoundToInt(AswidConfig.SunHealthFloor.Value * 100f)));
if (fireNow)
sb.AppendLine(ModText.Get("rov_compendium_aswid_weakness_fire", Mathf.RoundToInt(AswidConfig.FireWeakness.Value * 100f)));
else if (fireGone)
sb.AppendLine(ModText.Get("rov_compendium_aswid_weakness_fire_gone"));
if (AswidConfig.PierceWeaknessEnabled.Value)
sb.AppendLine(ModText.Get("rov_compendium_aswid_weakness_pierce", Mathf.RoundToInt(AswidConfig.PierceWeakness.Value * 100f)));
sb.AppendLine(ModText.Get("rov_compendium_aswid_vampiric_aura_passive_toggle"));
sb.AppendLine(ModText.Get("rov_compendium_aswid_always_active_every_form_with", auraRadiusDay, auraRadiusNight, auraExecute));
int batAuraUnlock = AswidConfig.BatAuraUnlockState.Value;