46 lines
1.9 KiB
C#
46 lines
1.9 KiB
C#
using UnityEngine;
|
|
using System.Collections.Generic;
|
|
|
|
namespace RacesOfValheim
|
|
{
|
|
public class SE_SkeletonStats : SE_Stats
|
|
{
|
|
public override void Setup(Character character)
|
|
{
|
|
base.Setup(character);
|
|
|
|
// Apply Damage Modifiers
|
|
int state = BossProgressionManager.GetCurrentProgressionState();
|
|
SkeletonProgression.SkeletonRules rules = SkeletonProgression.GetRules(state);
|
|
|
|
m_mods = new List<HitData.DamageModPair>();
|
|
m_mods.Add(new HitData.DamageModPair { m_type = HitData.DamageType.Pierce, m_modifier = HitData.DamageModifier.Resistant });
|
|
m_mods.Add(new HitData.DamageModPair { m_type = HitData.DamageType.Slash, m_modifier = HitData.DamageModifier.Resistant });
|
|
m_mods.Add(new HitData.DamageModPair { m_type = HitData.DamageType.Blunt, m_modifier = HitData.DamageModifier.Weak });
|
|
|
|
if (rules.PoisonImmunity)
|
|
{
|
|
m_mods.Add(new HitData.DamageModPair { m_type = HitData.DamageType.Poison, m_modifier = HitData.DamageModifier.Immune });
|
|
}
|
|
}
|
|
|
|
public override void UpdateStatusEffect(float dt)
|
|
{
|
|
base.UpdateStatusEffect(dt);
|
|
// Health is handled in SkeletonPatches.Player_GetMaxHealth_Patch
|
|
}
|
|
}
|
|
|
|
public class SE_SkeletonResurrectCooldown : StatusEffect
|
|
{
|
|
public override void Setup(Character character)
|
|
{
|
|
base.Setup(character);
|
|
m_name = "Resurrection Cooldown";
|
|
m_tooltip = "Your skeletal body is too weak to resurrect again right now.";
|
|
m_icon = Jotunn.Managers.PrefabManager.Cache.GetPrefab<GameObject>("TrophySkeletonPoison")?.GetComponent<ItemDrop>()?.m_itemData.GetIcon()
|
|
?? Jotunn.Managers.PrefabManager.Cache.GetPrefab<GameObject>("TrophySkeleton")?.GetComponent<ItemDrop>()?.m_itemData.GetIcon();
|
|
m_ttl = 300f; // 5 minutes
|
|
}
|
|
}
|
|
}
|