Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
StatsMana.cs
Go to the documentation of this file.
1using UnityEngine;
2
3public class StatsMana : Stats
4{
5 public override int max => (int)Mathf.Clamp(((long)(BaseStats.CC.MAG * 2 + BaseStats.CC.WIL + BaseStats.CC.LER / 2) * (long)Mathf.Min(BaseStats.CC.LV, 25) / 25 + BaseStats.CC.MAG + 10) * (BaseStats.CC.Evalue(61) - BaseStats.CC.Evalue(93)) / 100 * ((BaseStats.CC.IsPCFaction ? 100 : (100 + (int)BaseStats.CC.rarity * 250)) + (BaseStats.CC.IsPC ? (EClass.player.lastEmptyAlly * BaseStats.CC.Evalue(1646)) : 0)) / 100, 1f, 100000000f);
6
7 public override int min => -999999;
8
9 public override void Mod(int a)
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 if (value >= 0)
34 {
35 return;
36 }
37 int num = -value * 400 / (100 + BaseStats.CC.EvalueMax(303, -5) * 10);
38 if (BaseStats.CC.HasElement(1201))
39 {
40 num /= 3;
41 }
42 if (!BaseStats.CC.IsPC)
43 {
44 num /= 5;
45 if (num < 10)
46 {
47 return;
48 }
49 }
50 BaseStats.CC.Say("mana_overflow", BaseStats.CC);
51 BaseStats.CC.DamageHP(num, 921, 100, AttackSource.ManaBackfire);
52 Chara cC = BaseStats.CC;
54 {
55 cC.elements.ModExp(303, Mathf.Clamp(-a * 10, 10, 200));
56 }
57 }
58}
AttackSource
Definition: AttackSource.cs:2
static Chara CC
Definition: BaseStats.cs:8
int EvalueMax(int ele, int min=0)
Definition: Card.cs:2445
ElementContainerCard elements
Definition: Card.cs:37
void DamageHP(int dmg, AttackSource attackSource=AttackSource.None, Card origin=null)
Definition: Card.cs:3735
bool HasElement(int ele, int req=1)
Definition: Card.cs:5214
Rarity rarity
Definition: Card.cs:298
int LER
Definition: Card.cs:2201
int WIL
Definition: Card.cs:2203
int MAG
Definition: Card.cs:2205
int Evalue(int ele)
Definition: Card.cs:2431
bool ShouldShowMsg
Definition: Card.cs:2314
int LV
Definition: Card.cs:370
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
Definition: Chara.cs:10
override bool IsAliveInCurrentZone
Definition: Chara.cs:546
override bool IsPC
Definition: Chara.cs:597
override bool IsPCFaction
Definition: Chara.cs:656
bool godMode
Definition: CoreDebug.cs:172
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static CoreDebug debug
Definition: EClass.cs:48
void ModExp(int ele, int a, bool chain=false)
override int max
Definition: StatsMana.cs:5
override int min
Definition: StatsMana.cs:7
override void Mod(int a)
Definition: StatsMana.cs:9
Definition: Stats.cs:5
virtual int value
Definition: Stats.cs:56