RacesOfValheim/JotunnModStub/Skadi/SkadiProgression.cs
kanym a8a14f0416 Move Freezing-to-Cold to Bonemass and eitr regen to Yagluth
Eikthyr was carrying three unlocks while later tiers carried little, so
the two passives move up: the Freezing-to-Cold conversion now lands with
Bonemass alongside the drake's attack, and eitr regeneration first
appears at Yagluth with the improved Cold Spell.

The +20% at Eikthyr is dropped rather than relocated, since Yagluth
already granted an undocumented +50% - now written down in the README.
2026-08-01 18:02:24 +02:00

131 lines
4 KiB
C#

using System;
using UnityEngine;
namespace RacesOfValheim
{
public static class SkadiProgression
{
public class FormRules
{
public bool ImmuneToCold = false;
public bool ImmuneToFreezing = false;
public bool FreezingToCold = false;
public bool BonusFrostDamage = false;
public bool FrostAura = false;
public float FrostResistance = 0f;
public float EitrRegenMultiplier = 1f;
public bool ColdSpell = false;
public bool ImprovedColdSpell = false;
public FormType Form = FormType.None;
public float DurationMinutes = 0f;
public float CooldownMinutes = 0f;
public bool CanAttackInForm = false;
}
public enum FormType
{
None,
Drake,
Moder,
SkeletonDragon
}
public static FormRules GetRules(int state)
{
FormRules rules = new FormRules();
if (state >= 1)
{
rules.ImmuneToCold = true;
rules.BonusFrostDamage = true;
rules.FrostResistance = 0.5f; // 50% resistance? Valheim uses DamageModifiers.
// Wait, FrostResistance isn't a percentage, it's a category.
// We'll map this to DamageModifier.Resistant (which is 50% reduction).
}
if (state >= 2)
{
rules.ColdSpell = true;
}
if (state >= 4)
{
rules.FreezingToCold = true;
}
if (state >= 6)
{
rules.EitrRegenMultiplier = 1.50f;
rules.ImmuneToFreezing = true;
rules.FreezingToCold = false; // Immunity overrides conversion
rules.ImprovedColdSpell = true;
}
if (state >= 7)
{
// Immunity to frost damage => DamageModifier.Immune
rules.FrostResistance = 1f; // 1 means Immune in our logic
rules.FrostAura = true;
}
return rules;
}
public static FormRules GetGKeyRules(int state)
{
FormRules rules = new FormRules();
if (state >= 4) // Bonemass
{
rules.Form = FormType.Drake;
rules.CanAttackInForm = true;
}
else if (state >= 3) // Elder
{
rules.Form = FormType.Drake;
rules.CanAttackInForm = false;
}
return rules.Form != FormType.None ? rules : null;
}
public static FormRules GetHKeyRules(int state)
{
FormRules rules = new FormRules();
if (state >= 7) // Queen
{
rules.Form = FormType.Moder;
rules.DurationMinutes = 0f;
rules.CooldownMinutes = 0f;
rules.CanAttackInForm = true;
}
else if (state >= 6) // Yagluth
{
rules.Form = FormType.Moder;
rules.DurationMinutes = 1f;
rules.CooldownMinutes = 5f;
rules.CanAttackInForm = true;
}
else if (state >= 5) // Moder
{
rules.Form = FormType.Moder;
rules.DurationMinutes = 1f;
rules.CooldownMinutes = 10f;
rules.CanAttackInForm = true;
}
return rules.Form != FormType.None ? rules : null;
}
public static FormRules GetJKeyRules(int state)
{
FormRules rules = new FormRules();
if (state >= 8) // Fader
{
rules.Form = FormType.SkeletonDragon;
rules.DurationMinutes = 0f; // Assuming unlimited
rules.CooldownMinutes = 0f;
rules.CanAttackInForm = true;
}
return rules.Form != FormType.None ? rules : null;
}
}
}