RacesOfValheim/JotunnModStub/Skadi/SkadiStatusEffects.cs
kanym fc7fd54404 Rework Skadi combat costs, fix dead melee, add cooldown icons
Dragon melee never dealt damage at all: the damage block sat behind
!isMelee, so bite, claw and spin played an animation, charged eitr and
did nothing. Melee now sweeps for targets the way Fenrir's claws do, and
costs nothing - it is the baseline attack that has to work at every tier.

Everything Skadi casts now runs on stamina rather than eitr. Eitr food
only exists from the Mistlands on, while the Cold Spell unlocks at
Eikthyr and the drake at the Elder, so the old costs were either
unpayable or, in the drake's case, silently ignored because UseEitr
never checked affordability. Ranged volleys are charged per projectile
so the sixty shard breath no longer costs the same as a three shard
spit, capped so the widest one stays castable.

The Cold Spell also stopped borrowing the Staff of Frost's damage, which
handed out Mistlands numbers from Eikthyr and multiplied them by every
shard. It now scales with progression, and the improved cast spreads one
budget across its shards: wider, not stronger.

The kick that played over every cast was Valheim's own SecondaryAttack,
bound to the same Middle Mouse button - suppressed for a Skadi holding
the spell. Moder now keeps its ranged attack on Middle Mouse in the air
as on the ground, with no left hand attack aloft, and Fader's airborne
branch is gone since its form cannot fly.

Ability cooldowns finally show on the HUD, each with its own icon and a
live countdown.
2026-08-01 18:02:24 +02:00

45 lines
1.6 KiB
C#

using System;
using System.Collections.Generic;
using UnityEngine;
namespace RacesOfValheim
{
// Timed dragon forms. m_ttl is set when the form is entered, which is all Valheim needs to
// render the countdown: StatusEffect.GetIconText() prints the remaining time by itself.
public class SE_SkadiForm : StatusEffect
{
}
// Short ability cooldowns, shown purely so the HUD can count them down. Silent by design,
// unlike SE_FormCooldown which announces "... is Ready!" when it stops: tolerable once every
// few minutes for a dragon form, unbearable every three seconds for an attack.
public class SE_SkadiAbilityCooldown : StatusEffect
{
}
public class SE_SkadiStats : SE_Stats
{
public override void Setup(Character character)
{
base.Setup(character);
name = "SE_SkadiStats";
m_name = "Skadi's Aura";
m_tooltip = "Empowered by the frost.";
}
public void UpdateStats(SkadiProgression.FormRules rules)
{
m_mods = new List<HitData.DamageModPair>();
if (rules.FrostResistance >= 1f)
{
m_mods.Add(new HitData.DamageModPair() { m_type = HitData.DamageType.Frost, m_modifier = HitData.DamageModifier.Immune });
}
else if (rules.FrostResistance >= 0.5f)
{
m_mods.Add(new HitData.DamageModPair() { m_type = HitData.DamageType.Frost, m_modifier = HitData.DamageModifier.Resistant });
}
m_eitrRegenMultiplier = rules.EitrRegenMultiplier;
}
}
}