361
edits
No edit summary |
No edit summary |
||
Line 258: | Line 258: | ||
* 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== | |||
<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> | |||
*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. | |||
[[Category:EN]] | [[Category:EN]] | ||
[[Category:Elin Spoiler]] | [[Category:Elin Spoiler]] |
edits