+25/+45/+65/+90/+125/+165/+215/+275 from no bosses to Fader, was +50/+80/+110/+140/+170/+200/+230/+275. A fresh Skeleton starts at 50 max health instead of 75; Fader stays at 300. Asked for by several players over three months, last by Jondar Korric. A Skeleton never eats and never spends stamina, so it ran well ahead of a fed viking. The hidden foods that carry its regeneration are picked to match the new totals, so early-tier regen drops with them. README progression updated; the compendium reads the value from code.
156 lines
6.3 KiB
C#
156 lines
6.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 25f;
|
|
if (state == 2) return 45f;
|
|
if (state == 3) return 65f;
|
|
if (state == 4) return 90f;
|
|
if (state == 5) return 125f;
|
|
if (state == 6) return 165f;
|
|
if (state == 7) return 215f;
|
|
if (state >= 8) return 275f;
|
|
return 25f;
|
|
}
|
|
|
|
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 const string BaseModel = "Skeleton";
|
|
public const string PoisonModel = "Skeleton_Poison";
|
|
|
|
// The model worn from Moder on. It used to arrive at Fader; if that is preferred, move it
|
|
// and its scale back to the state >= 8 block - nothing else in this file depends on where
|
|
// they sit.
|
|
public const string FireModel = "Skeleton_Hildir";
|
|
|
|
// Hildir's skeleton is built on the same rig as the plain one, so it needs no reshaping to
|
|
// read as a player - unlike the charred twitcher this replaced, which is broader and
|
|
// shorter and wore a 0.85/1.20/0.85 squeeze to compensate. Tied to the model, not a tier.
|
|
public static readonly UnityEngine.Vector3 FireModelScale = UnityEngine.Vector3.one;
|
|
|
|
// Reuses the Bound Bone Pile's own melee thrall (SkeletonBonePile.ThrallMeleeName) rather
|
|
// than a standalone prefab, so a Queen/Fader kill raises the same tamed, loot-stripped,
|
|
// forced-melee skeleton the pile does - not a separate, unproven asset. "Skeleton_friendly"
|
|
// was tried first and never resolved to a real prefab; see the mod's own log for the
|
|
// "no prefab in the cache" warning that caught it.
|
|
public const string SummonPrefabName = SkeletonBonePile.ThrallMeleeName;
|
|
|
|
// Fader's dead stand taller than everyone else's. Applied to the player's root transform,
|
|
// which is how this race has always sized itself - so it carries the collider, the camera
|
|
// pivot and every equipment attachment up with it, rather than only the mesh.
|
|
public static readonly UnityEngine.Vector3 FaderScale = UnityEngine.Vector3.one * 1.15f;
|
|
|
|
/// <summary>
|
|
/// Every tier, exactly as the race's published progression describes it. The table had
|
|
/// drifted a long way from that description - poison immunity arrived two tiers late,
|
|
/// auto-stun four tiers late, and lifesteal jumped 20/30/40 instead of climbing in fives -
|
|
/// which is what players were reporting as "progression doesn't work".
|
|
///
|
|
/// The blocks are cumulative: each one only states what its boss adds or replaces.
|
|
/// </summary>
|
|
/// <summary>
|
|
/// The bodies this tier has earned, plainest first. These are the same thresholds
|
|
/// GetRules switches the model at, so a look can never be worn before its boss is down.
|
|
/// </summary>
|
|
public static System.Collections.Generic.List<string> UnlockedModels(int state)
|
|
{
|
|
var models = new System.Collections.Generic.List<string> { BaseModel };
|
|
if (state >= 2) models.Add(PoisonModel); // Eikthyr
|
|
if (state >= 5) models.Add(FireModel); // Moder
|
|
return models;
|
|
}
|
|
|
|
/// <summary>
|
|
/// The body to build: the one chosen at the barber when it is still unlocked, otherwise
|
|
/// the tier's own. Cosmetic only - every rule in GetRules keeps following the tier.
|
|
/// </summary>
|
|
public static string ResolveModel(int state, string look)
|
|
{
|
|
if (!string.IsNullOrEmpty(look) && UnlockedModels(state).Contains(look)) return look;
|
|
return GetRules(state).ModelPrefab;
|
|
}
|
|
|
|
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 = BaseModel,
|
|
ScaleMultiplier = UnityEngine.Vector3.one
|
|
};
|
|
|
|
if (state >= 2) // Eikthyr
|
|
{
|
|
rules.ModelPrefab = PoisonModel;
|
|
rules.PoisonImmunity = true;
|
|
rules.LifestealPercent = 0.05f;
|
|
}
|
|
if (state >= 3) // The Elder
|
|
{
|
|
rules.LifestealPercent = 0.10f;
|
|
rules.AutoStunFirstHit = true;
|
|
}
|
|
if (state >= 4) // Bonemass
|
|
{
|
|
rules.LifestealPercent = 0.15f;
|
|
rules.PoisonAttacks = true;
|
|
}
|
|
if (state >= 5) // Moder
|
|
{
|
|
rules.LifestealPercent = 0.20f;
|
|
rules.ModelPrefab = FireModel;
|
|
rules.ScaleMultiplier = FireModelScale;
|
|
rules.FireAura = true;
|
|
rules.EnhancedRegen = true;
|
|
}
|
|
if (state >= 6) // Yagluth
|
|
{
|
|
rules.LifestealPercent = 0.25f;
|
|
rules.AutoResurrect = true;
|
|
}
|
|
if (state >= 7) // The Queen
|
|
{
|
|
rules.LifestealPercent = 0.30f;
|
|
rules.SummonOnKill = true;
|
|
rules.MaxSummons = 3;
|
|
rules.SummonPrefab = SummonPrefabName;
|
|
}
|
|
if (state >= 8) // Fader
|
|
{
|
|
rules.LifestealPercent = 0.35f;
|
|
rules.MaxSummons = 5;
|
|
rules.ScaleMultiplier = FaderScale;
|
|
}
|
|
|
|
return rules;
|
|
}
|
|
}
|
|
}
|