Elin Decompiled Documentation
EA 23.222 Stable nyan
Loading...
Searching...
No Matches
GamePrincipal.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections.Generic;
3
using
Newtonsoft.Json;
4
5
[Serializable]
6
public
class
GamePrincipal
:
EClass
7
{
8
public
enum
Type
9
{
10
Oath
,
11
Workaround
,
12
Legacy
,
13
Flavor
14
}
15
16
public
class
Item
17
{
18
public
string
id
;
19
20
public
Type
type
;
21
22
public
Func<bool>
_get
;
23
24
public
Action<bool>
_set
;
25
26
public
int
grade
;
27
28
public
bool
IsEmbark
29
{
30
get
31
{
32
if
(
EClass
.
core
.
IsGameStarted
)
33
{
34
return
EClass
.
player
.
resetPrincipal
;
35
}
36
return
true
;
37
}
38
}
39
40
public
bool
Get
()
41
{
42
return
_get
();
43
}
44
45
public
void
Set
(
bool
value)
46
{
47
_set
(value);
48
}
49
50
public
bool
IsModified
()
51
{
52
return
Get
() !=
EClass
.
game
.
principal
.GetField<
bool
>(
id
);
53
}
54
55
public
bool
WasSealed
()
56
{
57
if
(
EClass
.
game
.
principal
.
modified
.Contains(
id
) ||
IsEmbark
)
58
{
59
return
false
;
60
}
61
bool
num =
type
==
Type
.Oath;
62
bool
field =
EClass
.
game
.
principal
.GetField<
bool
>(
id
);
63
if
(num)
64
{
65
return
field;
66
}
67
return
!field;
68
}
69
70
public
bool
IsSealed
()
71
{
72
if
(
EClass
.
game
.
principal
.
modified
.Contains(
id
))
73
{
74
return
false
;
75
}
76
bool
num =
type
==
Type
.Oath;
77
bool
flag =
Get
();
78
bool
flag2 = (
IsEmbark
? flag :
EClass
.
game
.
principal
.GetField<
bool
>(
id
));
79
if
(num)
80
{
81
return
flag2 && flag;
82
}
83
if
(!flag2)
84
{
85
return
!flag;
86
}
87
return
false
;
88
}
89
}
90
91
public
class
ItemSlider
:
Item
92
{
93
public
int
max
;
94
95
public
Func<int>
_getInt
;
96
97
public
Action<int>
_setInt
;
98
99
public
Func<int, string>
funcText
;
100
101
public
int
GetInt
()
102
{
103
return
_getInt
();
104
}
105
106
public
void
SetInt
(
int
value)
107
{
108
_setInt
(value);
109
}
110
}
111
112
[JsonProperty]
113
public
int
id
;
114
115
[JsonProperty]
116
public
int
socre
;
117
118
[JsonProperty]
119
public
int
dropRateMtp
;
120
121
[JsonProperty]
122
public
int
petFeatExpMtp
;
123
124
[JsonProperty]
125
public
bool
ignoreEvaluate
;
126
127
[JsonProperty]
128
public
bool
disableDeathPenaltyProtection
;
129
130
[JsonProperty]
131
public
bool
tax
;
132
133
[JsonProperty]
134
public
bool
opMilk
;
135
136
[JsonProperty]
137
public
bool
disableManualSave
;
138
139
[JsonProperty]
140
public
bool
permadeath
;
141
142
[JsonProperty]
143
public
bool
infiniteMarketFund
;
144
145
[JsonProperty]
146
public
bool
disableUsermapBenefit
;
147
148
[JsonProperty]
149
public
bool
scaleQuest
;
150
151
[JsonProperty]
152
public
bool
realAdv
;
153
154
[JsonProperty]
155
public
bool
noAging
;
156
157
[JsonProperty]
158
public
bool
dropRate
;
159
160
[JsonProperty]
161
public
bool
petFeatExp
;
162
163
[JsonProperty]
164
public
bool
disableVoidBlessing
;
165
166
[JsonProperty]
167
public
bool
enableDamageReduction
;
168
169
[JsonProperty]
170
public
bool
enableGeneDupe
;
171
172
[JsonProperty]
173
public
HashSet<string>
modified
=
new
HashSet<string>();
174
175
public
bool
IsCustom
=>
id
== -1;
176
177
public
List<Item>
ListItems
()
178
{
179
List<Item> list =
new
List<Item>();
180
Add
(1,
Type
.Oath,
"disableManualSave"
, () =>
disableManualSave
, delegate(
bool
a)
181
{
182
disableManualSave
= a;
183
});
184
Add
(1,
Type
.Oath,
"disableDeathPenaltyProtection"
, () =>
disableDeathPenaltyProtection
, delegate(
bool
a)
185
{
186
disableDeathPenaltyProtection
= a;
187
});
188
Add
(1,
Type
.Oath,
"disableUsermapBenefit"
, () =>
disableUsermapBenefit
, delegate(
bool
a)
189
{
190
disableUsermapBenefit
= a;
191
});
192
Add
(1,
Type
.Oath,
"scaleQuest"
, () =>
scaleQuest
, delegate(
bool
a)
193
{
194
scaleQuest
= a;
195
});
196
Add
(3,
Type
.Oath,
"permadeath"
, () =>
permadeath
, delegate(
bool
a)
197
{
198
permadeath
= a;
199
});
200
Add
(2,
Type
.Workaround,
"disableVoidBlessing"
, () =>
disableVoidBlessing
, delegate(
bool
a)
201
{
202
disableVoidBlessing
= a;
203
});
204
AddSlider(2,
Type
.Workaround,
"dropRate"
, () =>
dropRate
, delegate(
bool
a)
205
{
206
dropRate
= a;
207
}, () =>
dropRateMtp
, delegate(
int
a)
208
{
209
dropRateMtp
= a;
210
}, (
int
a) => 0.5f + 0.5f * (
float
)a +
"x"
, 5);
211
AddSlider(2,
Type
.Workaround,
"petFeatExp"
, () =>
petFeatExp
, delegate(
bool
a)
212
{
213
petFeatExp
= a;
214
}, () =>
petFeatExpMtp
, delegate(
int
a)
215
{
216
petFeatExpMtp
= a;
217
}, (
int
a) => 0.5f + 0.5f * (
float
)a +
"x"
, 3);
218
Add
(-1,
Type
.Legacy,
"enableDamageReduction"
, () =>
enableDamageReduction
, delegate(
bool
a)
219
{
220
enableDamageReduction
= a;
221
});
222
Add
(-1,
Type
.Legacy,
"enableGeneDupe"
, () =>
enableGeneDupe
, delegate(
bool
a)
223
{
224
enableGeneDupe
= a;
225
});
226
Add
(-1,
Type
.Flavor,
"noAging"
, () =>
noAging
, delegate(
bool
a)
227
{
228
noAging
= a;
229
});
230
return
list;
231
void
Add
(
int
grade,
Type
type,
string
id
, Func<bool> _get, Action<bool> _set)
232
{
233
list.Add(
new
Item
234
{
235
type = type,
236
grade = grade,
237
id
=
id
,
238
_get = _get,
239
_set = _set
240
});
241
}
242
void
AddSlider(
int
grade,
Type
type,
string
id
, Func<bool> _get, Action<bool> _set, Func<int> _getInt, Action<int> _setInt, Func<int, string> funcText,
int
max)
243
{
244
list.Add(
new
ItemSlider
245
{
246
type = type,
247
grade = grade,
248
id
=
id
,
249
_get = _get,
250
_set = _set,
251
_getInt = _getInt,
252
_setInt = _setInt,
253
funcText = funcText,
254
max = max
255
});
256
}
257
}
258
}
Add
list. Add(item3)
Core.IsGameStarted
bool IsGameStarted
Definition:
Core.cs:84
EClass
Definition:
EClass.cs:5
EClass.game
static Game game
Definition:
EClass.cs:8
EClass.core
static Core core
Definition:
EClass.cs:6
EClass.player
static Player player
Definition:
EClass.cs:12
GamePrincipal.ItemSlider
Definition:
GamePrincipal.cs:92
GamePrincipal.ItemSlider.funcText
Func< int, string > funcText
Definition:
GamePrincipal.cs:99
GamePrincipal.ItemSlider.SetInt
void SetInt(int value)
Definition:
GamePrincipal.cs:106
GamePrincipal.ItemSlider._getInt
Func< int > _getInt
Definition:
GamePrincipal.cs:95
GamePrincipal.ItemSlider.GetInt
int GetInt()
Definition:
GamePrincipal.cs:101
GamePrincipal.ItemSlider._setInt
Action< int > _setInt
Definition:
GamePrincipal.cs:97
GamePrincipal.ItemSlider.max
int max
Definition:
GamePrincipal.cs:93
GamePrincipal.Item
Definition:
GamePrincipal.cs:17
GamePrincipal.Item.IsSealed
bool IsSealed()
Definition:
GamePrincipal.cs:70
GamePrincipal.Item.Set
void Set(bool value)
Definition:
GamePrincipal.cs:45
GamePrincipal.Item.type
Type type
Definition:
GamePrincipal.cs:20
GamePrincipal.Item._set
Action< bool > _set
Definition:
GamePrincipal.cs:24
GamePrincipal.Item.Get
bool Get()
Definition:
GamePrincipal.cs:40
GamePrincipal.Item.WasSealed
bool WasSealed()
Definition:
GamePrincipal.cs:55
GamePrincipal.Item.grade
int grade
Definition:
GamePrincipal.cs:26
GamePrincipal.Item.id
string id
Definition:
GamePrincipal.cs:18
GamePrincipal.Item.IsModified
bool IsModified()
Definition:
GamePrincipal.cs:50
GamePrincipal.Item.IsEmbark
bool IsEmbark
Definition:
GamePrincipal.cs:29
GamePrincipal.Item._get
Func< bool > _get
Definition:
GamePrincipal.cs:22
GamePrincipal
Definition:
GamePrincipal.cs:7
GamePrincipal.enableDamageReduction
bool enableDamageReduction
Definition:
GamePrincipal.cs:167
GamePrincipal.opMilk
bool opMilk
Definition:
GamePrincipal.cs:134
GamePrincipal.id
int id
Definition:
GamePrincipal.cs:113
GamePrincipal.socre
int socre
Definition:
GamePrincipal.cs:116
GamePrincipal.petFeatExpMtp
int petFeatExpMtp
Definition:
GamePrincipal.cs:122
GamePrincipal.infiniteMarketFund
bool infiniteMarketFund
Definition:
GamePrincipal.cs:143
GamePrincipal.dropRate
bool dropRate
Definition:
GamePrincipal.cs:158
GamePrincipal.disableManualSave
bool disableManualSave
Definition:
GamePrincipal.cs:137
GamePrincipal.petFeatExp
bool petFeatExp
Definition:
GamePrincipal.cs:161
GamePrincipal.disableVoidBlessing
bool disableVoidBlessing
Definition:
GamePrincipal.cs:164
GamePrincipal.permadeath
bool permadeath
Definition:
GamePrincipal.cs:140
GamePrincipal.ignoreEvaluate
bool ignoreEvaluate
Definition:
GamePrincipal.cs:125
GamePrincipal.tax
bool tax
Definition:
GamePrincipal.cs:131
GamePrincipal.IsCustom
bool IsCustom
Definition:
GamePrincipal.cs:175
GamePrincipal.modified
HashSet< string > modified
Definition:
GamePrincipal.cs:173
GamePrincipal.enableGeneDupe
bool enableGeneDupe
Definition:
GamePrincipal.cs:170
GamePrincipal.disableUsermapBenefit
bool disableUsermapBenefit
Definition:
GamePrincipal.cs:146
GamePrincipal.Type
Type
Definition:
GamePrincipal.cs:9
GamePrincipal.Type.Oath
@ Oath
GamePrincipal.Type.Legacy
@ Legacy
GamePrincipal.Type.Flavor
@ Flavor
GamePrincipal.Type.Workaround
@ Workaround
GamePrincipal.scaleQuest
bool scaleQuest
Definition:
GamePrincipal.cs:149
GamePrincipal.realAdv
bool realAdv
Definition:
GamePrincipal.cs:152
GamePrincipal.noAging
bool noAging
Definition:
GamePrincipal.cs:155
GamePrincipal.dropRateMtp
int dropRateMtp
Definition:
GamePrincipal.cs:119
GamePrincipal.ListItems
List< Item > ListItems()
Definition:
GamePrincipal.cs:177
GamePrincipal.disableDeathPenaltyProtection
bool disableDeathPenaltyProtection
Definition:
GamePrincipal.cs:128
Game.principal
GamePrincipal principal
Definition:
Game.cs:221
Player.resetPrincipal
bool resetPrincipal
Definition:
Player.cs:1174
Elin
GamePrincipal.cs
Generated by
1.9.6