feat(fenrir): eyes turn the Cultist's yellow when it is back from cooldown

The ready flag becomes an int: none, a form, or the Cultist. The Cultist
wins only while its rules give it a cooldown (Yagluth and Queen), since
that is the one return worth announcing. Its body shares the Fenring's
material and its breath is white flame tinted by texture, so the colour
comes from its death effect: FlameRoundYellowParticle's emission,
(2.691, 1.797, 0.455), bundle c4210710.
This commit is contained in:
kanym 2026-10-23 20:06:49 +02:00
commit c2bc73b3a0
3 changed files with 48 additions and 18 deletions

View file

@ -150,7 +150,7 @@ namespace RacesOfValheim {
}
wasNight = isNight;
FenrirVisuals.SetReady(Player.m_localPlayer, CanTakeAnyForm());
FenrirVisuals.SetReady(Player.m_localPlayer, GetReadyState());
if (isTransformed)
{
@ -174,17 +174,26 @@ namespace RacesOfValheim {
}
/// <summary>
/// Whether one of the three keys would transform right now. The same gates as
/// TryTransformWithRules below, without its messages: this feeds the eye glow.
/// What the eyes should say right now, using the same gates as TryTransformWithRules
/// below without its messages. The Cultist wins over the other forms only while its rules
/// give it a cooldown: that is the one form whose return is worth announcing.
/// </summary>
private bool CanTakeAnyForm()
private FenrirVisuals.ReadyState GetReadyState()
{
if (isTransformed) return false;
if (isTransformed) return FenrirVisuals.ReadyState.None;
int state = BossProgressionManager.GetCurrentProgressionState();
return CanTake(FenrirProgression.GetGKeyRules(state))
FenrirProgression.FormRules cultist = FenrirProgression.GetJKeyRules(state);
if (CanTake(cultist) && cultist.CooldownMinutes > 0) return FenrirVisuals.ReadyState.Cultist;
if (CanTake(FenrirProgression.GetGKeyRules(state))
|| CanTake(FenrirProgression.GetHKeyRules(state))
|| CanTake(FenrirProgression.GetJKeyRules(state));
|| CanTake(cultist))
{
return FenrirVisuals.ReadyState.Form;
}
return FenrirVisuals.ReadyState.None;
}
private bool CanTake(FenrirProgression.FormRules rules)