98 lines
3 KiB
C#
98 lines
3 KiB
C#
using System;
|
|
|
|
namespace RacesOfValheim
|
|
{
|
|
public static class SkeletonProgression
|
|
{
|
|
public static float GetMaxHealthBonus(int state)
|
|
{
|
|
if (state == 0) return 0f;
|
|
if (state == 1) return 50f;
|
|
if (state == 2) return 80f;
|
|
if (state == 3) return 110f;
|
|
if (state == 4) return 140f;
|
|
if (state == 5) return 170f;
|
|
if (state == 6) return 200f;
|
|
if (state == 7) return 230f;
|
|
if (state >= 8) return 275f;
|
|
return 50f;
|
|
}
|
|
|
|
public struct SkeletonRules
|
|
{
|
|
public float LifestealPercent;
|
|
public bool EnhancedRegen;
|
|
public bool PoisonImmunity;
|
|
public bool PoisonAttacks;
|
|
public bool AutoResurrect;
|
|
public bool SummonOnKill;
|
|
public int MaxSummons;
|
|
public string SummonPrefab;
|
|
public bool AutoStunFirstHit;
|
|
public bool FireAura;
|
|
public string ModelPrefab;
|
|
public UnityEngine.Vector3 ScaleMultiplier;
|
|
}
|
|
|
|
public static SkeletonRules GetRules(int state)
|
|
{
|
|
SkeletonRules rules = new SkeletonRules
|
|
{
|
|
LifestealPercent = 0f,
|
|
EnhancedRegen = false,
|
|
PoisonImmunity = false,
|
|
PoisonAttacks = false,
|
|
AutoResurrect = false,
|
|
SummonOnKill = false,
|
|
MaxSummons = 0,
|
|
SummonPrefab = "",
|
|
AutoStunFirstHit = false,
|
|
FireAura = false,
|
|
ModelPrefab = "Skeleton",
|
|
ScaleMultiplier = UnityEngine.Vector3.one
|
|
};
|
|
|
|
if (state >= 2)
|
|
{
|
|
rules.ModelPrefab = "Skeleton_Poison";
|
|
rules.LifestealPercent = 0.20f;
|
|
}
|
|
if (state >= 3)
|
|
{
|
|
rules.EnhancedRegen = true;
|
|
}
|
|
if (state >= 4)
|
|
{
|
|
rules.PoisonImmunity = true;
|
|
rules.PoisonAttacks = true;
|
|
}
|
|
if (state >= 5)
|
|
{
|
|
rules.AutoResurrect = true;
|
|
}
|
|
if (state >= 6)
|
|
{
|
|
rules.ModelPrefab = "Skeleton_Poison";
|
|
rules.LifestealPercent = 0.30f;
|
|
rules.SummonOnKill = true;
|
|
rules.MaxSummons = 2;
|
|
rules.SummonPrefab = "Skeleton_friendly";
|
|
rules.ScaleMultiplier = UnityEngine.Vector3.one * 1.1f;
|
|
}
|
|
if (state >= 7)
|
|
{
|
|
rules.AutoStunFirstHit = true;
|
|
rules.LifestealPercent = 0.40f;
|
|
}
|
|
if (state >= 8)
|
|
{
|
|
rules.ModelPrefab = "Charred_Twitcher";
|
|
rules.SummonPrefab = "Charred_Twitcher";
|
|
rules.FireAura = true;
|
|
rules.ScaleMultiplier = new UnityEngine.Vector3(0.85f, 1.20f, 0.85f);
|
|
}
|
|
|
|
return rules;
|
|
}
|
|
}
|
|
}
|