Elin Decompiled Documentation EA 23.244 Nightly
Loading...
Searching...
No Matches
StatsMana Class Reference
Inheritance diagram for StatsMana:
Stats BaseStats EClass

Public Member Functions

override void Mod (int a)
 
- Public Member Functions inherited from Stats
override int GetValue ()
 
override string ToString ()
 
override string GetText ()
 
override Color GetColor (Gradient g)
 
Stats Set (int[] _raw, int _rawIndex, Chara _CC)
 
override int GetPhase ()
 
virtual void Set (int a)
 
virtual void Mod (int a)
 
virtual void Validate ()
 
virtual void OnChangePhase (int phase, int lastPhase)
 
- Public Member Functions inherited from BaseStats
virtual Color GetColor (Gradient gradient)
 
virtual Color GetColor (SkinColorProfile c)
 
Color GetColor ()
 
virtual string GetText ()
 
virtual string GetPhaseStr ()
 
virtual int GetValue ()
 
virtual int GetSortVal ()
 
virtual Sprite GetSprite ()
 
virtual void SetText (UIText t, SkinColorProfile cols=null)
 
virtual int GetPhase ()
 
void PopText ()
 
virtual void WriteNote (UINote n, Action< UINote > onWriteNote=null)
 
virtual void _WriteNote (UINote n, bool asChild=false)
 

Properties

override int max [get]
 
override int min [get]
 
- Properties inherited from Stats
virtual int value [get, set]
 
virtual int max [get, set]
 
string name [get]
 
virtual bool TrackPhaseChange [get]
 
virtual int min [get]
 
- Properties inherited from BaseStats
SourceStat.Row source [get]
 
virtual Emo2 EmoIcon [get]
 
virtual ConditionType Type [get]
 
virtual string idSprite [get]
 
virtual bool ShowInWidget [get]
 
virtual Chara Owner [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (int _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Public Attributes inherited from Stats
int rawIndex
 
int[] raw
 
- Public Attributes inherited from BaseStats
int id
 
SourceStat.Row _source
 
- Static Public Attributes inherited from Stats
static StatsHunger Hunger
 
static StatsBurden Burden
 
static StatsStamina Stamina
 
static StatsSleepiness Sleepiness
 
static Stats Depression
 
static Stats Bladder
 
static StatsHygiene Hygiene
 
static StatsMana Mana
 
static StatsSAN SAN
 
- Static Public Attributes inherited from BaseStats
static Chara CC
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 3 of file StatsMana.cs.

Member Function Documentation

◆ Mod()

override void StatsMana.Mod ( int  a)
inlinevirtual

Reimplemented from Stats.

Definition at line 9 of file StatsMana.cs.

10 {
11 if (BaseStats.CC.IsPC && EClass.debug.godMode && a < 0)
12 {
13 return;
14 }
15 if (a < 0 && BaseStats.CC.HasElement(1330))
16 {
17 if (a == -1 && EClass.rnd(4) == 0)
18 {
19 return;
20 }
21 a = -EClass.rnd(-a * 130 / 100 + 2);
22 }
23 base.Mod(a);
24 if (a >= 0)
25 {
26 return;
27 }
29 {
30 a /= 10;
31 }
33 Chara cC = BaseStats.CC;
34 if (value < 0)
35 {
36 int num = -value * 400 / (100 + BaseStats.CC.EvalueMax(303, -5) * 10);
37 if (BaseStats.CC.HasElement(1201))
38 {
39 num /= 3;
40 }
41 if (!BaseStats.CC.IsPC)
42 {
43 num /= 5;
44 if (num < 10)
45 {
46 return;
47 }
48 }
49 BaseStats.CC.Say("mana_overflow", BaseStats.CC);
50 BaseStats.CC.DamageHP(num, 921, 100, AttackSource.ManaBackfire);
52 {
53 cC.elements.ModExp(303, Mathf.Clamp(-a * 10, 10, 200));
54 }
55 }
56 if (value <= 0 && cC.IsAliveInCurrentZone && cC.HasElement(1245) && !cC.HasCooldown(1245))
57 {
58 cC.AddCooldown(1245);
60 cC.Cure(CureType.Boss);
61 cC.HealHP(cC.MaxHP / 2);
62 EClass.player.forceTalk = true;
63 }
64 }
AttackSource
Definition: AttackSource.cs:2
CureType
Definition: CureType.cs:2
static Chara CC
Definition: BaseStats.cs:8
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2585
ElementContainerCard elements
Definition: Card.cs:41
virtual int Power
Definition: Card.cs:2295
virtual void HealHP(int a, HealSource origin=HealSource.None)
Definition: Card.cs:4003
void DamageHP(long dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:4063
bool ShouldShowMsg
Definition: Card.cs:2454
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:5900
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6797
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:561
Condition AddCondition(string id, int p=100, bool force=false)
Definition: Chara.cs:9189
override bool IsPC
Definition: Chara.cs:612
override bool IsPCFaction
Definition: Chara.cs:671
override int MaxHP
Definition: Chara.cs:708
void AddCooldown(int idEle, int turns=0)
Definition: Chara.cs:8600
void Cure(CureType type, int p=100, BlessedState state=BlessedState.Normal)
Definition: Chara.cs:9442
bool HasCooldown(int idEle)
Definition: Chara.cs:8651
bool godMode
Definition: CoreDebug.cs:173
Definition: EClass.cs:6
static int rnd(long a)
Definition: EClass.cs:59
static CoreDebug debug
Definition: EClass.cs:49
void ModExp(int ele, float a, bool chain=false)
virtual int value
Definition: Stats.cs:56

References Chara.AddCondition(), Chara.AddCooldown(), BaseStats.CC, Chara.Cure(), Card.DamageHP(), EClass.debug, Card.elements, Card.EvalueMax(), CoreDebug.godMode, Chara.HasCooldown(), Card.HasElement(), Card.HealHP(), Chara.IsAliveInCurrentZone, Chara.IsPC, Chara.IsPCFaction, Chara.MaxHP, ElementContainer.ModExp(), Card.Power, EClass.rnd(), Card.Say(), Card.ShouldShowMsg, and Stats.value.

Property Documentation

◆ max

override int StatsMana.max
get

Definition at line 5 of file StatsMana.cs.

◆ min

override int StatsMana.min
get

Definition at line 7 of file StatsMana.cs.


The documentation for this class was generated from the following file: