Elin Modding Docs Doc
Loading...
Searching...
No Matches
StatsMana.cs
1using System;
2using UnityEngine;
3
4// Token: 0x020002B0 RID: 688
5public class StatsMana : Stats
6{
7 // Token: 0x17000634 RID: 1588
8 // (get) Token: 0x06001645 RID: 5701 RVA: 0x00095E10 File Offset: 0x00094010
9 public override int max
10 {
11 get
12 {
13 return Mathf.Max(1, ((BaseStats.CC.MAG * 2 + BaseStats.CC.WIL + BaseStats.CC.LER / 2) * Mathf.Min(BaseStats.CC.LV, 25) / 25 + BaseStats.CC.MAG + 10) * BaseStats.CC.Evalue(61) / 100 * (int)((BaseStats.CC.IsPCFaction ? ((Rarity)100) : ((Rarity)100 + (int)(BaseStats.CC.rarity * (Rarity)250))) + (BaseStats.CC.IsPC ? (EClass.player.lastEmptyAlly * BaseStats.CC.Evalue(1646)) : 0)) / 100);
14 }
15 }
16
17 // Token: 0x17000635 RID: 1589
18 // (get) Token: 0x06001646 RID: 5702 RVA: 0x00095ECB File Offset: 0x000940CB
19 public override int min
20 {
21 get
22 {
23 return -9999;
24 }
25 }
26
27 // Token: 0x06001647 RID: 5703 RVA: 0x00095ED4 File Offset: 0x000940D4
28 public override void Mod(int a)
29 {
30 if (BaseStats.CC.IsPC && EClass.debug.godMode && a < 0)
31 {
32 return;
33 }
34 if (a < 0 && BaseStats.CC.HasElement(1330, 1))
35 {
36 a = -EClass.rnd(-a * 130 / 100 + 2);
37 }
38 base.Mod(a);
39 if (a < 0)
40 {
41 if (!BaseStats.CC.IsPCFaction)
42 {
43 a /= 10;
44 }
45 bool shouldShowMsg = BaseStats.CC.ShouldShowMsg;
46 if (this.value < 0)
47 {
48 int num = -this.value * 400 / (100 + BaseStats.CC.Evalue(303) * 10);
49 if (BaseStats.CC.HasElement(1201, 1))
50 {
51 num /= 3;
52 }
53 if (!BaseStats.CC.IsPC)
54 {
55 num /= 5;
56 if (num < 10)
57 {
58 return;
59 }
60 }
61 BaseStats.CC.Say("mana_overflow", BaseStats.CC, null, null);
62 BaseStats.CC.DamageHP(num, 921, 100, AttackSource.None, null, true);
63 if (BaseStats.CC.IsAliveInCurrentZone)
64 {
65 BaseStats.CC.elements.ModExp(303, Mathf.Clamp(-a * 10, 10, 200), false);
66 }
67 }
68 }
69 }
70}
Definition Stats.cs:6