Demonized

Demonized is the game mechanic which causes the Player to lose control of Characters with low Mood and Mental State. It is implemented as a hidden Need.
==Causes==
When a Xiandao Cultivator's Mood is below 30, they are at risk of becoming DemonizedXiaWorld.DemonNeed.GetSubValue. The rate at which the risk increases depends on their Mental StateXiaWorld.GameDefine.MindState2Demon:
Mental State	Tier 	Risk
>= 95% 	Pristine 	0
85-95% 	Harmony 	0.001
70%-85% 	Composed 	0.006
50%-70% 	Stable 	0.01
30%-50% 	Unstable 	0.012
<30% 	Breakdown	0.02
When this occurs, the Demonized value increases by the Risk value every second.
Every second when the Mood is below 30 and the Risk is greater than zero, a roll is performed against the Demonized value/300,000 if the value is greater than 30XiaWorld.DemonNeed.OnValueChange. 
For example, a Demonized value of 100 (5000 seconds at Breakdown Mental State and <30 Mood) results in a Demonization chance of 0.033% every second (on average every 3000 seconds or 5 days).
If the roll succeeds, the Character becomes Demonized, and the Demonized value is halved.
==Effects==
The Player loses control of the Demonized character. 
The character begins one of the following random Demonized actionsXiaWorld.BehaviourIamDemon.Check. These actions cannot be cancelled. 
* Demon (Blank Stare) (JobDemonBlank): 600-1500 secondsXiaWorld.JobDemonBlank
* Demon (Confined) (JobDemonClaustrophobia): 300-600 secondsXiaWorld.JobDemonClaustrophobia
* Demon (Sealed) (JobDemonLoseSoul): 300-600 secondsXiaWorld.JobDemonLoseSoul
* Demon (Wailing) (JobDemonWail): 200-600 secondsXiaWorld.JobDemonWail
After the action times out, the Player regains control of the Demonized character.
==References==
Category:Game Mechanics
Category:Mood
Category:Mental State
Category:Xiandao Cultivation
Category:Needs