Jump to content

Elin:Code Analysis/Basics: Difference between revisions

Add stamina calculation... but I'm still not sure what vBase is, can someone help?
No edit summary
(Add stamina calculation... but I'm still not sure what vBase is, can someone help?)
Line 47: Line 47:
* This value is finally modified by the Lonelysoul feat if the character is PC.
* This value is finally modified by the Lonelysoul feat if the character is PC.


==Maximum Stamina==
<syntaxhighlight lang="c#" line="1">
public void CalculateMaxStamina()
{
int num = base.END;
int num2 = 0;
foreach (Element value in elements.dict.Values)
{
if (value.source.category == "skill")
{
num = ((!IsPC) ? (num + Mathf.Max(value.ValueWithoutLink, 0)) : (num + Mathf.Max(value.vBase, 0)));
}
}
num2 = EClass.curve(num, 30, 10, 60);
if (num2 < 10)
{
num2 = 10;
}
_maxStamina = num2 + 15;
}
    ....
    public override int max => BaseStats.CC._maxStamina * BaseStats.CC.Evalue(62) / 100;
</syntaxhighlight>
The maximum stamina of chracters is determined by the following:
* Each point of base endurance increase the base stamina number by 1.
* ('''Need confirmation''') For each skill a chracter have, increase this base stamina number by the level of that skill.
* The base stamina number go through a CURVE function with (base, 30, 10, 60).
** This means, if the base stamina is less than 30, return that value.
** For each point of additional base stamina, the return is diminished.
** Base stamina 60, output is 44.8
** Base stamina 90, output is 53.36
** Base stamina 300, output is 77.9
* The output number is increased by 15, then modified by the vigor(Evalue(62))% of player.
==Carryweight Limit==
==Carryweight Limit==
<syntaxhighlight lang="c#" line="1">
<syntaxhighlight lang="c#" line="1">
443

edits