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:
parent
77cdc67e97
commit
9149d3f0b5
13 changed files with 191 additions and 0 deletions
|
|
@ -65,6 +65,30 @@ namespace RacesOfValheim
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sunlight on an exposed Aswid. Its numbers are rewritten from AswidConfig every time
|
||||
/// AswidRace.UpdateSunlight runs, so a slider moves them live; the health loss is not a stat
|
||||
/// and is applied by that same tick.
|
||||
/// </summary>
|
||||
public class SE_AswidSunlight : SE_Stats
|
||||
{
|
||||
public override void Setup(Character character)
|
||||
{
|
||||
base.Setup(character);
|
||||
name = "SE_AswidSunlight";
|
||||
m_name = "$rov_se_aswid_sunlight_name";
|
||||
m_tooltip = "$rov_se_aswid_sunlight_tooltip";
|
||||
Refresh();
|
||||
}
|
||||
|
||||
public void Refresh()
|
||||
{
|
||||
m_healthRegenMultiplier = 1f - AswidConfig.SunHealthRegenPenalty.Value;
|
||||
m_staminaRegenMultiplier = 1f - AswidConfig.SunStaminaRegenPenalty.Value;
|
||||
m_speedModifier = -AswidConfig.SunSpeedPenalty.Value;
|
||||
}
|
||||
}
|
||||
|
||||
public class SE_MistForm : SE_Stats
|
||||
{
|
||||
public override void Setup(Character character)
|
||||
|
|
@ -124,6 +148,11 @@ namespace RacesOfValheim
|
|||
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(batForm, fixReference: false));
|
||||
|
||||
var sunlight = ScriptableObject.CreateInstance<SE_AswidSunlight>();
|
||||
sunlight.name = "SE_AswidSunlight";
|
||||
sunlight.m_icon = PrefabManager.Cache.GetPrefab<ItemDrop>("TrophySurtling")?.m_itemData.m_shared.m_icons[0];
|
||||
ItemManager.Instance.AddStatusEffect(new CustomStatusEffect(sunlight, 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];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue