Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
CellEffect.cs
Go to the documentation of this file.
1using Newtonsoft.Json;
2
3public class CellEffect : EClass
4{
5 [JsonProperty]
6 public int[] ints = new int[8];
7
8 [JsonProperty]
9 public string[] strs = new string[1];
10
12
13 public int id
14 {
15 get
16 {
17 return ints[0];
18 }
19 set
20 {
21 ints[0] = value;
22 }
23 }
24
25 public int amount
26 {
27 get
28 {
29 return ints[1];
30 }
31 set
32 {
33 ints[1] = value;
34 }
35 }
36
38 {
39 get
40 {
41 return ints[2].ToEnum<EffectId>();
42 }
43 set
44 {
45 ints[2] = (int)value;
46 }
47 }
48
49 public int power
50 {
51 get
52 {
53 return ints[3];
54 }
55 set
56 {
57 ints[3] = value;
58 }
59 }
60
61 public int color
62 {
63 get
64 {
65 return ints[4];
66 }
67 set
68 {
69 ints[4] = value;
70 }
71 }
72
73 public bool isHostileAct
74 {
75 get
76 {
77 return (ints[5] & 2) != 0;
78 }
79 set
80 {
81 ints[5] = (value ? (ints[5] | 2) : (ints[5] & -3));
82 }
83 }
84
85 public bool isBlessed
86 {
87 get
88 {
89 return (ints[5] & 4) != 0;
90 }
91 set
92 {
93 ints[5] = (value ? (ints[5] | 4) : (ints[5] & -5));
94 }
95 }
96
97 public bool isCursed
98 {
99 get
100 {
101 return (ints[5] & 8) != 0;
102 }
103 set
104 {
105 ints[5] = (value ? (ints[5] | 8) : (ints[5] & -9));
106 }
107 }
108
109 public int idEle
110 {
111 get
112 {
113 return ints[6];
114 }
115 set
116 {
117 ints[6] = value;
118 }
119 }
120
121 public string n1
122 {
123 get
124 {
125 return strs[0];
126 }
127 set
128 {
129 strs[0] = value;
130 }
131 }
132
134
135 public bool IsFire => id == 3;
136
137 public bool IsLiquid
138 {
139 get
140 {
141 if (id != 1 && id != 2)
142 {
143 return id == 4;
144 }
145 return true;
146 }
147 }
148
149 public int FireAmount
150 {
151 get
152 {
153 if (id != 3)
154 {
155 return 0;
156 }
157 return amount;
158 }
159 }
160
161 public int LiquidAmount
162 {
163 get
164 {
165 if (!IsLiquid)
166 {
167 return 0;
168 }
169 return amount;
170 }
171 }
172
173 public bool WillFade => id >= 5;
174}
EffectId
Definition: EffectId.cs:2
int amount
Definition: CellEffect.cs:26
bool isHostileAct
Definition: CellEffect.cs:74
bool WillFade
Definition: CellEffect.cs:173
string n1
Definition: CellEffect.cs:122
int LiquidAmount
Definition: CellEffect.cs:162
string[] strs
Definition: CellEffect.cs:9
SourceCellEffect.Row _source
Definition: CellEffect.cs:11
EffectId idEffect
Definition: CellEffect.cs:38
int FireAmount
Definition: CellEffect.cs:150
int[] ints
Definition: CellEffect.cs:6
bool IsFire
Definition: CellEffect.cs:135
bool IsLiquid
Definition: CellEffect.cs:138
bool isCursed
Definition: CellEffect.cs:98
SourceCellEffect.Row source
Definition: CellEffect.cs:133
bool isBlessed
Definition: CellEffect.cs:86
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
SourceCellEffect cellEffects