Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
CharaUpgrade.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using Newtonsoft.Json;
3
4public class CharaUpgrade : EClass
5{
6 public class Item : EClass
7 {
8 [JsonProperty]
9 public int[] ints = new int[4];
10
11 public int idEle
12 {
13 get
14 {
15 return ints[0];
16 }
17 set
18 {
19 ints[0] = value;
20 }
21 }
22
23 public int value
24 {
25 get
26 {
27 return ints[1];
28 }
29 set
30 {
31 ints[1] = value;
32 }
33 }
34
35 public int cost
36 {
37 get
38 {
39 return ints[2];
40 }
41 set
42 {
43 ints[2] = value;
44 }
45 }
46
48 {
49 get
50 {
51 return ints[3].ToEnum<DNA.Type>();
52 }
53 set
54 {
55 ints[3] = (int)value;
56 }
57 }
58 }
59
60 [JsonProperty]
61 public List<Item> items = new List<Item>();
62
63 [JsonProperty]
64 public int count;
65
66 [JsonProperty]
67 public int spent;
68
69 [JsonProperty]
70 public int reset;
71
72 [JsonProperty]
73 public bool halt;
74
75 public void Reset(Chara c)
76 {
77 foreach (Item item in items)
78 {
79 Element element = c.elements.GetElement(item.idEle);
80 if (element != null)
81 {
82 if (element is Feat)
83 {
84 c.SetFeat(item.idEle, 0);
85 }
86 else
87 {
88 c.elements.ModBase(item.idEle, -item.value);
89 }
90 }
91 }
92 items.Clear();
93 c.feat += spent;
94 spent = 0;
95 count = 0;
96 c.Refresh();
97 reset++;
98 }
99}
void Reset(Chara c)
Definition: CharaUpgrade.cs:75
List< Item > items
Definition: CharaUpgrade.cs:61
Definition: Chara.cs:10
Definition: DNA.cs:8
Type
Definition: DNA.cs:10
Definition: EClass.cs:5
Definition: FEAT.cs:249