draughfirstdraft

This commit is contained in:
Ferdinando 2026-08-02 08:30:53 +02:00
commit be2f7a73cd
8 changed files with 555 additions and 163 deletions

View file

@ -23,8 +23,22 @@ namespace RacesOfValheim
if (__instance.m_bodyModel != null && __instance.m_bodyModel.material != null)
{
// Sickly grayish-green undead skin color (corpse green)
Color draughColor = new Color(0.25f, 0.4f, 0.28f, 1f);
Color draughColor = new Color(0.25f, 0.4f, 0.28f, 1f); // Sickly grayish-green undead skin color
// Stage 6: Undying Will ghost visuals
if (DraughRace.isUndying && player == Player.m_localPlayer)
{
draughColor = new Color(0.2f, 1f, 0.2f, 0.5f); // Bright transparent green
__instance.m_bodyModel.material.SetOverrideTag("RenderType", "Transparent");
__instance.m_bodyModel.material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
__instance.m_bodyModel.material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
__instance.m_bodyModel.material.SetInt("_ZWrite", 0);
__instance.m_bodyModel.material.DisableKeyword("_ALPHATEST_ON");
__instance.m_bodyModel.material.EnableKeyword("_ALPHABLEND_ON");
__instance.m_bodyModel.material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
__instance.m_bodyModel.material.renderQueue = (int)UnityEngine.Rendering.RenderQueue.Transparent;
}
__instance.m_bodyModel.material.SetColor("_SkinColor", draughColor);
}
@ -114,6 +128,18 @@ namespace RacesOfValheim
// +50% damage received from fire, spirit
hit.m_damage.m_fire *= 1.5f;
hit.m_damage.m_spirit *= 1.5f;
// Stage 4: Undead Fortitude (Poison Immunity)
if (BossProgressionManager.GetCurrentProgressionState() >= 4)
{
hit.m_damage.m_poison = 0f;
}
// Stage 5: Grave Chill (Frost Immunity)
if (BossProgressionManager.GetCurrentProgressionState() >= 5)
{
hit.m_damage.m_frost = 0f;
}
}
}
}