443
edits
No edit summary |
|||
| (10 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{DISPLAYTITLE:Code Analysis/Basics}} | |||
{{Spoiler}} | {{Spoiler}} | ||
{{Version|23.65}} | |||
This page contains code analysis on the basic stats of characters (PC and non-PC). | This page contains code analysis on the basic stats of characters (PC and non-PC). | ||
This page is updated to '''EA23. | This page is updated to '''EA23.65'''. | ||
==Maximum HP== | ==Maximum HP== | ||
| Line 46: | Line 47: | ||
*** If normal, 100%; if superior, 350%; if legendary, 600%, if mythical, 850%, if artifact, 1100%. | *** If normal, 100%; if superior, 350%; if legendary, 600%, if mythical, 850%, if artifact, 1100%. | ||
** The rarity of character is bosses and evolved monsters are legendary. | ** The rarity of character is bosses and evolved monsters are legendary. | ||
** All unique characters, such as Fiama, Gwen, even Innos Turas, have the '''rarity of artifact''', which possibly mean that this | ** All unique characters, such as Fiama, Gwen, even Innos Turas, have the '''rarity of artifact''', which possibly mean that this MP buff will apply to them if they are not in PC faction. ('''Need Confirmation''') | ||
* 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. | ||
| Line 258: | Line 259: | ||
* Element ID 920 or Chaos Attack will have a chance of increase your Sanity value by 0 - 1 for every attack received. The chance depend on the Element power of the attack, and will range from 30% to 100%. | * Element ID 920 or Chaos Attack will have a chance of increase your Sanity value by 0 - 1 for every attack received. The chance depend on the Element power of the attack, and will range from 30% to 100%. | ||
* A few other effects exist as a fixed increase in Sanity value. Doing the f thing will give Sanity value +10. Eating Human flesh (canniblism) gives a fixed Sanity value +15. | * A few other effects exist as a fixed increase in Sanity value. Doing the f thing will give Sanity value +10. Eating Human flesh (canniblism) gives a fixed Sanity value +15. | ||
==Relationship of Sanity and Sleepiness (<EA23.63) == | |||
<syntaxhighlight lang="c#" line="1"> | |||
public class StatsSleepiness : Stats | |||
{ | |||
public const int Sleepy = 1; | |||
public const int VerySleepy = 2; | |||
public const int VeryVerySleepy = 3; | |||
public override bool TrackPhaseChange => BaseStats.CC.IsPC; | |||
} | |||
... | |||
public Stats sleepiness => Stats.Sleepiness.Set(_cints, 17, this); | |||
public Stats SAN => Stats.SAN.Set(_cints, 17, this); | |||
public bool CanSleep() | |||
{ | |||
if (EClass._zone.events.GetEvent<ZoneEventQuest>() != null) | |||
{ | |||
return false; | |||
} | |||
if (!EClass.debug.godMode && sleepiness.GetPhase() == 0) | |||
{ | |||
return stamina.GetPhase() <= 1; | |||
} | |||
return true; | |||
} | |||
public override int GetPhase() | |||
{ | |||
return base.source.phase[(int)Mathf.Clamp(10f * (float)value / (float)max, 0f, 9f)]; | |||
} | |||
public virtual void Set(int a) | |||
{ | |||
value = a; | |||
if (value < min) | |||
{ | |||
value = min; | |||
} | |||
else if (value > max) | |||
{ | |||
value = max; | |||
} | |||
} | |||
</syntaxhighlight> | |||
'''BEFORE EA23.63''' | |||
*Interestingly, the character's sanity and sleepiness value are determined by the same parameter (ID: 17). | |||
*In actual gameplay, the first stage of sleepiness always activates the moment the sanity value reaches 40. In other words, it seems reasonable to think that the sleep value (sleepiness) and sanity level are always linked. | |||
**I have confirmed that even if the PC just woke up, if it continuously use "Hand of Madness" on itself, the PC will still enter a sleepiness state the moment sanity value reaches 40. | |||
**I believe it is correct that the madness level does not gradually increase from the state of "very sleepy," butt rather '''gradually increases over time from the start, and when it reaches a certain level, it enters a state of "sleepiness" or "very sleepy."''' | |||
**The phenomenon of the sanity value increasing from 0 over time has also been confirmed. | |||
*This is speculation, but I think that the madness level and sleep value should originally be designed as different values, but at the current stage of EA23.54, there is a bug where these two values become one. | |||
**In fact, no matter how much I searched in Elin Decompiled, I did not find any code that increases SAN value over time. | |||
**However, there is code that increases Sleepiness over time. Since SAN = Sleepiness, the SAN value is also increasing over time because of this. | |||
'''EA23.63''' | |||
* This is confirmed to be a bug. In this version, SAN and sleepiness are separated into two values. | |||
* SAN will not increase over time automatically. However, we expect the sleepiness value might not be so obvious now. Furthermore, SAN might become harder to decrease (previously you just need to sleep it off). | |||
==DV&PV== | |||
<syntaxhighlight lang="c#" line="1"> | |||
public override int DV | |||
{ | |||
get | |||
{ | |||
if (IsPCFaction) | |||
{ | |||
return elements.Value(64) / ((!HasCondition<ConWeakness>()) ? 1 : 2); | |||
} | |||
int num = base.LV; | |||
if (num > 50) | |||
{ | |||
num = 50 + (num - 50) / 10; | |||
} | |||
return (num + elements.Value(64) * (100 + num + race.DV * 5) / 100) / ((!HasCondition<ConWeakness>()) ? 1 : 2); | |||
} | |||
} | |||
public override int PV | |||
{ | |||
get | |||
{ | |||
if (IsPCFaction) | |||
{ | |||
return elements.Value(65) / ((!HasCondition<ConWeakness>()) ? 1 : 2); | |||
} | |||
int num = base.LV; | |||
if (num > 50) | |||
{ | |||
num = 50 + (num - 50) / 10; | |||
} | |||
return (num + elements.Value(65) * (100 + num + race.PV * 5) / 100) / ((!HasCondition<ConWeakness>()) ? 1 : 2); | |||
} | |||
} | |||
</syntaxhighlight> | |||
* For DV and PV, the calculation is as the following: | |||
** If character is in player faction, then the DV and PV is calculated using the base DV and PV or equipments, etc. | |||
** If the character is debuffed with weakness, the DV and PV is halved. | |||
** If chracter is not in player faction, we first record the level of character. | |||
** If level is greater than 50, the base number is recorded to 50 + (num - 50) / 10. | |||
** This number is not affected by weakness. | |||
** The equipment DV and PV is modified by (100 + num + racePV * 5) / 100, then calculated with the weakness condition. | |||
** For example, for a fairy (race DV of 25), not in player faction, with LVL of 80, and equipment DV of 200, PV of 50: | |||
** The actual DV is (53 + 200 * (100 + 53 + 25 * 5) / 100 = 53 + 556 = 609. | |||
** The actual PV is (53 + 50 * (100 + 53 + 0 * 5) / 100 = 53 + 78.5 = 131.5. | |||
* As you could see, the DV and PV of monsters are heavily buffed based on their level, at least 50 + base value * 150% for each value at level 50. | |||
* Although the scaling above lvl 50 is reduced to 1/10, this must be considered combined with [[Elin:Code_Analysis/Combat| the damage reduction with increase of lvl beyond 50]]. | |||
[[Category:EN]] | [[Category:EN]] | ||
[[Category:Elin Spoiler]] | [[Category:Elin Spoiler]] | ||
edits