Elin Modding Docs Doc
Loading...
Searching...
No Matches
BaseStats.cs
1using System;
2using System.Collections.Generic;
3using Newtonsoft.Json;
4using UnityEngine;
5
6// Token: 0x020002AA RID: 682
7public class BaseStats : EClass
8{
9 // Token: 0x17000625 RID: 1573
10 // (get) Token: 0x06001616 RID: 5654 RVA: 0x000956C4 File Offset: 0x000938C4
11 public SourceStat.Row source
12 {
13 get
14 {
15 SourceStat.Row result;
16 if ((result = this._source) == null)
17 {
18 result = (this._source = EClass.sources.stats.map[this.id]);
19 }
20 return result;
21 }
22 }
23
24 // Token: 0x17000626 RID: 1574
25 // (get) Token: 0x06001617 RID: 5655 RVA: 0x000956FE File Offset: 0x000938FE
26 public virtual Emo2 EmoIcon
27 {
28 get
29 {
30 return Emo2.none;
31 }
32 }
33
34 // Token: 0x06001618 RID: 5656 RVA: 0x00095701 File Offset: 0x00093901
35 public virtual Color GetColor(Gradient gradient)
36 {
37 return Color.white;
38 }
39
40 // Token: 0x06001619 RID: 5657 RVA: 0x00095708 File Offset: 0x00093908
41 public virtual Color GetColor(SkinColorProfile c)
42 {
43 return this.GetColor(c.gradients[this.source.colors.IsEmpty("default")]);
44 }
45
46 // Token: 0x0600161A RID: 5658 RVA: 0x00095730 File Offset: 0x00093930
47 public Color GetColor()
48 {
49 return this.GetColor(SkinManager.CurrentColors);
50 }
51
52 // Token: 0x17000627 RID: 1575
53 // (get) Token: 0x0600161B RID: 5659 RVA: 0x0009573D File Offset: 0x0009393D
54 public virtual ConditionType Type
55 {
56 get
57 {
58 return this.source.group.ToEnum(true);
59 }
60 }
61
62 // Token: 0x0600161C RID: 5660 RVA: 0x00095750 File Offset: 0x00093950
63 public virtual string GetText()
64 {
65 return null;
66 }
67
68 // Token: 0x0600161D RID: 5661 RVA: 0x00095753 File Offset: 0x00093953
69 public virtual string GetPhaseStr()
70 {
71 return this.GetText();
72 }
73
74 // Token: 0x0600161E RID: 5662 RVA: 0x0009575B File Offset: 0x0009395B
75 public virtual int GetValue()
76 {
77 return 0;
78 }
79
80 // Token: 0x17000628 RID: 1576
81 // (get) Token: 0x0600161F RID: 5663 RVA: 0x0009575E File Offset: 0x0009395E
82 public virtual string idSprite
83 {
84 get
85 {
86 return this.source.element.IsEmpty(this.source.alias);
87 }
88 }
89
90 // Token: 0x06001620 RID: 5664 RVA: 0x0009577B File Offset: 0x0009397B
91 public virtual Sprite GetSprite()
92 {
93 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", this.idSprite) ?? EClass.core.refs.spriteDefaultCondition;
94 }
95
96 // Token: 0x06001621 RID: 5665 RVA: 0x000957A0 File Offset: 0x000939A0
97 public virtual void SetText(UIText t, SkinColorProfile cols = null)
98 {
99 if (cols == null)
100 {
101 cols = EClass.ui.skins.currentSkin.colors._default;
102 }
103 t.SetText(this.GetText(), this.GetColor(cols));
104 }
105
106 // Token: 0x17000629 RID: 1577
107 // (get) Token: 0x06001622 RID: 5666 RVA: 0x000957D9 File Offset: 0x000939D9
108 public virtual bool ShowInWidget
109 {
110 get
111 {
112 return true;
113 }
114 }
115
116 // Token: 0x06001623 RID: 5667 RVA: 0x000957DC File Offset: 0x000939DC
117 public virtual int GetPhase()
118 {
119 return 0;
120 }
121
122 // Token: 0x1700062A RID: 1578
123 // (get) Token: 0x06001624 RID: 5668 RVA: 0x000957DF File Offset: 0x000939DF
124 public virtual Chara Owner
125 {
126 get
127 {
128 return BaseStats.CC;
129 }
130 }
131
132 // Token: 0x06001625 RID: 5669 RVA: 0x000957E8 File Offset: 0x000939E8
133 public void PopText()
134 {
135 if (!EClass.core.IsGameStarted || !this.Owner.ShouldShowMsg)
136 {
137 return;
138 }
139 string phaseStr = this.GetPhaseStr();
140 if (phaseStr.IsEmpty() || phaseStr == "#")
141 {
142 return;
143 }
144 Popper popper = EClass.scene.popper.Pop(this.Owner.renderer.PositionCenter(), "Condition");
145 Color c = this.GetColor() * 1.3f;
146 c.r += 0.3f;
147 c.g += 0.3f;
148 c.b += 0.3f;
149 popper.SetText(phaseStr, c);
150 }
151
152 // Token: 0x06001626 RID: 5670 RVA: 0x0009589C File Offset: 0x00093A9C
153 public virtual void WriteNote(UINote n, Action<UINote> onWriteNote = null)
154 {
155 n.Clear();
156 n.AddHeader(this.source.GetName(), null);
157 n.AddText("NoteText_flavor_element", this.source.GetDetail(), FontColor.DontChange);
158 this._WriteNote(n, false);
159 n.Build();
160 }
161
162 // Token: 0x06001627 RID: 5671 RVA: 0x000958E8 File Offset: 0x00093AE8
163 public virtual void _WriteNote(UINote n, bool asChild = false)
164 {
165 List<string> list = new List<string>();
166 foreach (string key in this.source.nullify)
167 {
168 list.Add("hintNullify".lang(EClass.sources.stats.alias[key].GetName(), null, null, null, null));
169 }
170 if (list.Count > 0)
171 {
172 if (!asChild)
173 {
174 n.Space(8, 1);
175 }
176 foreach (string str in list)
177 {
178 n.AddText("_bullet".lang() + str, FontColor.DontChange);
179 }
180 }
181 }
182
183 // Token: 0x04001043 RID: 4163
184 public static Chara CC;
185
186 // Token: 0x04001044 RID: 4164
187 [JsonProperty]
188 public int id;
189
190 // Token: 0x04001045 RID: 4165
191 public SourceStat.Row _source;
192}
Definition Chara.cs:12