warvulture
This commit is contained in:
parent
4559e0b9e1
commit
e9d6e78ec8
15 changed files with 1041 additions and 489 deletions
|
|
@ -37,7 +37,19 @@ namespace RacesOfValheim
|
|||
public static void Postfix(Player __instance, ref float __result)
|
||||
{
|
||||
if (__instance == null || !SvermVisuals.IsSvermPlayer(__instance)) return;
|
||||
__result += SvermCarapace.GetArmor(SvermVisuals.GetRenderState(__instance));
|
||||
|
||||
float carapace = SvermCarapace.GetArmor(SvermVisuals.GetRenderState(__instance));
|
||||
|
||||
// Ravager Strain's whole benefit: the carapace is worth double for as long as the
|
||||
// form holds. Multiplying only the carapace's own contribution, not the total,
|
||||
// keeps a cape or trinket's armour honest instead of doubling gear the form had
|
||||
// nothing to do with.
|
||||
if (SvermRavagerForm.IsActive)
|
||||
{
|
||||
carapace *= SvermConfig.RavagerArmorMultiplier;
|
||||
}
|
||||
|
||||
__result += carapace;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -106,26 +118,13 @@ namespace RacesOfValheim
|
|||
int state = SvermVisuals.GetRenderState(attackingPlayer);
|
||||
SvermProgression.SvermRules rules = SvermProgression.GetRules(state);
|
||||
|
||||
// Unarmed only - the claws' own tier-scaled blow. Ravager Strain's own hits
|
||||
// (RavagerFormBehavior.ExecuteDamage) are built with Skills.SkillType.Swords
|
||||
// on purpose, specifically so they never reach this branch and get overwritten
|
||||
// by the claws' numbers - the Brute's own damage is meant to stand as-is.
|
||||
if (hit.m_skill == Skills.SkillType.Unarmed)
|
||||
{
|
||||
// In Stinger Morph the hands are gone and what lands is a needle. The
|
||||
// deathsquito's own figure is read off the creature, so it stays whatever
|
||||
// vanilla says a deathsquito is worth; if it could not be read it comes
|
||||
// back as zeroes and the claws answer instead.
|
||||
HitData.DamageTypes sting = SvermStingerForm.IsActive
|
||||
? SvermStingerForm.GetStingDamage()
|
||||
: default(HitData.DamageTypes);
|
||||
|
||||
if (sting.m_pierce + sting.m_slash + sting.m_blunt > 0f)
|
||||
{
|
||||
hit.m_damage.m_pierce = sting.m_pierce;
|
||||
hit.m_damage.m_slash = sting.m_slash;
|
||||
hit.m_damage.m_blunt = sting.m_blunt;
|
||||
}
|
||||
else
|
||||
{
|
||||
SvermClaws.ApplyToUnarmedHit(hit, state);
|
||||
}
|
||||
SvermClaws.ApplyToUnarmedHit(hit, state);
|
||||
}
|
||||
|
||||
if (rules.VenomOnHit > 0f)
|
||||
|
|
@ -140,13 +139,9 @@ namespace RacesOfValheim
|
|||
|
||||
SvermProgression.SvermRules victimRules = SvermProgression.GetRules(SvermVisuals.GetRenderState(victim));
|
||||
|
||||
// The whole price of the form: out of the shell, a Sverm is an insect. Applied
|
||||
// before the blunt and fire terms so it multiplies everything, not just the two
|
||||
// types the carapace was ever weak to.
|
||||
if (SvermStingerForm.IsActive)
|
||||
{
|
||||
hit.m_damage.Modify(SvermConfig.StingerFragility);
|
||||
}
|
||||
// Ravager Strain no longer touches incoming damage directly - its whole benefit is
|
||||
// the doubled carapace armour applied in Sverm_GetBodyArmor_Patch below, which
|
||||
// Valheim's own armour formula turns into reduced damage the normal way.
|
||||
|
||||
if (victimRules.BluntWeakness != 0f && hit.m_damage.m_blunt > 0f)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue