Elin Modding Docs Doc
Loading...
Searching...
No Matches
Card.cs
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Runtime.CompilerServices;
5using System.Runtime.Serialization;
6using System.Text;
7using Newtonsoft.Json;
8using UnityEngine;
9using UnityEngine.UI;
10
11// Token: 0x02000289 RID: 649
13{
14 // Token: 0x06001164 RID: 4452 RVA: 0x00077FFC File Offset: 0x000761FC
15 public override string ToString()
16 {
17 string[] array = new string[5];
18 array[0] = this.Name;
19 array[1] = "/";
20 int num = 2;
21 Point point = this.pos;
22 array[num] = ((point != null) ? point.ToString() : null);
23 array[3] = "/";
24 int num2 = 4;
25 ICardParent cardParent = this.parent;
26 array[num2] = ((cardParent != null) ? cardParent.ToString() : null);
27 return string.Concat(array);
28 }
29
30 // Token: 0x06001165 RID: 4453 RVA: 0x00078057 File Offset: 0x00076257
31 public bool CanReserve(AIAct act)
32 {
33 return this.reservedAct == null || this.reservedAct == act || !this.reservedAct.IsRunning;
34 }
35
36 // Token: 0x06001166 RID: 4454 RVA: 0x0007807A File Offset: 0x0007627A
37 public bool TryReserve(AIAct act)
38 {
39 if (this.CanReserve(act))
40 {
41 this.reservedAct = act;
42 return true;
43 }
44 return false;
45 }
46
47 // Token: 0x1700049E RID: 1182
48 // (get) Token: 0x06001167 RID: 4455 RVA: 0x0007808F File Offset: 0x0007628F
49 public Card parentCard
50 {
51 get
52 {
53 return this.parent as Card;
54 }
55 }
56
57 // Token: 0x1700049F RID: 1183
58 // (get) Token: 0x06001168 RID: 4456 RVA: 0x0007809C File Offset: 0x0007629C
59 public Thing parentThing
60 {
61 get
62 {
63 return this.parent as Thing;
64 }
65 }
66
67 // Token: 0x170004A0 RID: 1184
68 // (get) Token: 0x06001169 RID: 4457 RVA: 0x000780A9 File Offset: 0x000762A9
69 public int colorInt
70 {
71 get
72 {
73 if (this._colorInt == 0)
74 {
75 this.RefreshColor();
76 }
77 return this._colorInt;
78 }
79 }
80
81 // Token: 0x170004A1 RID: 1185
82 // (get) Token: 0x0600116A RID: 4458 RVA: 0x000780BF File Offset: 0x000762BF
83 public bool IsHotItem
84 {
85 get
86 {
87 return this.invY == 1;
88 }
89 }
90
91 // Token: 0x170004A2 RID: 1186
92 // (get) Token: 0x0600116B RID: 4459 RVA: 0x000780CA File Offset: 0x000762CA
93 // (set) Token: 0x0600116C RID: 4460 RVA: 0x000780D4 File Offset: 0x000762D4
94 public int uid
95 {
96 get
97 {
98 return this._ints[1];
99 }
100 set
101 {
102 this._ints[1] = value;
103 }
104 }
105
106 // Token: 0x170004A3 RID: 1187
107 // (get) Token: 0x0600116D RID: 4461 RVA: 0x000780DF File Offset: 0x000762DF
108 // (set) Token: 0x0600116E RID: 4462 RVA: 0x000780E9 File Offset: 0x000762E9
109 public int idMaterial
110 {
111 get
112 {
113 return this._ints[4];
114 }
115 set
116 {
117 this._ints[4] = value;
118 }
119 }
120
121 // Token: 0x170004A4 RID: 1188
122 // (get) Token: 0x0600116F RID: 4463 RVA: 0x000780F4 File Offset: 0x000762F4
123 // (set) Token: 0x06001170 RID: 4464 RVA: 0x000780FE File Offset: 0x000762FE
124 public int dir
125 {
126 get
127 {
128 return this._ints[5];
129 }
130 set
131 {
132 this._ints[5] = value;
133 }
134 }
135
136 // Token: 0x170004A5 RID: 1189
137 // (get) Token: 0x06001171 RID: 4465 RVA: 0x00078109 File Offset: 0x00076309
138 // (set) Token: 0x06001172 RID: 4466 RVA: 0x00078113 File Offset: 0x00076313
139 public int Num
140 {
141 get
142 {
143 return this._ints[6];
144 }
145 set
146 {
147 this._ints[6] = value;
148 }
149 }
150
151 // Token: 0x170004A6 RID: 1190
152 // (get) Token: 0x06001173 RID: 4467 RVA: 0x0007811E File Offset: 0x0007631E
153 // (set) Token: 0x06001174 RID: 4468 RVA: 0x00078128 File Offset: 0x00076328
154 public int _x
155 {
156 get
157 {
158 return this._ints[7];
159 }
160 set
161 {
162 this._ints[7] = value;
163 }
164 }
165
166 // Token: 0x170004A7 RID: 1191
167 // (get) Token: 0x06001175 RID: 4469 RVA: 0x00078133 File Offset: 0x00076333
168 // (set) Token: 0x06001176 RID: 4470 RVA: 0x0007813E File Offset: 0x0007633E
169 public int _z
170 {
171 get
172 {
173 return this._ints[9];
174 }
175 set
176 {
177 this._ints[9] = value;
178 }
179 }
180
181 // Token: 0x170004A8 RID: 1192
182 // (get) Token: 0x06001177 RID: 4471 RVA: 0x0007814A File Offset: 0x0007634A
183 // (set) Token: 0x06001178 RID: 4472 RVA: 0x00078155 File Offset: 0x00076355
184 public int refVal
185 {
186 get
187 {
188 return this._ints[11];
189 }
190 set
191 {
192 this._ints[11] = value;
193 }
194 }
195
196 // Token: 0x170004A9 RID: 1193
197 // (get) Token: 0x06001179 RID: 4473 RVA: 0x00078161 File Offset: 0x00076361
198 // (set) Token: 0x0600117A RID: 4474 RVA: 0x0007816C File Offset: 0x0007636C
199 public int decay
200 {
201 get
202 {
203 return this._ints[12];
204 }
205 set
206 {
207 this._ints[12] = value;
208 }
209 }
210
211 // Token: 0x170004AA RID: 1194
212 // (get) Token: 0x0600117B RID: 4475 RVA: 0x00078178 File Offset: 0x00076378
213 // (set) Token: 0x0600117C RID: 4476 RVA: 0x00078183 File Offset: 0x00076383
214 public int altitude
215 {
216 get
217 {
218 return this._ints[13];
219 }
220 set
221 {
222 this._ints[13] = value;
223 }
224 }
225
226 // Token: 0x170004AB RID: 1195
227 // (get) Token: 0x0600117D RID: 4477 RVA: 0x0007818F File Offset: 0x0007638F
228 // (set) Token: 0x0600117E RID: 4478 RVA: 0x0007819A File Offset: 0x0007639A
229 public int hp
230 {
231 get
232 {
233 return this._ints[14];
234 }
235 set
236 {
237 this._ints[14] = value;
238 }
239 }
240
241 // Token: 0x170004AC RID: 1196
242 // (get) Token: 0x0600117F RID: 4479 RVA: 0x000781A6 File Offset: 0x000763A6
243 // (set) Token: 0x06001180 RID: 4480 RVA: 0x000781B8 File Offset: 0x000763B8
244 public float fx
245 {
246 get
247 {
248 return 0.001f * (float)this._ints[15];
249 }
250 set
251 {
252 this._ints[15] = (int)(value * 1000f);
253 }
254 }
255
256 // Token: 0x170004AD RID: 1197
257 // (get) Token: 0x06001181 RID: 4481 RVA: 0x000781CB File Offset: 0x000763CB
258 // (set) Token: 0x06001182 RID: 4482 RVA: 0x000781DD File Offset: 0x000763DD
259 public float fy
260 {
261 get
262 {
263 return 0.001f * (float)this._ints[16];
264 }
265 set
266 {
267 this._ints[16] = (int)(value * 1000f);
268 }
269 }
270
271 // Token: 0x170004AE RID: 1198
272 // (get) Token: 0x06001183 RID: 4483 RVA: 0x000781F0 File Offset: 0x000763F0
273 // (set) Token: 0x06001184 RID: 4484 RVA: 0x00078200 File Offset: 0x00076400
274 public BlessedState blessedState
275 {
276 get
277 {
278 return this._ints[17].ToEnum<BlessedState>();
279 }
280 set
281 {
282 this._ints[17] = (int)value;
283 }
284 }
285
286 // Token: 0x170004AF RID: 1199
287 // (get) Token: 0x06001185 RID: 4485 RVA: 0x0007820C File Offset: 0x0007640C
288 // (set) Token: 0x06001186 RID: 4486 RVA: 0x0007821C File Offset: 0x0007641C
289 public PlaceState _placeState
290 {
291 get
292 {
293 return this._ints[18].ToEnum<PlaceState>();
294 }
295 set
296 {
297 this._ints[18] = (int)value;
298 }
299 }
300
301 // Token: 0x170004B0 RID: 1200
302 // (get) Token: 0x06001187 RID: 4487 RVA: 0x00078228 File Offset: 0x00076428
303 // (set) Token: 0x06001188 RID: 4488 RVA: 0x00078233 File Offset: 0x00076433
304 public int rarityLv
305 {
306 get
307 {
308 return this._ints[19];
309 }
310 set
311 {
312 this._ints[19] = value;
313 }
314 }
315
316 // Token: 0x170004B1 RID: 1201
317 // (get) Token: 0x06001189 RID: 4489 RVA: 0x0007823F File Offset: 0x0007643F
318 // (set) Token: 0x0600118A RID: 4490 RVA: 0x00078252 File Offset: 0x00076452
319 public Rarity rarity
320 {
321 get
322 {
323 return (this._ints[19] / 100).ToEnum<Rarity>();
324 }
325 set
326 {
327 this._ints[19] = (int)(value * (Rarity)100);
328 }
329 }
330
331 // Token: 0x170004B2 RID: 1202
332 // (get) Token: 0x0600118B RID: 4491 RVA: 0x00078261 File Offset: 0x00076461
333 // (set) Token: 0x0600118C RID: 4492 RVA: 0x0007826C File Offset: 0x0007646C
334 public int encLV
335 {
336 get
337 {
338 return this._ints[20];
339 }
340 set
341 {
342 this._ints[20] = value;
343 }
344 }
345
346 // Token: 0x170004B3 RID: 1203
347 // (get) Token: 0x0600118D RID: 4493 RVA: 0x00078278 File Offset: 0x00076478
348 // (set) Token: 0x0600118E RID: 4494 RVA: 0x00078283 File Offset: 0x00076483
349 public int posInvX
350 {
351 get
352 {
353 return this._ints[21];
354 }
355 set
356 {
357 this._ints[21] = value;
358 }
359 }
360
361 // Token: 0x170004B4 RID: 1204
362 // (get) Token: 0x0600118F RID: 4495 RVA: 0x0007828F File Offset: 0x0007648F
363 // (set) Token: 0x06001190 RID: 4496 RVA: 0x0007829A File Offset: 0x0007649A
364 public int posInvY
365 {
366 get
367 {
368 return this._ints[22];
369 }
370 set
371 {
372 this._ints[22] = value;
373 }
374 }
375
376 // Token: 0x170004B5 RID: 1205
377 // (get) Token: 0x06001191 RID: 4497 RVA: 0x000782A6 File Offset: 0x000764A6
378 // (set) Token: 0x06001192 RID: 4498 RVA: 0x000782B1 File Offset: 0x000764B1
379 public int idSkin
380 {
381 get
382 {
383 return this._ints[23];
384 }
385 set
386 {
387 this._ints[23] = value;
388 }
389 }
390
391 // Token: 0x170004B6 RID: 1206
392 // (get) Token: 0x06001193 RID: 4499 RVA: 0x000782BD File Offset: 0x000764BD
393 // (set) Token: 0x06001194 RID: 4500 RVA: 0x000782C8 File Offset: 0x000764C8
394 public int feat
395 {
396 get
397 {
398 return this._ints[24];
399 }
400 set
401 {
402 this._ints[24] = value;
403 }
404 }
405
406 // Token: 0x170004B7 RID: 1207
407 // (get) Token: 0x06001195 RID: 4501 RVA: 0x000782D4 File Offset: 0x000764D4
408 // (set) Token: 0x06001196 RID: 4502 RVA: 0x000782DF File Offset: 0x000764DF
409 public int LV
410 {
411 get
412 {
413 return this._ints[25];
414 }
415 set
416 {
417 this._ints[25] = value;
418 }
419 }
420
421 // Token: 0x170004B8 RID: 1208
422 // (get) Token: 0x06001197 RID: 4503 RVA: 0x000782EB File Offset: 0x000764EB
423 // (set) Token: 0x06001198 RID: 4504 RVA: 0x000782F6 File Offset: 0x000764F6
424 public int exp
425 {
426 get
427 {
428 return this._ints[26];
429 }
430 set
431 {
432 this._ints[26] = value;
433 }
434 }
435
436 // Token: 0x170004B9 RID: 1209
437 // (get) Token: 0x06001199 RID: 4505 RVA: 0x00078302 File Offset: 0x00076502
438 // (set) Token: 0x0600119A RID: 4506 RVA: 0x0007830D File Offset: 0x0007650D
439 public int qualityTier
440 {
441 get
442 {
443 return this._ints[27];
444 }
445 set
446 {
447 this._ints[27] = value;
448 }
449 }
450
451 // Token: 0x170004BA RID: 1210
452 // (get) Token: 0x0600119B RID: 4507 RVA: 0x00078319 File Offset: 0x00076519
453 // (set) Token: 0x0600119C RID: 4508 RVA: 0x00078327 File Offset: 0x00076527
454 public bool isCensored
455 {
456 get
457 {
458 return this._bits1[1];
459 }
460 set
461 {
462 this._bits1[1] = value;
463 }
464 }
465
466 // Token: 0x170004BB RID: 1211
467 // (get) Token: 0x0600119D RID: 4509 RVA: 0x00078336 File Offset: 0x00076536
468 // (set) Token: 0x0600119E RID: 4510 RVA: 0x00078344 File Offset: 0x00076544
469 public bool isDeconstructing
470 {
471 get
472 {
473 return this._bits1[2];
474 }
475 set
476 {
477 this._bits1[2] = value;
478 }
479 }
480
481 // Token: 0x170004BC RID: 1212
482 // (get) Token: 0x0600119F RID: 4511 RVA: 0x00078353 File Offset: 0x00076553
483 // (set) Token: 0x060011A0 RID: 4512 RVA: 0x00078361 File Offset: 0x00076561
484 public bool isDyed
485 {
486 get
487 {
488 return this._bits1[3];
489 }
490 set
491 {
492 this._bits1[3] = value;
493 }
494 }
495
496 // Token: 0x170004BD RID: 1213
497 // (get) Token: 0x060011A1 RID: 4513 RVA: 0x00078370 File Offset: 0x00076570
498 // (set) Token: 0x060011A2 RID: 4514 RVA: 0x0007837E File Offset: 0x0007657E
499 public bool isModified
500 {
501 get
502 {
503 return this._bits1[4];
504 }
505 set
506 {
507 this._bits1[4] = value;
508 }
509 }
510
511 // Token: 0x170004BE RID: 1214
512 // (get) Token: 0x060011A3 RID: 4515 RVA: 0x0007838D File Offset: 0x0007658D
513 // (set) Token: 0x060011A4 RID: 4516 RVA: 0x0007839B File Offset: 0x0007659B
514 public bool isNew
515 {
516 get
517 {
518 return this._bits1[5];
519 }
520 set
521 {
522 this._bits1[5] = value;
523 }
524 }
525
526 // Token: 0x170004BF RID: 1215
527 // (get) Token: 0x060011A5 RID: 4517 RVA: 0x000783AA File Offset: 0x000765AA
528 // (set) Token: 0x060011A6 RID: 4518 RVA: 0x000783B8 File Offset: 0x000765B8
529 public bool isPlayerCreation
530 {
531 get
532 {
533 return this._bits1[6];
534 }
535 set
536 {
537 this._bits1[6] = value;
538 }
539 }
540
541 // Token: 0x170004C0 RID: 1216
542 // (get) Token: 0x060011A7 RID: 4519 RVA: 0x000783C7 File Offset: 0x000765C7
543 // (set) Token: 0x060011A8 RID: 4520 RVA: 0x000783D5 File Offset: 0x000765D5
544 public bool ignoreAutoPick
545 {
546 get
547 {
548 return this._bits1[7];
549 }
550 set
551 {
552 this._bits1[7] = value;
553 }
554 }
555
556 // Token: 0x170004C1 RID: 1217
557 // (get) Token: 0x060011A9 RID: 4521 RVA: 0x000783E4 File Offset: 0x000765E4
558 // (set) Token: 0x060011AA RID: 4522 RVA: 0x000783F2 File Offset: 0x000765F2
559 public bool freePos
560 {
561 get
562 {
563 return this._bits1[8];
564 }
565 set
566 {
567 this._bits1[8] = value;
568 }
569 }
570
571 // Token: 0x170004C2 RID: 1218
572 // (get) Token: 0x060011AB RID: 4523 RVA: 0x00078401 File Offset: 0x00076601
573 // (set) Token: 0x060011AC RID: 4524 RVA: 0x00078410 File Offset: 0x00076610
574 public bool isHidden
575 {
576 get
577 {
578 return this._bits1[9];
579 }
580 set
581 {
582 this._bits1[9] = value;
583 }
584 }
585
586 // Token: 0x170004C3 RID: 1219
587 // (get) Token: 0x060011AD RID: 4525 RVA: 0x00078420 File Offset: 0x00076620
588 // (set) Token: 0x060011AE RID: 4526 RVA: 0x0007842F File Offset: 0x0007662F
589 public bool isOn
590 {
591 get
592 {
593 return this._bits1[10];
594 }
595 set
596 {
597 this._bits1[10] = value;
598 }
599 }
600
601 // Token: 0x170004C4 RID: 1220
602 // (get) Token: 0x060011AF RID: 4527 RVA: 0x0007843F File Offset: 0x0007663F
603 // (set) Token: 0x060011B0 RID: 4528 RVA: 0x0007844E File Offset: 0x0007664E
604 public bool isNPCProperty
605 {
606 get
607 {
608 return this._bits1[11];
609 }
610 set
611 {
612 this._bits1[11] = value;
613 }
614 }
615
616 // Token: 0x170004C5 RID: 1221
617 // (get) Token: 0x060011B1 RID: 4529 RVA: 0x0007845E File Offset: 0x0007665E
618 // (set) Token: 0x060011B2 RID: 4530 RVA: 0x0007846D File Offset: 0x0007666D
619 public bool isRestrained
620 {
621 get
622 {
623 return this._bits1[12];
624 }
625 set
626 {
627 this._bits1[12] = value;
628 }
629 }
630
631 // Token: 0x170004C6 RID: 1222
632 // (get) Token: 0x060011B3 RID: 4531 RVA: 0x0007847D File Offset: 0x0007667D
633 // (set) Token: 0x060011B4 RID: 4532 RVA: 0x0007848C File Offset: 0x0007668C
634 public bool isRoofItem
635 {
636 get
637 {
638 return this._bits1[13];
639 }
640 set
641 {
642 this._bits1[13] = value;
643 }
644 }
645
646 // Token: 0x170004C7 RID: 1223
647 // (get) Token: 0x060011B5 RID: 4533 RVA: 0x0007849C File Offset: 0x0007669C
648 // (set) Token: 0x060011B6 RID: 4534 RVA: 0x000784AB File Offset: 0x000766AB
649 public bool isMasked
650 {
651 get
652 {
653 return this._bits1[14];
654 }
655 set
656 {
657 this._bits1[14] = value;
658 }
659 }
660
661 // Token: 0x170004C8 RID: 1224
662 // (get) Token: 0x060011B7 RID: 4535 RVA: 0x000784BB File Offset: 0x000766BB
663 // (set) Token: 0x060011B8 RID: 4536 RVA: 0x000784CA File Offset: 0x000766CA
664 public bool disableAutoToggle
665 {
666 get
667 {
668 return this._bits1[15];
669 }
670 set
671 {
672 this._bits1[15] = value;
673 }
674 }
675
676 // Token: 0x170004C9 RID: 1225
677 // (get) Token: 0x060011B9 RID: 4537 RVA: 0x000784DA File Offset: 0x000766DA
678 // (set) Token: 0x060011BA RID: 4538 RVA: 0x000784E9 File Offset: 0x000766E9
679 public bool isImported
680 {
681 get
682 {
683 return this._bits1[16];
684 }
685 set
686 {
687 this._bits1[16] = value;
688 }
689 }
690
691 // Token: 0x170004CA RID: 1226
692 // (get) Token: 0x060011BB RID: 4539 RVA: 0x000784F9 File Offset: 0x000766F9
693 // (set) Token: 0x060011BC RID: 4540 RVA: 0x00078508 File Offset: 0x00076708
694 public bool autoRefuel
695 {
696 get
697 {
698 return this._bits1[17];
699 }
700 set
701 {
702 this._bits1[17] = value;
703 }
704 }
705
706 // Token: 0x170004CB RID: 1227
707 // (get) Token: 0x060011BD RID: 4541 RVA: 0x00078518 File Offset: 0x00076718
708 // (set) Token: 0x060011BE RID: 4542 RVA: 0x00078527 File Offset: 0x00076727
709 public bool ignoreStackHeight
710 {
711 get
712 {
713 return this._bits1[18];
714 }
715 set
716 {
717 this._bits1[18] = value;
718 }
719 }
720
721 // Token: 0x170004CC RID: 1228
722 // (get) Token: 0x060011BF RID: 4543 RVA: 0x00078537 File Offset: 0x00076737
723 // (set) Token: 0x060011C0 RID: 4544 RVA: 0x00078546 File Offset: 0x00076746
724 public bool isFloating
725 {
726 get
727 {
728 return this._bits1[19];
729 }
730 set
731 {
732 this._bits1[19] = value;
733 }
734 }
735
736 // Token: 0x170004CD RID: 1229
737 // (get) Token: 0x060011C1 RID: 4545 RVA: 0x00078556 File Offset: 0x00076756
738 // (set) Token: 0x060011C2 RID: 4546 RVA: 0x00078565 File Offset: 0x00076765
739 public bool isWeightChanged
740 {
741 get
742 {
743 return this._bits1[20];
744 }
745 set
746 {
747 this._bits1[20] = value;
748 }
749 }
750
751 // Token: 0x170004CE RID: 1230
752 // (get) Token: 0x060011C3 RID: 4547 RVA: 0x00078575 File Offset: 0x00076775
753 // (set) Token: 0x060011C4 RID: 4548 RVA: 0x00078584 File Offset: 0x00076784
754 public bool isFireproof
755 {
756 get
757 {
758 return this._bits1[21];
759 }
760 set
761 {
762 this._bits1[21] = value;
763 }
764 }
765
766 // Token: 0x170004CF RID: 1231
767 // (get) Token: 0x060011C5 RID: 4549 RVA: 0x00078594 File Offset: 0x00076794
768 // (set) Token: 0x060011C6 RID: 4550 RVA: 0x000785A3 File Offset: 0x000767A3
769 public bool isAcidproof
770 {
771 get
772 {
773 return this._bits1[22];
774 }
775 set
776 {
777 this._bits1[22] = value;
778 }
779 }
780
781 // Token: 0x170004D0 RID: 1232
782 // (get) Token: 0x060011C7 RID: 4551 RVA: 0x000785B3 File Offset: 0x000767B3
783 // (set) Token: 0x060011C8 RID: 4552 RVA: 0x000785C2 File Offset: 0x000767C2
784 public bool isReplica
785 {
786 get
787 {
788 return this._bits1[23];
789 }
790 set
791 {
792 this._bits1[23] = value;
793 }
794 }
795
796 // Token: 0x170004D1 RID: 1233
797 // (get) Token: 0x060011C9 RID: 4553 RVA: 0x000785D2 File Offset: 0x000767D2
798 // (set) Token: 0x060011CA RID: 4554 RVA: 0x000785E1 File Offset: 0x000767E1
799 public bool isSummon
800 {
801 get
802 {
803 return this._bits1[24];
804 }
805 set
806 {
807 this._bits1[24] = value;
808 }
809 }
810
811 // Token: 0x170004D2 RID: 1234
812 // (get) Token: 0x060011CB RID: 4555 RVA: 0x000785F1 File Offset: 0x000767F1
813 // (set) Token: 0x060011CC RID: 4556 RVA: 0x00078600 File Offset: 0x00076800
814 public bool isElemental
815 {
816 get
817 {
818 return this._bits1[25];
819 }
820 set
821 {
822 this._bits1[25] = value;
823 }
824 }
825
826 // Token: 0x170004D3 RID: 1235
827 // (get) Token: 0x060011CD RID: 4557 RVA: 0x00078610 File Offset: 0x00076810
828 // (set) Token: 0x060011CE RID: 4558 RVA: 0x0007861F File Offset: 0x0007681F
829 public bool isBroken
830 {
831 get
832 {
833 return this._bits1[26];
834 }
835 set
836 {
837 this._bits1[26] = value;
838 }
839 }
840
841 // Token: 0x170004D4 RID: 1236
842 // (get) Token: 0x060011CF RID: 4559 RVA: 0x0007862F File Offset: 0x0007682F
843 // (set) Token: 0x060011D0 RID: 4560 RVA: 0x0007863E File Offset: 0x0007683E
844 public bool isSubsetCard
845 {
846 get
847 {
848 return this._bits1[27];
849 }
850 set
851 {
852 this._bits1[27] = value;
853 }
854 }
855
856 // Token: 0x170004D5 RID: 1237
857 // (get) Token: 0x060011D1 RID: 4561 RVA: 0x0007864E File Offset: 0x0007684E
858 // (set) Token: 0x060011D2 RID: 4562 RVA: 0x0007865D File Offset: 0x0007685D
859 public bool noSnow
860 {
861 get
862 {
863 return this._bits1[28];
864 }
865 set
866 {
867 this._bits1[28] = value;
868 }
869 }
870
871 // Token: 0x170004D6 RID: 1238
872 // (get) Token: 0x060011D3 RID: 4563 RVA: 0x0007866D File Offset: 0x0007686D
873 // (set) Token: 0x060011D4 RID: 4564 RVA: 0x0007867C File Offset: 0x0007687C
874 public bool noMove
875 {
876 get
877 {
878 return this._bits1[29];
879 }
880 set
881 {
882 this._bits1[29] = value;
883 }
884 }
885
886 // Token: 0x170004D7 RID: 1239
887 // (get) Token: 0x060011D5 RID: 4565 RVA: 0x0007868C File Offset: 0x0007688C
888 // (set) Token: 0x060011D6 RID: 4566 RVA: 0x0007869B File Offset: 0x0007689B
889 public bool isGifted
890 {
891 get
892 {
893 return this._bits1[30];
894 }
895 set
896 {
897 this._bits1[30] = value;
898 }
899 }
900
901 // Token: 0x170004D8 RID: 1240
902 // (get) Token: 0x060011D7 RID: 4567 RVA: 0x000786AB File Offset: 0x000768AB
903 // (set) Token: 0x060011D8 RID: 4568 RVA: 0x000786BA File Offset: 0x000768BA
904 public bool isCrafted
905 {
906 get
907 {
908 return this._bits1[31];
909 }
910 set
911 {
912 this._bits1[31] = value;
913 }
914 }
915
916 // Token: 0x170004D9 RID: 1241
917 // (get) Token: 0x060011D9 RID: 4569 RVA: 0x000786CA File Offset: 0x000768CA
918 // (set) Token: 0x060011DA RID: 4570 RVA: 0x000786D8 File Offset: 0x000768D8
919 public bool isLostProperty
920 {
921 get
922 {
923 return this._bits2[0];
924 }
925 set
926 {
927 this._bits2[0] = value;
928 }
929 }
930
931 // Token: 0x170004DA RID: 1242
932 // (get) Token: 0x060011DB RID: 4571 RVA: 0x000786E7 File Offset: 0x000768E7
933 // (set) Token: 0x060011DC RID: 4572 RVA: 0x000786F5 File Offset: 0x000768F5
934 public bool noShadow
935 {
936 get
937 {
938 return this._bits2[1];
939 }
940 set
941 {
942 this._bits2[1] = value;
943 }
944 }
945
946 // Token: 0x170004DB RID: 1243
947 // (get) Token: 0x060011DD RID: 4573 RVA: 0x00078704 File Offset: 0x00076904
948 // (set) Token: 0x060011DE RID: 4574 RVA: 0x00078712 File Offset: 0x00076912
949 public bool noSell
950 {
951 get
952 {
953 return this._bits2[2];
954 }
955 set
956 {
957 this._bits2[2] = value;
958 }
959 }
960
961 // Token: 0x170004DC RID: 1244
962 // (get) Token: 0x060011DF RID: 4575 RVA: 0x00078721 File Offset: 0x00076921
963 // (set) Token: 0x060011E0 RID: 4576 RVA: 0x0007872F File Offset: 0x0007692F
964 public bool isLeashed
965 {
966 get
967 {
968 return this._bits2[3];
969 }
970 set
971 {
972 this._bits2[3] = value;
973 }
974 }
975
976 // Token: 0x170004DD RID: 1245
977 // (get) Token: 0x060011E1 RID: 4577 RVA: 0x0007873E File Offset: 0x0007693E
978 // (set) Token: 0x060011E2 RID: 4578 RVA: 0x0007874C File Offset: 0x0007694C
979 public bool isStolen
980 {
981 get
982 {
983 return this._bits2[4];
984 }
985 set
986 {
987 this._bits2[4] = value;
988 }
989 }
990
991 // Token: 0x170004DE RID: 1246
992 // (get) Token: 0x060011E3 RID: 4579 RVA: 0x0007875B File Offset: 0x0007695B
993 // (set) Token: 0x060011E4 RID: 4580 RVA: 0x00078769 File Offset: 0x00076969
994 public bool isSale
995 {
996 get
997 {
998 return this._bits2[5];
999 }
1000 set
1001 {
1002 this._bits2[5] = value;
1003 }
1004 }
1005
1006 // Token: 0x170004DF RID: 1247
1007 // (get) Token: 0x060011E5 RID: 4581 RVA: 0x00078778 File Offset: 0x00076978
1008 // (set) Token: 0x060011E6 RID: 4582 RVA: 0x00078786 File Offset: 0x00076986
1009 public bool isCopy
1010 {
1011 get
1012 {
1013 return this._bits2[6];
1014 }
1015 set
1016 {
1017 this._bits2[6] = value;
1018 }
1019 }
1020
1021 // Token: 0x170004E0 RID: 1248
1022 // (get) Token: 0x060011E7 RID: 4583 RVA: 0x00078795 File Offset: 0x00076995
1023 // (set) Token: 0x060011E8 RID: 4584 RVA: 0x000787A3 File Offset: 0x000769A3
1024 public bool isRestocking
1025 {
1026 get
1027 {
1028 return this._bits2[7];
1029 }
1030 set
1031 {
1032 this._bits2[7] = value;
1033 }
1034 }
1035
1036 // Token: 0x170004E1 RID: 1249
1037 // (get) Token: 0x060011E9 RID: 4585 RVA: 0x000787B2 File Offset: 0x000769B2
1038 public bool isBackerContent
1039 {
1040 get
1041 {
1042 return this.c_idBacker != 0;
1043 }
1044 }
1045
1046 // Token: 0x170004E2 RID: 1250
1047 // (get) Token: 0x060011EA RID: 4586 RVA: 0x000787BD File Offset: 0x000769BD
1048 public SourceBacker.Row sourceBacker
1049 {
1050 get
1051 {
1052 if (!this.isBackerContent)
1053 {
1054 return null;
1055 }
1056 return EClass.sources.backers.map.TryGetValue(this.c_idBacker, null);
1057 }
1058 }
1059
1060 // Token: 0x060011EB RID: 4587 RVA: 0x000787E4 File Offset: 0x000769E4
1061 public void Mod()
1062 {
1063 this.isModified = true;
1064 }
1065
1066 // Token: 0x170004E3 RID: 1251
1067 // (get) Token: 0x060011EC RID: 4588 RVA: 0x000787F0 File Offset: 0x000769F0
1068 // (set) Token: 0x060011ED RID: 4589 RVA: 0x00078813 File Offset: 0x00076A13
1069 public BedType c_bedType
1070 {
1071 get
1072 {
1073 return base.GetInt(9, null).ToEnum<BedType>();
1074 }
1075 set
1076 {
1077 base.SetInt(9, (int)value);
1078 }
1079 }
1080
1081 // Token: 0x170004E4 RID: 1252
1082 // (get) Token: 0x060011EE RID: 4590 RVA: 0x00078820 File Offset: 0x00076A20
1083 // (set) Token: 0x060011EF RID: 4591 RVA: 0x0007883D File Offset: 0x00076A3D
1084 public int c_equippedSlot
1085 {
1086 get
1087 {
1088 return base.GetInt(6, null);
1089 }
1090 set
1091 {
1092 base.SetInt(6, value);
1093 }
1094 }
1095
1096 // Token: 0x170004E5 RID: 1253
1097 // (get) Token: 0x060011F0 RID: 4592 RVA: 0x00078848 File Offset: 0x00076A48
1098 // (set) Token: 0x060011F1 RID: 4593 RVA: 0x00078866 File Offset: 0x00076A66
1099 public int c_lockLv
1100 {
1101 get
1102 {
1103 return base.GetInt(50, null);
1104 }
1105 set
1106 {
1107 base.SetInt(50, value);
1108 }
1109 }
1110
1111 // Token: 0x170004E6 RID: 1254
1112 // (get) Token: 0x060011F2 RID: 4594 RVA: 0x00078874 File Offset: 0x00076A74
1113 // (set) Token: 0x060011F3 RID: 4595 RVA: 0x00078897 File Offset: 0x00076A97
1114 public Hostility c_originalHostility
1115 {
1116 get
1117 {
1118 return base.GetInt(12, null).ToEnum<Hostility>();
1119 }
1120 set
1121 {
1122 base.SetInt(12, (int)value);
1123 }
1124 }
1125
1126 // Token: 0x170004E7 RID: 1255
1127 // (get) Token: 0x060011F4 RID: 4596 RVA: 0x000788A4 File Offset: 0x00076AA4
1128 // (set) Token: 0x060011F5 RID: 4597 RVA: 0x000788C7 File Offset: 0x00076AC7
1129 public MinionType c_minionType
1130 {
1131 get
1132 {
1133 return base.GetInt(61, null).ToEnum<MinionType>();
1134 }
1135 set
1136 {
1137 base.SetInt(61, (int)value);
1138 }
1139 }
1140
1141 // Token: 0x170004E8 RID: 1256
1142 // (get) Token: 0x060011F6 RID: 4598 RVA: 0x000788D4 File Offset: 0x00076AD4
1143 // (set) Token: 0x060011F7 RID: 4599 RVA: 0x000788F2 File Offset: 0x00076AF2
1144 public int c_vomit
1145 {
1146 get
1147 {
1148 return base.GetInt(13, null);
1149 }
1150 set
1151 {
1152 base.SetInt(13, value);
1153 }
1154 }
1155
1156 // Token: 0x170004E9 RID: 1257
1157 // (get) Token: 0x060011F8 RID: 4600 RVA: 0x00078900 File Offset: 0x00076B00
1158 // (set) Token: 0x060011F9 RID: 4601 RVA: 0x00078921 File Offset: 0x00076B21
1159 public bool c_isImportant
1160 {
1161 get
1162 {
1163 return base.GetInt(109, null) != 0;
1164 }
1165 set
1166 {
1167 base.SetInt(109, value ? 1 : 0);
1168 }
1169 }
1170
1171 // Token: 0x170004EA RID: 1258
1172 // (get) Token: 0x060011FA RID: 4602 RVA: 0x00078934 File Offset: 0x00076B34
1173 // (set) Token: 0x060011FB RID: 4603 RVA: 0x00078955 File Offset: 0x00076B55
1174 public bool c_lockedHard
1175 {
1176 get
1177 {
1178 return base.GetInt(63, null) != 0;
1179 }
1180 set
1181 {
1182 base.SetInt(63, value ? 1 : 0);
1183 }
1184 }
1185
1186 // Token: 0x170004EB RID: 1259
1187 // (get) Token: 0x060011FC RID: 4604 RVA: 0x00078968 File Offset: 0x00076B68
1188 // (set) Token: 0x060011FD RID: 4605 RVA: 0x00078989 File Offset: 0x00076B89
1189 public bool c_revealLock
1190 {
1191 get
1192 {
1193 return base.GetInt(64, null) != 0;
1194 }
1195 set
1196 {
1197 base.SetInt(64, value ? 1 : 0);
1198 }
1199 }
1200
1201 // Token: 0x170004EC RID: 1260
1202 // (get) Token: 0x060011FE RID: 4606 RVA: 0x0007899C File Offset: 0x00076B9C
1203 // (set) Token: 0x060011FF RID: 4607 RVA: 0x000789BD File Offset: 0x00076BBD
1204 public bool c_isTrained
1205 {
1206 get
1207 {
1208 return base.GetInt(120, null) != 0;
1209 }
1210 set
1211 {
1212 base.SetInt(120, value ? 1 : 0);
1213 }
1214 }
1215
1216 // Token: 0x170004ED RID: 1261
1217 // (get) Token: 0x06001200 RID: 4608 RVA: 0x000789D0 File Offset: 0x00076BD0
1218 // (set) Token: 0x06001201 RID: 4609 RVA: 0x000789F1 File Offset: 0x00076BF1
1219 public bool c_isPrayed
1220 {
1221 get
1222 {
1223 return base.GetInt(121, null) != 0;
1224 }
1225 set
1226 {
1227 base.SetInt(121, value ? 1 : 0);
1228 }
1229 }
1230
1231 // Token: 0x170004EE RID: 1262
1232 // (get) Token: 0x06001202 RID: 4610 RVA: 0x00078A04 File Offset: 0x00076C04
1233 // (set) Token: 0x06001203 RID: 4611 RVA: 0x00078A21 File Offset: 0x00076C21
1234 public int c_lightColor
1235 {
1236 get
1237 {
1238 return base.GetInt(5, null);
1239 }
1240 set
1241 {
1242 this.Mod();
1243 base.SetInt(5, value);
1244 }
1245 }
1246
1247 // Token: 0x170004EF RID: 1263
1248 // (get) Token: 0x06001204 RID: 4612 RVA: 0x00078A34 File Offset: 0x00076C34
1249 public Color LightColor
1250 {
1251 get
1252 {
1253 return new Color((float)(this.c_lightColor / 1024 * 8) / 256f, (float)(this.c_lightColor % 1024 / 32 * 8) / 256f, (float)(this.c_lightColor % 32 * 8) / 256f, 1f);
1254 }
1255 }
1256
1257 // Token: 0x170004F0 RID: 1264
1258 // (get) Token: 0x06001205 RID: 4613 RVA: 0x00078A8C File Offset: 0x00076C8C
1259 // (set) Token: 0x06001206 RID: 4614 RVA: 0x00078AAA File Offset: 0x00076CAA
1260 public int c_uidZone
1261 {
1262 get
1263 {
1264 return base.GetInt(10, null);
1265 }
1266 set
1267 {
1268 this.Mod();
1269 base.SetInt(10, value);
1270 }
1271 }
1272
1273 // Token: 0x170004F1 RID: 1265
1274 // (get) Token: 0x06001207 RID: 4615 RVA: 0x00078ABC File Offset: 0x00076CBC
1275 // (set) Token: 0x06001208 RID: 4616 RVA: 0x00078ADA File Offset: 0x00076CDA
1276 public int c_uidRefCard
1277 {
1278 get
1279 {
1280 return base.GetInt(11, null);
1281 }
1282 set
1283 {
1284 this.Mod();
1285 base.SetInt(11, value);
1286 }
1287 }
1288
1289 // Token: 0x170004F2 RID: 1266
1290 // (get) Token: 0x06001209 RID: 4617 RVA: 0x00078AEC File Offset: 0x00076CEC
1291 // (set) Token: 0x0600120A RID: 4618 RVA: 0x00078B0A File Offset: 0x00076D0A
1292 public int c_priceFix
1293 {
1294 get
1295 {
1296 return base.GetInt(21, null);
1297 }
1298 set
1299 {
1300 base.SetInt(21, value);
1301 }
1302 }
1303
1304 // Token: 0x170004F3 RID: 1267
1305 // (get) Token: 0x0600120B RID: 4619 RVA: 0x00078B18 File Offset: 0x00076D18
1306 // (set) Token: 0x0600120C RID: 4620 RVA: 0x00078B36 File Offset: 0x00076D36
1307 public int c_priceAdd
1308 {
1309 get
1310 {
1311 return base.GetInt(29, null);
1312 }
1313 set
1314 {
1315 base.SetInt(29, value);
1316 }
1317 }
1318
1319 // Token: 0x170004F4 RID: 1268
1320 // (get) Token: 0x0600120D RID: 4621 RVA: 0x00078B44 File Offset: 0x00076D44
1321 // (set) Token: 0x0600120E RID: 4622 RVA: 0x00078B61 File Offset: 0x00076D61
1322 public int c_dyeMat
1323 {
1324 get
1325 {
1326 return base.GetInt(3, null);
1327 }
1328 set
1329 {
1330 base.SetInt(3, value);
1331 }
1332 }
1333
1334 // Token: 0x170004F5 RID: 1269
1335 // (get) Token: 0x0600120F RID: 4623 RVA: 0x00078B6C File Offset: 0x00076D6C
1336 // (set) Token: 0x06001210 RID: 4624 RVA: 0x00078B8E File Offset: 0x00076D8E
1337 public VisitorState visitorState
1338 {
1339 get
1340 {
1341 return base.GetInt(4, null).ToEnum<VisitorState>();
1342 }
1343 set
1344 {
1345 base.SetInt(4, (int)value);
1346 }
1347 }
1348
1349 // Token: 0x170004F6 RID: 1270
1350 // (get) Token: 0x06001211 RID: 4625 RVA: 0x00078B98 File Offset: 0x00076D98
1351 // (set) Token: 0x06001212 RID: 4626 RVA: 0x00078BBB File Offset: 0x00076DBB
1352 public RescueState c_rescueState
1353 {
1354 get
1355 {
1356 return base.GetInt(53, null).ToEnum<RescueState>();
1357 }
1358 set
1359 {
1360 base.SetInt(53, (int)value);
1361 }
1362 }
1363
1364 // Token: 0x170004F7 RID: 1271
1365 // (get) Token: 0x06001213 RID: 4627 RVA: 0x00078BC8 File Offset: 0x00076DC8
1366 // (set) Token: 0x06001214 RID: 4628 RVA: 0x00078BEB File Offset: 0x00076DEB
1367 public BossType c_bossType
1368 {
1369 get
1370 {
1371 return base.GetInt(65, null).ToEnum<BossType>();
1372 }
1373 set
1374 {
1375 base.SetInt(65, (int)value);
1376 }
1377 }
1378
1379 // Token: 0x170004F8 RID: 1272
1380 // (get) Token: 0x06001215 RID: 4629 RVA: 0x00078BF8 File Offset: 0x00076DF8
1381 // (set) Token: 0x06001216 RID: 4630 RVA: 0x00078C16 File Offset: 0x00076E16
1382 public int c_dateStockExpire
1383 {
1384 get
1385 {
1386 return base.GetInt(22, null);
1387 }
1388 set
1389 {
1390 base.SetInt(22, value);
1391 }
1392 }
1393
1394 // Token: 0x170004F9 RID: 1273
1395 // (get) Token: 0x06001217 RID: 4631 RVA: 0x00078C24 File Offset: 0x00076E24
1396 // (set) Token: 0x06001218 RID: 4632 RVA: 0x00078C41 File Offset: 0x00076E41
1397 public int c_IDTState
1398 {
1399 get
1400 {
1401 return base.GetInt(2, null);
1402 }
1403 set
1404 {
1405 base.SetInt(2, value);
1406 }
1407 }
1408
1409 // Token: 0x170004FA RID: 1274
1410 // (get) Token: 0x06001219 RID: 4633 RVA: 0x00078C4C File Offset: 0x00076E4C
1411 // (set) Token: 0x0600121A RID: 4634 RVA: 0x00078C69 File Offset: 0x00076E69
1412 public int c_charges
1413 {
1414 get
1415 {
1416 return base.GetInt(7, null);
1417 }
1418 set
1419 {
1420 base.SetInt(7, value);
1421 }
1422 }
1423
1424 // Token: 0x170004FB RID: 1275
1425 // (get) Token: 0x0600121B RID: 4635 RVA: 0x00078C74 File Offset: 0x00076E74
1426 // (set) Token: 0x0600121C RID: 4636 RVA: 0x00078C92 File Offset: 0x00076E92
1427 public int c_bill
1428 {
1429 get
1430 {
1431 return base.GetInt(23, null);
1432 }
1433 set
1434 {
1435 base.SetInt(23, value);
1436 }
1437 }
1438
1439 // Token: 0x170004FC RID: 1276
1440 // (get) Token: 0x0600121D RID: 4637 RVA: 0x00078CA0 File Offset: 0x00076EA0
1441 // (set) Token: 0x0600121E RID: 4638 RVA: 0x00078CBE File Offset: 0x00076EBE
1442 public int c_invest
1443 {
1444 get
1445 {
1446 return base.GetInt(28, null);
1447 }
1448 set
1449 {
1450 base.SetInt(28, value);
1451 }
1452 }
1453
1454 // Token: 0x170004FD RID: 1277
1455 // (get) Token: 0x0600121F RID: 4639 RVA: 0x00078CCC File Offset: 0x00076ECC
1456 // (set) Token: 0x06001220 RID: 4640 RVA: 0x00078CEA File Offset: 0x00076EEA
1457 public int c_seed
1458 {
1459 get
1460 {
1461 return base.GetInt(33, null);
1462 }
1463 set
1464 {
1465 base.SetInt(33, value);
1466 }
1467 }
1468
1469 // Token: 0x170004FE RID: 1278
1470 // (get) Token: 0x06001221 RID: 4641 RVA: 0x00078CF8 File Offset: 0x00076EF8
1471 // (set) Token: 0x06001222 RID: 4642 RVA: 0x00078D16 File Offset: 0x00076F16
1472 public int c_allowance
1473 {
1474 get
1475 {
1476 return base.GetInt(114, null);
1477 }
1478 set
1479 {
1480 base.SetInt(114, value);
1481 }
1482 }
1483
1484 // Token: 0x170004FF RID: 1279
1485 // (get) Token: 0x06001223 RID: 4643 RVA: 0x00078D24 File Offset: 0x00076F24
1486 // (set) Token: 0x06001224 RID: 4644 RVA: 0x00078D42 File Offset: 0x00076F42
1487 public int c_fur
1488 {
1489 get
1490 {
1491 return base.GetInt(62, null);
1492 }
1493 set
1494 {
1495 base.SetInt(62, value);
1496 }
1497 }
1498
1499 // Token: 0x17000500 RID: 1280
1500 // (get) Token: 0x06001225 RID: 4645 RVA: 0x00078D50 File Offset: 0x00076F50
1501 // (set) Token: 0x06001226 RID: 4646 RVA: 0x00078D6D File Offset: 0x00076F6D
1502 public int c_containerSize
1503 {
1504 get
1505 {
1506 return base.GetInt(8, null);
1507 }
1508 set
1509 {
1510 base.SetInt(8, value);
1511 }
1512 }
1513
1514 // Token: 0x17000501 RID: 1281
1515 // (get) Token: 0x06001227 RID: 4647 RVA: 0x00078D78 File Offset: 0x00076F78
1516 // (set) Token: 0x06001228 RID: 4648 RVA: 0x00078D95 File Offset: 0x00076F95
1517 public int c_weight
1518 {
1519 get
1520 {
1521 return base.GetInt(1, null);
1522 }
1523 set
1524 {
1525 base.SetInt(1, value);
1526 }
1527 }
1528
1529 // Token: 0x17000502 RID: 1282
1530 // (get) Token: 0x06001229 RID: 4649 RVA: 0x00078DA0 File Offset: 0x00076FA0
1531 // (set) Token: 0x0600122A RID: 4650 RVA: 0x00078DBE File Offset: 0x00076FBE
1532 public int c_diceDim
1533 {
1534 get
1535 {
1536 return base.GetInt(14, null);
1537 }
1538 set
1539 {
1540 base.SetInt(14, value);
1541 }
1542 }
1543
1544 // Token: 0x17000503 RID: 1283
1545 // (get) Token: 0x0600122B RID: 4651 RVA: 0x00078DCC File Offset: 0x00076FCC
1546 // (set) Token: 0x0600122C RID: 4652 RVA: 0x00078DEA File Offset: 0x00076FEA
1547 public int c_indexContainerIcon
1548 {
1549 get
1550 {
1551 return base.GetInt(15, null);
1552 }
1553 set
1554 {
1555 base.SetInt(15, value);
1556 }
1557 }
1558
1559 // Token: 0x17000504 RID: 1284
1560 // (get) Token: 0x0600122D RID: 4653 RVA: 0x00078DF8 File Offset: 0x00076FF8
1561 // (set) Token: 0x0600122E RID: 4654 RVA: 0x00078E16 File Offset: 0x00077016
1562 public int c_idMainElement
1563 {
1564 get
1565 {
1566 return base.GetInt(16, null);
1567 }
1568 set
1569 {
1570 base.SetInt(16, value);
1571 }
1572 }
1573
1574 // Token: 0x17000505 RID: 1285
1575 // (get) Token: 0x0600122F RID: 4655 RVA: 0x00078E24 File Offset: 0x00077024
1576 // (set) Token: 0x06001230 RID: 4656 RVA: 0x00078E42 File Offset: 0x00077042
1577 public int c_summonDuration
1578 {
1579 get
1580 {
1581 return base.GetInt(17, null);
1582 }
1583 set
1584 {
1585 base.SetInt(17, value);
1586 }
1587 }
1588
1589 // Token: 0x17000506 RID: 1286
1590 // (get) Token: 0x06001231 RID: 4657 RVA: 0x00078E50 File Offset: 0x00077050
1591 // (set) Token: 0x06001232 RID: 4658 RVA: 0x00078E6E File Offset: 0x0007706E
1592 public int c_idBacker
1593 {
1594 get
1595 {
1596 return base.GetInt(52, null);
1597 }
1598 set
1599 {
1600 base.SetInt(52, value);
1601 }
1602 }
1603
1604 // Token: 0x17000507 RID: 1287
1605 // (get) Token: 0x06001233 RID: 4659 RVA: 0x00078E7C File Offset: 0x0007707C
1606 // (set) Token: 0x06001234 RID: 4660 RVA: 0x00078E9A File Offset: 0x0007709A
1607 public int c_uidMaster
1608 {
1609 get
1610 {
1611 return base.GetInt(54, null);
1612 }
1613 set
1614 {
1615 base.SetInt(54, value);
1616 }
1617 }
1618
1619 // Token: 0x17000508 RID: 1288
1620 // (get) Token: 0x06001235 RID: 4661 RVA: 0x00078EA8 File Offset: 0x000770A8
1621 // (set) Token: 0x06001236 RID: 4662 RVA: 0x00078EC6 File Offset: 0x000770C6
1622 public int c_ammo
1623 {
1624 get
1625 {
1626 return base.GetInt(27, null);
1627 }
1628 set
1629 {
1630 base.SetInt(27, value);
1631 }
1632 }
1633
1634 // Token: 0x17000509 RID: 1289
1635 // (get) Token: 0x06001237 RID: 4663 RVA: 0x00078ED4 File Offset: 0x000770D4
1636 // (set) Token: 0x06001238 RID: 4664 RVA: 0x00078EF2 File Offset: 0x000770F2
1637 public int c_daysWithGod
1638 {
1639 get
1640 {
1641 return base.GetInt(57, null);
1642 }
1643 set
1644 {
1645 base.SetInt(57, value);
1646 }
1647 }
1648
1649 // Token: 0x1700050A RID: 1290
1650 // (get) Token: 0x06001239 RID: 4665 RVA: 0x00078EFD File Offset: 0x000770FD
1651 // (set) Token: 0x0600123A RID: 4666 RVA: 0x00078F08 File Offset: 0x00077108
1652 public string c_idPortrait
1653 {
1654 get
1655 {
1656 return base.GetStr(9, null);
1657 }
1658 set
1659 {
1660 base.SetStr(9, value);
1661 }
1662 }
1663
1664 // Token: 0x1700050B RID: 1291
1665 // (get) Token: 0x0600123B RID: 4667 RVA: 0x00078F13 File Offset: 0x00077113
1666 // (set) Token: 0x0600123C RID: 4668 RVA: 0x00078F1D File Offset: 0x0007711D
1667 public string c_idRace
1668 {
1669 get
1670 {
1671 return base.GetStr(3, null);
1672 }
1673 set
1674 {
1675 base.SetStr(3, value);
1676 }
1677 }
1678
1679 // Token: 0x1700050C RID: 1292
1680 // (get) Token: 0x0600123D RID: 4669 RVA: 0x00078F27 File Offset: 0x00077127
1681 // (set) Token: 0x0600123E RID: 4670 RVA: 0x00078F31 File Offset: 0x00077131
1682 public string c_idJob
1683 {
1684 get
1685 {
1686 return base.GetStr(4, null);
1687 }
1688 set
1689 {
1690 base.SetStr(4, value);
1691 }
1692 }
1693
1694 // Token: 0x1700050D RID: 1293
1695 // (get) Token: 0x0600123F RID: 4671 RVA: 0x00078F3B File Offset: 0x0007713B
1696 // (set) Token: 0x06001240 RID: 4672 RVA: 0x00078F46 File Offset: 0x00077146
1697 public string c_idTone
1698 {
1699 get
1700 {
1701 return base.GetStr(22, null);
1702 }
1703 set
1704 {
1705 base.SetStr(22, value);
1706 }
1707 }
1708
1709 // Token: 0x1700050E RID: 1294
1710 // (get) Token: 0x06001241 RID: 4673 RVA: 0x00078F51 File Offset: 0x00077151
1711 // (set) Token: 0x06001242 RID: 4674 RVA: 0x00078F5B File Offset: 0x0007715B
1712 public string c_color
1713 {
1714 get
1715 {
1716 return base.GetStr(8, null);
1717 }
1718 set
1719 {
1720 base.SetStr(8, value);
1721 }
1722 }
1723
1724 // Token: 0x1700050F RID: 1295
1725 // (get) Token: 0x06001243 RID: 4675 RVA: 0x00078F65 File Offset: 0x00077165
1726 // (set) Token: 0x06001244 RID: 4676 RVA: 0x00078F70 File Offset: 0x00077170
1727 public string c_idTalk
1728 {
1729 get
1730 {
1731 return base.GetStr(21, null);
1732 }
1733 set
1734 {
1735 base.SetStr(21, value);
1736 }
1737 }
1738
1739 // Token: 0x17000510 RID: 1296
1740 // (get) Token: 0x06001245 RID: 4677 RVA: 0x00078F7B File Offset: 0x0007717B
1741 // (set) Token: 0x06001246 RID: 4678 RVA: 0x00078F86 File Offset: 0x00077186
1742 public string c_idDeity
1743 {
1744 get
1745 {
1746 return base.GetStr(26, null);
1747 }
1748 set
1749 {
1750 base.SetStr(26, value);
1751 }
1752 }
1753
1754 // Token: 0x17000511 RID: 1297
1755 // (get) Token: 0x06001247 RID: 4679 RVA: 0x00078F91 File Offset: 0x00077191
1756 // (set) Token: 0x06001248 RID: 4680 RVA: 0x00078F9B File Offset: 0x0007719B
1757 public string c_altName
1758 {
1759 get
1760 {
1761 return base.GetStr(1, null);
1762 }
1763 set
1764 {
1765 base.SetStr(1, value);
1766 }
1767 }
1768
1769 // Token: 0x17000512 RID: 1298
1770 // (get) Token: 0x06001249 RID: 4681 RVA: 0x00078FA5 File Offset: 0x000771A5
1771 // (set) Token: 0x0600124A RID: 4682 RVA: 0x00078FAF File Offset: 0x000771AF
1772 public string c_altName2
1773 {
1774 get
1775 {
1776 return base.GetStr(2, null);
1777 }
1778 set
1779 {
1780 base.SetStr(2, value);
1781 }
1782 }
1783
1784 // Token: 0x17000513 RID: 1299
1785 // (get) Token: 0x0600124B RID: 4683 RVA: 0x00078FB9 File Offset: 0x000771B9
1786 // (set) Token: 0x0600124C RID: 4684 RVA: 0x00078FC4 File Offset: 0x000771C4
1787 public string c_refText
1788 {
1789 get
1790 {
1791 return base.GetStr(10, null);
1792 }
1793 set
1794 {
1795 base.SetStr(10, value);
1796 }
1797 }
1798
1799 // Token: 0x17000514 RID: 1300
1800 // (get) Token: 0x0600124D RID: 4685 RVA: 0x00078FCF File Offset: 0x000771CF
1801 // (set) Token: 0x0600124E RID: 4686 RVA: 0x00078FD9 File Offset: 0x000771D9
1802 public string c_idRefName
1803 {
1804 get
1805 {
1806 return base.GetStr(7, null);
1807 }
1808 set
1809 {
1810 base.SetStr(7, value);
1811 }
1812 }
1813
1814 // Token: 0x17000515 RID: 1301
1815 // (get) Token: 0x0600124F RID: 4687 RVA: 0x00078FE3 File Offset: 0x000771E3
1816 // (set) Token: 0x06001250 RID: 4688 RVA: 0x00078FEE File Offset: 0x000771EE
1817 public string c_idRidePCC
1818 {
1819 get
1820 {
1821 return base.GetStr(55, null);
1822 }
1823 set
1824 {
1825 base.SetStr(55, value);
1826 }
1827 }
1828
1829 // Token: 0x17000516 RID: 1302
1830 // (get) Token: 0x06001251 RID: 4689 RVA: 0x00078FF9 File Offset: 0x000771F9
1831 // (set) Token: 0x06001252 RID: 4690 RVA: 0x00079004 File Offset: 0x00077204
1832 public string c_idAbility
1833 {
1834 get
1835 {
1836 return base.GetStr(50, null);
1837 }
1838 set
1839 {
1840 base.SetStr(50, value);
1841 }
1842 }
1843
1844 // Token: 0x17000517 RID: 1303
1845 // (get) Token: 0x06001253 RID: 4691 RVA: 0x0007900F File Offset: 0x0007720F
1846 // (set) Token: 0x06001254 RID: 4692 RVA: 0x0007901A File Offset: 0x0007721A
1847 public string c_context
1848 {
1849 get
1850 {
1851 return base.GetStr(20, null);
1852 }
1853 set
1854 {
1855 base.SetStr(20, value);
1856 }
1857 }
1858
1859 // Token: 0x17000518 RID: 1304
1860 // (get) Token: 0x06001255 RID: 4693 RVA: 0x00079025 File Offset: 0x00077225
1861 // (set) Token: 0x06001256 RID: 4694 RVA: 0x00079030 File Offset: 0x00077230
1862 public string c_idEditor
1863 {
1864 get
1865 {
1866 return base.GetStr(27, null);
1867 }
1868 set
1869 {
1870 base.SetStr(27, value);
1871 }
1872 }
1873
1874 // Token: 0x17000519 RID: 1305
1875 // (get) Token: 0x06001257 RID: 4695 RVA: 0x0007903B File Offset: 0x0007723B
1876 // (set) Token: 0x06001258 RID: 4696 RVA: 0x00079046 File Offset: 0x00077246
1877 public string c_editorTags
1878 {
1879 get
1880 {
1881 return base.GetStr(28, null);
1882 }
1883 set
1884 {
1885 base.SetStr(28, value);
1886 }
1887 }
1888
1889 // Token: 0x1700051A RID: 1306
1890 // (get) Token: 0x06001259 RID: 4697 RVA: 0x00079051 File Offset: 0x00077251
1891 // (set) Token: 0x0600125A RID: 4698 RVA: 0x0007905C File Offset: 0x0007725C
1892 public string c_editorTraitVal
1893 {
1894 get
1895 {
1896 return base.GetStr(25, null);
1897 }
1898 set
1899 {
1900 base.SetStr(25, value);
1901 }
1902 }
1903
1904 // Token: 0x1700051B RID: 1307
1905 // (get) Token: 0x0600125B RID: 4699 RVA: 0x00079067 File Offset: 0x00077267
1906 // (set) Token: 0x0600125C RID: 4700 RVA: 0x00079072 File Offset: 0x00077272
1907 public string c_idTrait
1908 {
1909 get
1910 {
1911 return base.GetStr(29, null);
1912 }
1913 set
1914 {
1915 base.SetStr(29, value);
1916 }
1917 }
1918
1919 // Token: 0x1700051C RID: 1308
1920 // (get) Token: 0x0600125D RID: 4701 RVA: 0x0007907D File Offset: 0x0007727D
1921 // (set) Token: 0x0600125E RID: 4702 RVA: 0x00079087 File Offset: 0x00077287
1922 public string c_idRefCard
1923 {
1924 get
1925 {
1926 return base.GetStr(5, null);
1927 }
1928 set
1929 {
1930 base.SetStr(5, value);
1931 }
1932 }
1933
1934 // Token: 0x1700051D RID: 1309
1935 // (get) Token: 0x0600125F RID: 4703 RVA: 0x00079091 File Offset: 0x00077291
1936 // (set) Token: 0x06001260 RID: 4704 RVA: 0x0007909B File Offset: 0x0007729B
1937 public string c_idRefCard2
1938 {
1939 get
1940 {
1941 return base.GetStr(6, null);
1942 }
1943 set
1944 {
1945 base.SetStr(6, value);
1946 }
1947 }
1948
1949 // Token: 0x1700051E RID: 1310
1950 // (get) Token: 0x06001261 RID: 4705 RVA: 0x000790A5 File Offset: 0x000772A5
1951 // (set) Token: 0x06001262 RID: 4706 RVA: 0x000790B0 File Offset: 0x000772B0
1952 public string c_note
1953 {
1954 get
1955 {
1956 return base.GetStr(51, null);
1957 }
1958 set
1959 {
1960 base.SetStr(51, value);
1961 }
1962 }
1963
1964 // Token: 0x1700051F RID: 1311
1965 // (get) Token: 0x06001263 RID: 4707 RVA: 0x000790BB File Offset: 0x000772BB
1966 // (set) Token: 0x06001264 RID: 4708 RVA: 0x000790C4 File Offset: 0x000772C4
1967 public UniqueData c_uniqueData
1968 {
1969 get
1970 {
1971 return base.GetObj<UniqueData>(6);
1972 }
1973 set
1974 {
1975 base.SetObj(6, value);
1976 }
1977 }
1978
1979 // Token: 0x17000520 RID: 1312
1980 // (get) Token: 0x06001265 RID: 4709 RVA: 0x000790CE File Offset: 0x000772CE
1981 // (set) Token: 0x06001266 RID: 4710 RVA: 0x000790D8 File Offset: 0x000772D8
1982 public Thing ammoData
1983 {
1984 get
1985 {
1986 return base.GetObj<Thing>(9);
1987 }
1988 set
1989 {
1990 base.SetObj(9, value);
1991 }
1992 }
1993
1994 // Token: 0x17000521 RID: 1313
1995 // (get) Token: 0x06001267 RID: 4711 RVA: 0x000790E3 File Offset: 0x000772E3
1996 // (set) Token: 0x06001268 RID: 4712 RVA: 0x000790ED File Offset: 0x000772ED
1997 public Thing c_copyContainer
1998 {
1999 get
2000 {
2001 return base.GetObj<Thing>(10);
2002 }
2003 set
2004 {
2005 base.SetObj(10, value);
2006 }
2007 }
2008
2009 // Token: 0x17000522 RID: 1314
2010 // (get) Token: 0x06001269 RID: 4713 RVA: 0x000790F8 File Offset: 0x000772F8
2011 // (set) Token: 0x0600126A RID: 4714 RVA: 0x00079101 File Offset: 0x00077301
2012 public Window.SaveData c_windowSaveData
2013 {
2014 get
2015 {
2016 return base.GetObj<Window.SaveData>(2);
2017 }
2018 set
2019 {
2020 base.SetObj(2, value);
2021 }
2022 }
2023
2024 // Token: 0x17000523 RID: 1315
2025 // (get) Token: 0x0600126B RID: 4715 RVA: 0x0007910B File Offset: 0x0007730B
2026 // (set) Token: 0x0600126C RID: 4716 RVA: 0x00079115 File Offset: 0x00077315
2027 public CharaUpgrade c_upgrades
2028 {
2029 get
2030 {
2031 return base.GetObj<CharaUpgrade>(11);
2032 }
2033 set
2034 {
2035 base.SetObj(11, value);
2036 }
2037 }
2038
2039 // Token: 0x17000524 RID: 1316
2040 // (get) Token: 0x0600126D RID: 4717 RVA: 0x00079120 File Offset: 0x00077320
2041 // (set) Token: 0x0600126E RID: 4718 RVA: 0x0007912A File Offset: 0x0007732A
2042 public CharaGenes c_genes
2043 {
2044 get
2045 {
2046 return base.GetObj<CharaGenes>(15);
2047 }
2048 set
2049 {
2050 base.SetObj(15, value);
2051 }
2052 }
2053
2054 // Token: 0x17000525 RID: 1317
2055 // (get) Token: 0x0600126F RID: 4719 RVA: 0x00079138 File Offset: 0x00077338
2056 // (set) Token: 0x06001270 RID: 4720 RVA: 0x0007915F File Offset: 0x0007735F
2057 public ContainerUpgrade c_containerUpgrade
2058 {
2059 get
2060 {
2061 ContainerUpgrade result;
2062 if ((result = base.GetObj<ContainerUpgrade>(12)) == null)
2063 {
2064 result = (this.c_containerUpgrade = new ContainerUpgrade());
2065 }
2066 return result;
2067 }
2068 set
2069 {
2070 base.SetObj(12, value);
2071 }
2072 }
2073
2074 // Token: 0x17000526 RID: 1318
2075 // (get) Token: 0x06001271 RID: 4721 RVA: 0x0007916A File Offset: 0x0007736A
2076 // (set) Token: 0x06001272 RID: 4722 RVA: 0x00079174 File Offset: 0x00077374
2077 public DNA c_DNA
2078 {
2079 get
2080 {
2081 return base.GetObj<DNA>(14);
2082 }
2083 set
2084 {
2085 base.SetObj(14, value);
2086 }
2087 }
2088
2089 // Token: 0x17000527 RID: 1319
2090 // (get) Token: 0x06001273 RID: 4723 RVA: 0x0007917F File Offset: 0x0007737F
2091 // (set) Token: 0x06001274 RID: 4724 RVA: 0x00079189 File Offset: 0x00077389
2092 public CharaList c_charaList
2093 {
2094 get
2095 {
2096 return base.GetObj<CharaList>(13);
2097 }
2098 set
2099 {
2100 base.SetObj(13, value);
2101 }
2102 }
2103
2104 // Token: 0x06001275 RID: 4725 RVA: 0x00079194 File Offset: 0x00077394
2105 public Window.SaveData GetWindowSaveData()
2106 {
2107 if (this.IsPC)
2108 {
2109 return Window.dictData.TryGetValue("LayerInventoryFloatMain0", null);
2110 }
2111 if (this.trait is TraitChestMerchant)
2112 {
2113 return Window.dictData.TryGetValue("ChestMerchant", null);
2114 }
2115 return this.c_windowSaveData;
2116 }
2117
2118 // Token: 0x06001276 RID: 4726 RVA: 0x000791D4 File Offset: 0x000773D4
2119 public bool IsExcludeFromCraft()
2120 {
2121 if (this.IsUnique || this.c_isImportant)
2122 {
2123 return true;
2124 }
2125 Card card = this.parent as Card;
2126 if (card != null)
2127 {
2128 if (card.trait is TraitChestMerchant)
2129 {
2130 return true;
2131 }
2132 if (card.isSale)
2133 {
2134 return true;
2135 }
2136 Window.SaveData windowSaveData = card.GetWindowSaveData();
2137 if (windowSaveData != null)
2138 {
2139 return windowSaveData.excludeCraft;
2140 }
2141 }
2142 return false;
2143 }
2144
2145 // Token: 0x17000528 RID: 1320
2146 // (get) Token: 0x06001277 RID: 4727 RVA: 0x0007922D File Offset: 0x0007742D
2147 // (set) Token: 0x06001278 RID: 4728 RVA: 0x00079236 File Offset: 0x00077436
2148 public byte[] c_textureData
2149 {
2150 get
2151 {
2152 return base.GetObj<byte[]>(4);
2153 }
2154 set
2155 {
2156 base.SetObj(4, value);
2157 }
2158 }
2159
2160 // Token: 0x17000529 RID: 1321
2161 // (get) Token: 0x06001279 RID: 4729 RVA: 0x00079240 File Offset: 0x00077440
2162 public SourceMaterial.Row DyeMat
2163 {
2164 get
2165 {
2166 return EClass.sources.materials.rows[this.c_dyeMat];
2167 }
2168 }
2169
2170 // Token: 0x1700052A RID: 1322
2171 // (get) Token: 0x0600127A RID: 4730 RVA: 0x0007925C File Offset: 0x0007745C
2172 // (set) Token: 0x0600127B RID: 4731 RVA: 0x00079269 File Offset: 0x00077469
2173 public int invX
2174 {
2175 get
2176 {
2177 return this.pos.x;
2178 }
2179 set
2180 {
2181 this.pos.x = value;
2182 }
2183 }
2184
2185 // Token: 0x1700052B RID: 1323
2186 // (get) Token: 0x0600127C RID: 4732 RVA: 0x00079277 File Offset: 0x00077477
2187 // (set) Token: 0x0600127D RID: 4733 RVA: 0x00079284 File Offset: 0x00077484
2188 public int invY
2189 {
2190 get
2191 {
2192 return this.pos.z;
2193 }
2194 set
2195 {
2196 this.pos.z = value;
2197 }
2198 }
2199
2200 // Token: 0x1700052C RID: 1324
2201 // (get) Token: 0x0600127E RID: 4734 RVA: 0x00079292 File Offset: 0x00077492
2202 public CardRow refCard
2203 {
2204 get
2205 {
2206 if (!this.c_idRefCard.IsEmpty())
2207 {
2208 return EClass.sources.cards.map[this.c_idRefCard];
2209 }
2210 return null;
2211 }
2212 }
2213
2214 // Token: 0x1700052D RID: 1325
2215 // (get) Token: 0x0600127F RID: 4735 RVA: 0x000792BD File Offset: 0x000774BD
2216 public CardRow refCard2
2217 {
2218 get
2219 {
2220 if (!this.c_idRefCard2.IsEmpty())
2221 {
2222 return EClass.sources.cards.map[this.c_idRefCard2];
2223 }
2224 return null;
2225 }
2226 }
2227
2228 // Token: 0x1700052E RID: 1326
2229 // (get) Token: 0x06001280 RID: 4736 RVA: 0x000792E8 File Offset: 0x000774E8
2230 public int ExpToNext
2231 {
2232 get
2233 {
2234 return (50 + this.LV * 30) * (100 - this.Evalue(403)) / 100;
2235 }
2236 }
2237
2238 // Token: 0x1700052F RID: 1327
2239 // (get) Token: 0x06001281 RID: 4737 RVA: 0x00079308 File Offset: 0x00077508
2240 public int DefaultLV
2241 {
2242 get
2243 {
2244 return this.sourceCard.LV;
2245 }
2246 }
2247
2248 // Token: 0x17000530 RID: 1328
2249 // (get) Token: 0x06001282 RID: 4738 RVA: 0x00079318 File Offset: 0x00077518
2250 public int ChildrenWeight
2251 {
2252 get
2253 {
2254 if (this.dirtyWeight)
2255 {
2256 this._childrenWeight = 0;
2257 if (!(this.trait is TraitMagicChest))
2258 {
2259 foreach (Thing thing in this.things)
2260 {
2261 this._childrenWeight += thing.ChildrenAndSelfWeight;
2262 }
2263 this.dirtyWeight = false;
2264 Card card = this.parent as Card;
2265 if (card != null)
2266 {
2267 card.SetDirtyWeight();
2268 }
2269 if (this.isChara && this.IsPCFaction)
2270 {
2271 this.Chara.CalcBurden();
2272 }
2273 if (this._childrenWeight < 0 || this._childrenWeight >= 10000000)
2274 {
2275 this._childrenWeight = 9999999;
2276 }
2277 }
2278 }
2279 return this._childrenWeight * Mathf.Max(100 - this.Evalue(404), 0) / 100;
2280 }
2281 }
2282
2283 // Token: 0x06001283 RID: 4739 RVA: 0x00079410 File Offset: 0x00077610
2284 public void SetDirtyWeight()
2285 {
2286 if (EClass.core.IsGameStarted && this.IsPC)
2287 {
2288 EClass.player.wasDirtyWeight = true;
2289 }
2290 this.dirtyWeight = true;
2291 Card card = this.parent as Card;
2292 if (card == null)
2293 {
2294 return;
2295 }
2296 card.SetDirtyWeight();
2297 }
2298
2299 // Token: 0x06001284 RID: 4740 RVA: 0x0007944D File Offset: 0x0007764D
2300 public void ChangeWeight(int a)
2301 {
2302 this.c_weight = a;
2303 this.isWeightChanged = true;
2304 this.SetDirtyWeight();
2305 }
2306
2307 // Token: 0x17000531 RID: 1329
2308 // (get) Token: 0x06001285 RID: 4741 RVA: 0x00079463 File Offset: 0x00077663
2309 public int ChildrenAndSelfWeight
2310 {
2311 get
2312 {
2313 return this.ChildrenWeight + this.SelfWeight * this.Num;
2314 }
2315 }
2316
2317 // Token: 0x17000532 RID: 1330
2318 // (get) Token: 0x06001286 RID: 4742 RVA: 0x00079479 File Offset: 0x00077679
2319 public int ChildrenAndSelfWeightSingle
2320 {
2321 get
2322 {
2323 return this.ChildrenWeight + this.SelfWeight;
2324 }
2325 }
2326
2327 // Token: 0x17000533 RID: 1331
2328 // (get) Token: 0x06001287 RID: 4743 RVA: 0x00079488 File Offset: 0x00077688
2329 public virtual int SelfWeight
2330 {
2331 get
2332 {
2333 return 1000;
2334 }
2335 }
2336
2337 // Token: 0x17000534 RID: 1332
2338 // (get) Token: 0x06001288 RID: 4744 RVA: 0x0007948F File Offset: 0x0007768F
2339 public virtual int WeightLimit
2340 {
2341 get
2342 {
2343 return 500000;
2344 }
2345 }
2346
2347 // Token: 0x17000535 RID: 1333
2348 // (get) Token: 0x06001289 RID: 4745 RVA: 0x00079498 File Offset: 0x00077698
2349 public SourceCategory.Row category
2350 {
2351 get
2352 {
2353 SourceCategory.Row result;
2354 if ((result = this._category) == null)
2355 {
2356 result = (this._category = EClass.sources.categories.map[this.sourceCard.category]);
2357 }
2358 return result;
2359 }
2360 }
2361
2362 // Token: 0x17000536 RID: 1334
2363 // (get) Token: 0x0600128A RID: 4746 RVA: 0x000794D8 File Offset: 0x000776D8
2364 public SourceMaterial.Row material
2365 {
2366 get
2367 {
2368 SourceMaterial.Row result;
2369 if ((result = this._material) == null)
2370 {
2371 result = (this._material = EClass.sources.materials.map[this.idMaterial]);
2372 }
2373 return result;
2374 }
2375 }
2376
2377 // Token: 0x17000537 RID: 1335
2378 // (get) Token: 0x0600128B RID: 4747 RVA: 0x00079512 File Offset: 0x00077712
2379 public virtual string AliasMaterialOnCreate
2380 {
2381 get
2382 {
2383 return this.DefaultMaterial.alias;
2384 }
2385 }
2386
2387 // Token: 0x0600128C RID: 4748 RVA: 0x0007951F File Offset: 0x0007771F
2388 public int Evalue(int ele)
2389 {
2390 return this.elements.Value(ele);
2391 }
2392
2393 // Token: 0x0600128D RID: 4749 RVA: 0x0007952D File Offset: 0x0007772D
2394 public int Evalue(string alias)
2395 {
2396 return this.elements.Value(EClass.sources.elements.alias[alias].id);
2397 }
2398
2399 // Token: 0x0600128E RID: 4750 RVA: 0x00079554 File Offset: 0x00077754
2400 public bool HasTag(CTAG tag)
2401 {
2402 return this.sourceCard.tag.Contains(tag.ToString());
2403 }
2404
2405 // Token: 0x0600128F RID: 4751 RVA: 0x00079573 File Offset: 0x00077773
2406 public bool HasEditorTag(EditorTag tag)
2407 {
2408 string c_editorTags = this.c_editorTags;
2409 return c_editorTags != null && c_editorTags.Contains(tag.ToString());
2410 }
2411
2412 // Token: 0x06001290 RID: 4752 RVA: 0x00079594 File Offset: 0x00077794
2413 public void AddEditorTag(EditorTag tag)
2414 {
2415 this.c_editorTags = (this.c_editorTags.IsEmpty() ? tag.ToString() : (this.c_editorTags + "," + tag.ToString()));
2416 }
2417
2418 // Token: 0x06001291 RID: 4753 RVA: 0x000795E0 File Offset: 0x000777E0
2419 public void RemoveEditorTag(EditorTag tag)
2420 {
2421 this.c_editorTags = (this.c_editorTags.IsEmpty() ? null : this.c_editorTags.Replace(tag.ToString(), "").Replace(",,", ","));
2422 }
2423
2424 // Token: 0x17000538 RID: 1336
2425 // (get) Token: 0x06001292 RID: 4754 RVA: 0x0007962F File Offset: 0x0007782F
2426 public Cell Cell
2427 {
2428 get
2429 {
2430 return this.pos.cell;
2431 }
2432 }
2433
2434 // Token: 0x17000539 RID: 1337
2435 // (get) Token: 0x06001293 RID: 4755 RVA: 0x0007963C File Offset: 0x0007783C
2436 public virtual Thing Thing
2437 {
2438 get
2439 {
2440 if (!this.isThing)
2441 {
2442 return null;
2443 }
2444 return (Thing)this;
2445 }
2446 }
2447
2448 // Token: 0x1700053A RID: 1338
2449 // (get) Token: 0x06001294 RID: 4756 RVA: 0x0007964E File Offset: 0x0007784E
2450 public virtual Chara Chara
2451 {
2452 get
2453 {
2454 if (!this.isChara)
2455 {
2456 return null;
2457 }
2458 return (Chara)this;
2459 }
2460 }
2461
2462 // Token: 0x1700053B RID: 1339
2463 // (get) Token: 0x06001295 RID: 4757 RVA: 0x00079660 File Offset: 0x00077860
2464 public virtual bool isThing
2465 {
2466 get
2467 {
2468 return false;
2469 }
2470 }
2471
2472 // Token: 0x1700053C RID: 1340
2473 // (get) Token: 0x06001296 RID: 4758 RVA: 0x00079663 File Offset: 0x00077863
2474 public virtual bool isChara
2475 {
2476 get
2477 {
2478 return false;
2479 }
2480 }
2481
2482 // Token: 0x1700053D RID: 1341
2483 // (get) Token: 0x06001297 RID: 4759 RVA: 0x00079666 File Offset: 0x00077866
2484 public bool ExistsOnMap
2485 {
2486 get
2487 {
2488 return this.parent == EClass._zone;
2489 }
2490 }
2491
2492 // Token: 0x1700053E RID: 1342
2493 // (get) Token: 0x06001298 RID: 4760 RVA: 0x00079675 File Offset: 0x00077875
2494 public virtual bool isSynced
2495 {
2496 get
2497 {
2498 return this.renderer.isSynced;
2499 }
2500 }
2501
2502 // Token: 0x1700053F RID: 1343
2503 // (get) Token: 0x06001299 RID: 4761 RVA: 0x00079682 File Offset: 0x00077882
2504 public bool IsContainer
2505 {
2506 get
2507 {
2508 return this.trait.IsContainer;
2509 }
2510 }
2511
2512 // Token: 0x17000540 RID: 1344
2513 // (get) Token: 0x0600129A RID: 4762 RVA: 0x0007968F File Offset: 0x0007788F
2514 public bool IsUnique
2515 {
2516 get
2517 {
2518 return this.rarity == Rarity.Artifact;
2519 }
2520 }
2521
2522 // Token: 0x17000541 RID: 1345
2523 // (get) Token: 0x0600129B RID: 4763 RVA: 0x0007969A File Offset: 0x0007789A
2524 public bool IsPowerful
2525 {
2526 get
2527 {
2528 return (this.rarity >= Rarity.Legendary || this.trait is TraitAdventurer) && !this.IsPCFaction;
2529 }
2530 }
2531
2532 // Token: 0x17000542 RID: 1346
2533 // (get) Token: 0x0600129C RID: 4764 RVA: 0x000796BD File Offset: 0x000778BD
2534 public bool IsImportant
2535 {
2536 get
2537 {
2538 return this.sourceCard.HasTag(CTAG.important);
2539 }
2540 }
2541
2542 // Token: 0x17000543 RID: 1347
2543 // (get) Token: 0x0600129D RID: 4765 RVA: 0x000796CB File Offset: 0x000778CB
2544 public virtual SourcePref Pref
2545 {
2546 get
2547 {
2548 return this.sourceCard.pref;
2549 }
2550 }
2551
2552 // Token: 0x17000544 RID: 1348
2553 // (get) Token: 0x0600129E RID: 4766 RVA: 0x000796D8 File Offset: 0x000778D8
2554 public virtual bool IsDeadOrSleeping
2555 {
2556 get
2557 {
2558 return false;
2559 }
2560 }
2561
2562 // Token: 0x17000545 RID: 1349
2563 // (get) Token: 0x0600129F RID: 4767 RVA: 0x000796DB File Offset: 0x000778DB
2564 public virtual bool IsDisabled
2565 {
2566 get
2567 {
2568 return false;
2569 }
2570 }
2571
2572 // Token: 0x17000546 RID: 1350
2573 // (get) Token: 0x060012A0 RID: 4768 RVA: 0x000796DE File Offset: 0x000778DE
2574 public virtual bool IsMoving
2575 {
2576 get
2577 {
2578 return false;
2579 }
2580 }
2581
2582 // Token: 0x17000547 RID: 1351
2583 // (get) Token: 0x060012A1 RID: 4769 RVA: 0x000796E1 File Offset: 0x000778E1
2584 public virtual bool flipX
2585 {
2586 get
2587 {
2588 return this.Tiles.Length == 1 && this.dir % 2 == 1;
2589 }
2590 }
2591
2592 // Token: 0x17000548 RID: 1352
2593 // (get) Token: 0x060012A2 RID: 4770 RVA: 0x000796FB File Offset: 0x000778FB
2594 public virtual bool IsAliveInCurrentZone
2595 {
2596 get
2597 {
2598 return this.ExistsOnMap;
2599 }
2600 }
2601
2602 // Token: 0x17000549 RID: 1353
2603 // (get) Token: 0x060012A3 RID: 4771 RVA: 0x00079703 File Offset: 0x00077903
2604 public virtual string actorPrefab
2605 {
2606 get
2607 {
2608 return "ThingActor";
2609 }
2610 }
2611
2612 // Token: 0x1700054A RID: 1354
2613 // (get) Token: 0x060012A4 RID: 4772 RVA: 0x0007970A File Offset: 0x0007790A
2614 public virtual CardRow sourceCard
2615 {
2616 get
2617 {
2618 return null;
2619 }
2620 }
2621
2622 // Token: 0x1700054B RID: 1355
2623 // (get) Token: 0x060012A5 RID: 4773 RVA: 0x0007970D File Offset: 0x0007790D
2624 public virtual CardRow sourceRenderCard
2625 {
2626 get
2627 {
2628 return this.sourceCard;
2629 }
2630 }
2631
2632 // Token: 0x1700054C RID: 1356
2633 // (get) Token: 0x060012A6 RID: 4774 RVA: 0x00079715 File Offset: 0x00077915
2634 public TileType TileType
2635 {
2636 get
2637 {
2638 return this.sourceCard.tileType;
2639 }
2640 }
2641
2642 // Token: 0x1700054D RID: 1357
2643 // (get) Token: 0x060012A7 RID: 4775 RVA: 0x00079722 File Offset: 0x00077922
2644 public string Name
2645 {
2646 get
2647 {
2648 return this.GetName(NameStyle.Full, -1);
2649 }
2650 }
2651
2652 // Token: 0x1700054E RID: 1358
2653 // (get) Token: 0x060012A8 RID: 4776 RVA: 0x0007972C File Offset: 0x0007792C
2654 public string NameSimple
2655 {
2656 get
2657 {
2658 return this.GetName(NameStyle.Simple, -1);
2659 }
2660 }
2661
2662 // Token: 0x060012A9 RID: 4777 RVA: 0x00079736 File Offset: 0x00077936
2663 public virtual string GetName(NameStyle style, int num = -1)
2664 {
2665 return "Card";
2666 }
2667
2668 // Token: 0x060012AA RID: 4778 RVA: 0x0007973D File Offset: 0x0007793D
2669 public virtual string GetExtraName()
2670 {
2671 return "";
2672 }
2673
2674 // Token: 0x060012AB RID: 4779 RVA: 0x00079744 File Offset: 0x00077944
2675 public virtual string GetDetail()
2676 {
2677 return this.sourceCard.GetText("detail", true);
2678 }
2679
2680 // Token: 0x1700054F RID: 1359
2681 // (get) Token: 0x060012AC RID: 4780 RVA: 0x00079757 File Offset: 0x00077957
2682 public virtual bool IsPC
2683 {
2684 get
2685 {
2686 return false;
2687 }
2688 }
2689
2690 // Token: 0x17000550 RID: 1360
2691 // (get) Token: 0x060012AD RID: 4781 RVA: 0x0007975C File Offset: 0x0007795C
2692 public bool _IsPC
2693 {
2694 get
2695 {
2696 return base.GetInt(56, null) != 0;
2697 }
2698 }
2699
2700 // Token: 0x17000551 RID: 1361
2701 // (get) Token: 0x060012AE RID: 4782 RVA: 0x0007977D File Offset: 0x0007797D
2702 public virtual bool IsPCC
2703 {
2704 get
2705 {
2706 return false;
2707 }
2708 }
2709
2710 // Token: 0x17000552 RID: 1362
2711 // (get) Token: 0x060012AF RID: 4783 RVA: 0x00079780 File Offset: 0x00077980
2712 public virtual bool IsPCParty
2713 {
2714 get
2715 {
2716 return false;
2717 }
2718 }
2719
2720 // Token: 0x17000553 RID: 1363
2721 // (get) Token: 0x060012B0 RID: 4784 RVA: 0x00079783 File Offset: 0x00077983
2722 public virtual bool IsMinion
2723 {
2724 get
2725 {
2726 return false;
2727 }
2728 }
2729
2730 // Token: 0x17000554 RID: 1364
2731 // (get) Token: 0x060012B1 RID: 4785 RVA: 0x00079786 File Offset: 0x00077986
2732 public virtual bool IsPCPartyMinion
2733 {
2734 get
2735 {
2736 return false;
2737 }
2738 }
2739
2740 // Token: 0x17000555 RID: 1365
2741 // (get) Token: 0x060012B2 RID: 4786 RVA: 0x00079789 File Offset: 0x00077989
2742 public virtual bool IsPCFactionMinion
2743 {
2744 get
2745 {
2746 return false;
2747 }
2748 }
2749
2750 // Token: 0x17000556 RID: 1366
2751 // (get) Token: 0x060012B3 RID: 4787 RVA: 0x0007978C File Offset: 0x0007798C
2752 public virtual bool IsMultisize
2753 {
2754 get
2755 {
2756 return this.sourceCard.multisize && this.IsInstalled;
2757 }
2758 }
2759
2760 // Token: 0x17000557 RID: 1367
2761 // (get) Token: 0x060012B4 RID: 4788 RVA: 0x000797A3 File Offset: 0x000779A3
2762 public bool IsToolbelt
2763 {
2764 get
2765 {
2766 return this.category.slot == 44;
2767 }
2768 }
2769
2770 // Token: 0x17000558 RID: 1368
2771 // (get) Token: 0x060012B5 RID: 4789 RVA: 0x000797B4 File Offset: 0x000779B4
2772 public bool IsLightsource
2773 {
2774 get
2775 {
2776 return this.category.slot == 45;
2777 }
2778 }
2779
2780 // Token: 0x17000559 RID: 1369
2781 // (get) Token: 0x060012B6 RID: 4790 RVA: 0x000797C5 File Offset: 0x000779C5
2782 public bool IsEquipment
2783 {
2784 get
2785 {
2786 return this.category.slot != 0;
2787 }
2788 }
2789
2790 // Token: 0x1700055A RID: 1370
2791 // (get) Token: 0x060012B7 RID: 4791 RVA: 0x000797D5 File Offset: 0x000779D5
2792 public bool IsFood
2793 {
2794 get
2795 {
2796 return this.category.IsChildOf("food");
2797 }
2798 }
2799
2800 // Token: 0x1700055B RID: 1371
2801 // (get) Token: 0x060012B8 RID: 4792 RVA: 0x000797E7 File Offset: 0x000779E7
2802 public bool ShowFoodEnc
2803 {
2804 get
2805 {
2806 return this.IsFood || this.category.IsChildOf("seed") || this.id == "pasture" || this.category.IsChildOf("drug");
2807 }
2808 }
2809
2810 // Token: 0x1700055C RID: 1372
2811 // (get) Token: 0x060012B9 RID: 4793 RVA: 0x00079827 File Offset: 0x00077A27
2812 public bool IsWeapon
2813 {
2814 get
2815 {
2816 return this.IsMeleeWeapon || this.IsRangedWeapon;
2817 }
2818 }
2819
2820 // Token: 0x1700055D RID: 1373
2821 // (get) Token: 0x060012BA RID: 4794 RVA: 0x00079839 File Offset: 0x00077A39
2822 public bool IsEquipmentOrRanged
2823 {
2824 get
2825 {
2826 return this.category.slot != 0 || this.IsRangedWeapon;
2827 }
2828 }
2829
2830 // Token: 0x1700055E RID: 1374
2831 // (get) Token: 0x060012BB RID: 4795 RVA: 0x00079850 File Offset: 0x00077A50
2832 public bool IsMeleeWeapon
2833 {
2834 get
2835 {
2836 return this.category.IsChildOf("melee");
2837 }
2838 }
2839
2840 // Token: 0x1700055F RID: 1375
2841 // (get) Token: 0x060012BC RID: 4796 RVA: 0x00079862 File Offset: 0x00077A62
2842 public bool IsRangedWeapon
2843 {
2844 get
2845 {
2846 return this.trait is TraitToolRange;
2847 }
2848 }
2849
2850 // Token: 0x17000560 RID: 1376
2851 // (get) Token: 0x060012BD RID: 4797 RVA: 0x00079872 File Offset: 0x00077A72
2852 public bool IsThrownWeapon
2853 {
2854 get
2855 {
2856 return this.sourceCard.HasTag(CTAG.throwWeapon);
2857 }
2858 }
2859
2860 // Token: 0x17000561 RID: 1377
2861 // (get) Token: 0x060012BE RID: 4798 RVA: 0x00079881 File Offset: 0x00077A81
2862 public bool IsAmmo
2863 {
2864 get
2865 {
2866 return this.trait is TraitAmmo;
2867 }
2868 }
2869
2870 // Token: 0x17000562 RID: 1378
2871 // (get) Token: 0x060012BF RID: 4799 RVA: 0x00079891 File Offset: 0x00077A91
2872 public bool IsAgent
2873 {
2874 get
2875 {
2876 return this == EClass.player.Agent;
2877 }
2878 }
2879
2880 // Token: 0x17000563 RID: 1379
2881 // (get) Token: 0x060012C0 RID: 4800 RVA: 0x000798A0 File Offset: 0x00077AA0
2882 public bool IsFurniture
2883 {
2884 get
2885 {
2886 return this.category.IsChildOf("furniture");
2887 }
2888 }
2889
2890 // Token: 0x17000564 RID: 1380
2891 // (get) Token: 0x060012C1 RID: 4801 RVA: 0x000798B2 File Offset: 0x00077AB2
2892 public bool IsBlessed
2893 {
2894 get
2895 {
2896 return this.blessedState >= BlessedState.Blessed;
2897 }
2898 }
2899
2900 // Token: 0x17000565 RID: 1381
2901 // (get) Token: 0x060012C2 RID: 4802 RVA: 0x000798C0 File Offset: 0x00077AC0
2902 public bool IsCursed
2903 {
2904 get
2905 {
2906 return this.blessedState <= BlessedState.Cursed;
2907 }
2908 }
2909
2910 // Token: 0x17000566 RID: 1382
2911 // (get) Token: 0x060012C3 RID: 4803 RVA: 0x000798CE File Offset: 0x00077ACE
2912 public bool IsRestrainedResident
2913 {
2914 get
2915 {
2916 return this.isRestrained && this.IsPCFaction;
2917 }
2918 }
2919
2920 // Token: 0x17000567 RID: 1383
2921 // (get) Token: 0x060012C4 RID: 4804 RVA: 0x000798E0 File Offset: 0x00077AE0
2922 public virtual bool IsPCFaction
2923 {
2924 get
2925 {
2926 return false;
2927 }
2928 }
2929
2930 // Token: 0x17000568 RID: 1384
2931 // (get) Token: 0x060012C5 RID: 4805 RVA: 0x000798E3 File Offset: 0x00077AE3
2932 public bool IsPCFactionOrMinion
2933 {
2934 get
2935 {
2936 return this.IsPCFaction || this.IsPCFactionMinion;
2937 }
2938 }
2939
2940 // Token: 0x17000569 RID: 1385
2941 // (get) Token: 0x060012C6 RID: 4806 RVA: 0x000798F5 File Offset: 0x00077AF5
2942 public virtual bool IsGlobal
2943 {
2944 get
2945 {
2946 return false;
2947 }
2948 }
2949
2950 // Token: 0x1700056A RID: 1386
2951 // (get) Token: 0x060012C7 RID: 4807 RVA: 0x000798F8 File Offset: 0x00077AF8
2952 public virtual int MaxDecay
2953 {
2954 get
2955 {
2956 return 1000;
2957 }
2958 }
2959
2960 // Token: 0x1700056B RID: 1387
2961 // (get) Token: 0x060012C8 RID: 4808 RVA: 0x000798FF File Offset: 0x00077AFF
2962 public bool IsDecayed
2963 {
2964 get
2965 {
2966 return this.decay > this.MaxDecay;
2967 }
2968 }
2969
2970 // Token: 0x1700056C RID: 1388
2971 // (get) Token: 0x060012C9 RID: 4809 RVA: 0x0007990F File Offset: 0x00077B0F
2972 public bool IsRotting
2973 {
2974 get
2975 {
2976 return this.decay >= this.MaxDecay / 4 * 3;
2977 }
2978 }
2979
2980 // Token: 0x1700056D RID: 1389
2981 // (get) Token: 0x060012CA RID: 4810 RVA: 0x00079926 File Offset: 0x00077B26
2982 public bool IsFresn
2983 {
2984 get
2985 {
2986 return this.decay < this.MaxDecay / 4;
2987 }
2988 }
2989
2990 // Token: 0x1700056E RID: 1390
2991 // (get) Token: 0x060012CB RID: 4811 RVA: 0x00079938 File Offset: 0x00077B38
2992 public virtual int MaxHP
2993 {
2994 get
2995 {
2996 return 100;
2997 }
2998 }
2999
3000 // Token: 0x1700056F RID: 1391
3001 // (get) Token: 0x060012CC RID: 4812 RVA: 0x0007993C File Offset: 0x00077B3C
3002 public virtual int Power
3003 {
3004 get
3005 {
3006 return Mathf.Max(20, EClass.curve(this.GetTotalQuality(true) * 10, 400, 100, 75));
3007 }
3008 }
3009
3010 // Token: 0x17000570 RID: 1392
3011 // (get) Token: 0x060012CD RID: 4813 RVA: 0x0007995D File Offset: 0x00077B5D
3012 public int FameLv
3013 {
3014 get
3015 {
3016 if (!this.IsPC)
3017 {
3018 return this.LV;
3019 }
3020 return EClass.player.fame / 100 + 1;
3021 }
3022 }
3023
3024 // Token: 0x17000571 RID: 1393
3025 // (get) Token: 0x060012CE RID: 4814 RVA: 0x0007997D File Offset: 0x00077B7D
3026 public virtual int[] Tiles
3027 {
3028 get
3029 {
3030 return this.sourceCard._tiles;
3031 }
3032 }
3033
3034 // Token: 0x17000572 RID: 1394
3035 // (get) Token: 0x060012CF RID: 4815 RVA: 0x0007998A File Offset: 0x00077B8A
3036 public virtual int PrefIndex
3037 {
3038 get
3039 {
3040 if (this.Tiles.Length < 3)
3041 {
3042 return this.dir % 2;
3043 }
3044 return this.dir;
3045 }
3046 }
3047
3048 // Token: 0x17000573 RID: 1395
3049 // (get) Token: 0x060012D0 RID: 4816 RVA: 0x000799A6 File Offset: 0x00077BA6
3050 public bool IsVariation
3051 {
3052 get
3053 {
3054 return this.sourceCard.origin != null;
3055 }
3056 }
3057
3058 // Token: 0x17000574 RID: 1396
3059 // (get) Token: 0x060012D1 RID: 4817 RVA: 0x000799B6 File Offset: 0x00077BB6
3060 public virtual int DV
3061 {
3062 get
3063 {
3064 return this.elements.Value(64);
3065 }
3066 }
3067
3068 // Token: 0x17000575 RID: 1397
3069 // (get) Token: 0x060012D2 RID: 4818 RVA: 0x000799C5 File Offset: 0x00077BC5
3070 public virtual int PV
3071 {
3072 get
3073 {
3074 return this.elements.Value(65);
3075 }
3076 }
3077
3078 // Token: 0x17000576 RID: 1398
3079 // (get) Token: 0x060012D3 RID: 4819 RVA: 0x000799D4 File Offset: 0x00077BD4
3080 public int HIT
3081 {
3082 get
3083 {
3084 return this.elements.Value(66);
3085 }
3086 }
3087
3088 // Token: 0x17000577 RID: 1399
3089 // (get) Token: 0x060012D4 RID: 4820 RVA: 0x000799E3 File Offset: 0x00077BE3
3090 public int DMG
3091 {
3092 get
3093 {
3094 return this.elements.Value(67);
3095 }
3096 }
3097
3098 // Token: 0x17000578 RID: 1400
3099 // (get) Token: 0x060012D5 RID: 4821 RVA: 0x000799F2 File Offset: 0x00077BF2
3100 public int STR
3101 {
3102 get
3103 {
3104 return this.elements.Value(70);
3105 }
3106 }
3107
3108 // Token: 0x17000579 RID: 1401
3109 // (get) Token: 0x060012D6 RID: 4822 RVA: 0x00079A01 File Offset: 0x00077C01
3110 public int DEX
3111 {
3112 get
3113 {
3114 return this.elements.Value(72);
3115 }
3116 }
3117
3118 // Token: 0x1700057A RID: 1402
3119 // (get) Token: 0x060012D7 RID: 4823 RVA: 0x00079A10 File Offset: 0x00077C10
3120 public int END
3121 {
3122 get
3123 {
3124 return this.elements.Value(71);
3125 }
3126 }
3127
3128 // Token: 0x1700057B RID: 1403
3129 // (get) Token: 0x060012D8 RID: 4824 RVA: 0x00079A1F File Offset: 0x00077C1F
3130 public int PER
3131 {
3132 get
3133 {
3134 return this.elements.Value(73);
3135 }
3136 }
3137
3138 // Token: 0x1700057C RID: 1404
3139 // (get) Token: 0x060012D9 RID: 4825 RVA: 0x00079A2E File Offset: 0x00077C2E
3140 public int LER
3141 {
3142 get
3143 {
3144 return this.elements.Value(74);
3145 }
3146 }
3147
3148 // Token: 0x1700057D RID: 1405
3149 // (get) Token: 0x060012DA RID: 4826 RVA: 0x00079A3D File Offset: 0x00077C3D
3150 public int WIL
3151 {
3152 get
3153 {
3154 return this.elements.Value(75);
3155 }
3156 }
3157
3158 // Token: 0x1700057E RID: 1406
3159 // (get) Token: 0x060012DB RID: 4827 RVA: 0x00079A4C File Offset: 0x00077C4C
3160 public int MAG
3161 {
3162 get
3163 {
3164 return this.elements.Value(76);
3165 }
3166 }
3167
3168 // Token: 0x1700057F RID: 1407
3169 // (get) Token: 0x060012DC RID: 4828 RVA: 0x00079A5B File Offset: 0x00077C5B
3170 public int CHA
3171 {
3172 get
3173 {
3174 return this.elements.Value(77);
3175 }
3176 }
3177
3178 // Token: 0x17000580 RID: 1408
3179 // (get) Token: 0x060012DD RID: 4829 RVA: 0x00079A6A File Offset: 0x00077C6A
3180 public int INT
3181 {
3182 get
3183 {
3184 return this.elements.Value(80);
3185 }
3186 }
3187
3188 // Token: 0x17000581 RID: 1409
3189 // (get) Token: 0x060012DE RID: 4830 RVA: 0x00079A79 File Offset: 0x00077C79
3190 public int LUC
3191 {
3192 get
3193 {
3194 return this.elements.Value(78);
3195 }
3196 }
3197
3198 // Token: 0x060012DF RID: 4831 RVA: 0x00079A88 File Offset: 0x00077C88
3199 public int GetBestAttribute()
3200 {
3201 int num = 1;
3202 foreach (Element element in from a in this.elements.dict.Values
3203 where Element.List_MainAttributesMajor.Contains(a.id)
3204 select a)
3205 {
3206 int num2 = element.Value;
3207 if (this.isChara && this.Chara.tempElements != null)
3208 {
3209 num2 -= this.Chara.tempElements.Value(element.id);
3210 }
3211 if (num2 > num)
3212 {
3213 num = num2;
3214 }
3215 }
3216 return num;
3217 }
3218
3219 // Token: 0x060012E0 RID: 4832 RVA: 0x00079B3C File Offset: 0x00077D3C
3220 public void ModExp(string alias, int a)
3221 {
3222 this.ModExp(EClass.sources.elements.alias[alias].id, a);
3223 }
3224
3225 // Token: 0x060012E1 RID: 4833 RVA: 0x00079B5F File Offset: 0x00077D5F
3226 public void ModExp(int ele, int a)
3227 {
3228 if (!this.isChara)
3229 {
3230 return;
3231 }
3232 this.elements.ModExp(ele, a, false);
3233 }
3234
3235 // Token: 0x17000582 RID: 1410
3236 // (get) Token: 0x060012E2 RID: 4834 RVA: 0x00079B78 File Offset: 0x00077D78
3237 public int W
3238 {
3239 get
3240 {
3241 if (this.dir % 2 != 0)
3242 {
3243 return this.sourceCard.H;
3244 }
3245 return this.sourceCard.W;
3246 }
3247 }
3248
3249 // Token: 0x17000583 RID: 1411
3250 // (get) Token: 0x060012E3 RID: 4835 RVA: 0x00079B9B File Offset: 0x00077D9B
3251 public int H
3252 {
3253 get
3254 {
3255 if (this.dir % 2 != 0)
3256 {
3257 return this.sourceCard.W;
3258 }
3259 return this.sourceCard.H;
3260 }
3261 }
3262
3263 // Token: 0x17000584 RID: 1412
3264 // (get) Token: 0x060012E4 RID: 4836 RVA: 0x00079BBE File Offset: 0x00077DBE
3265 public bool IsIdentified
3266 {
3267 get
3268 {
3269 return this.c_IDTState == 0;
3270 }
3271 }
3272
3273 // Token: 0x17000585 RID: 1413
3274 // (get) Token: 0x060012E5 RID: 4837 RVA: 0x00079BC9 File Offset: 0x00077DC9
3275 public string TextRarity
3276 {
3277 get
3278 {
3279 return Lang.GetList("quality")[Mathf.Clamp((int)(this.rarity + 1), 0, 5)];
3280 }
3281 }
3282
3283 // Token: 0x17000586 RID: 1414
3284 // (get) Token: 0x060012E6 RID: 4838 RVA: 0x00079BE5 File Offset: 0x00077DE5
3285 public bool IsInstalled
3286 {
3287 get
3288 {
3289 return this.placeState == PlaceState.installed;
3290 }
3291 }
3292
3293 // Token: 0x17000587 RID: 1415
3294 // (get) Token: 0x060012E7 RID: 4839 RVA: 0x00079BF0 File Offset: 0x00077DF0
3295 public bool IsMale
3296 {
3297 get
3298 {
3299 return this.bio != null && this.bio.gender == 2;
3300 }
3301 }
3302
3303 // Token: 0x17000588 RID: 1416
3304 // (get) Token: 0x060012E8 RID: 4840 RVA: 0x00079C0A File Offset: 0x00077E0A
3305 public bool IsNegativeGift
3306 {
3307 get
3308 {
3309 return this.HasTag(CTAG.neg) || this.blessedState <= BlessedState.Cursed;
3310 }
3311 }
3312
3313 // Token: 0x060012E9 RID: 4841 RVA: 0x00079C24 File Offset: 0x00077E24
3314 public bool IsChildOf(Card c)
3315 {
3316 return this.GetRootCard() == c;
3317 }
3318
3319 // Token: 0x17000589 RID: 1417
3320 // (get) Token: 0x060012EA RID: 4842 RVA: 0x00079C2F File Offset: 0x00077E2F
3321 public bool HasContainerSize
3322 {
3323 get
3324 {
3325 return this.c_containerSize != 0;
3326 }
3327 }
3328
3329 // Token: 0x1700058A RID: 1418
3330 // (get) Token: 0x060012EB RID: 4843 RVA: 0x00079C3A File Offset: 0x00077E3A
3331 public Thing Tool
3332 {
3333 get
3334 {
3335 if (!this.IsPC)
3336 {
3337 return null;
3338 }
3339 return EClass.player.currentHotItem.Thing;
3340 }
3341 }
3342
3343 // Token: 0x1700058B RID: 1419
3344 // (get) Token: 0x060012EC RID: 4844 RVA: 0x00079C55 File Offset: 0x00077E55
3345 public virtual SourceMaterial.Row DefaultMaterial
3346 {
3347 get
3348 {
3349 return this.sourceCard.DefaultMaterial;
3350 }
3351 }
3352
3353 // Token: 0x1700058C RID: 1420
3354 // (get) Token: 0x060012ED RID: 4845 RVA: 0x00079C62 File Offset: 0x00077E62
3355 public virtual bool HasHost
3356 {
3357 get
3358 {
3359 return false;
3360 }
3361 }
3362
3363 // Token: 0x060012EE RID: 4846 RVA: 0x00079C68 File Offset: 0x00077E68
3364 [OnSerializing]
3365 private void _OnSerializing(StreamingContext context)
3366 {
3367 this._x = this.pos.x;
3368 this._z = this.pos.z;
3369 this._ints[0] = this._bits1.ToInt();
3370 this._ints[2] = this._bits2.ToInt();
3371 this._placeState = this.placeState;
3372 this.OnSerializing();
3373 }
3374
3375 // Token: 0x060012EF RID: 4847 RVA: 0x00079CCF File Offset: 0x00077ECF
3376 protected virtual void OnSerializing()
3377 {
3378 }
3379
3380 // Token: 0x060012F0 RID: 4848 RVA: 0x00079CD4 File Offset: 0x00077ED4
3381 [OnDeserialized]
3382 private void _OnDeserialized(StreamingContext context)
3383 {
3384 this._bits1.SetInt(this._ints[0]);
3385 this._bits2.SetInt(this._ints[2]);
3386 this.placeState = this._placeState;
3387 this.pos.Set(this._x, this._z);
3388 this.SetSource();
3389 this.things.SetOwner(this);
3390 this.elements.SetOwner(this, false);
3391 this.ApplyMaterialElements(false);
3392 this.OnDeserialized();
3393 this.ApplyTrait();
3394 this._CreateRenderer();
3395 foreach (Thing thing in this.things)
3396 {
3397 thing.parent = this;
3398 }
3399 if (this.isThing && this.Num <= 0)
3400 {
3401 this.isDestroyed = true;
3402 }
3403 }
3404
3405 // Token: 0x060012F1 RID: 4849 RVA: 0x00079DC0 File Offset: 0x00077FC0
3406 protected virtual void OnDeserialized()
3407 {
3408 }
3409
3410 // Token: 0x060012F2 RID: 4850 RVA: 0x00079DC4 File Offset: 0x00077FC4
3411 public string ReferenceId()
3412 {
3413 return "c" + this.uid.ToString();
3414 }
3415
3416 // Token: 0x060012F3 RID: 4851 RVA: 0x00079DEC File Offset: 0x00077FEC
3417 public void Create(string _id, int _idMat = -1, int genLv = -1)
3418 {
3419 if (CardBlueprint.current != null)
3420 {
3421 this.bp = CardBlueprint.current;
3422 CardBlueprint.current = null;
3423 }
3424 else
3425 {
3426 this.bp = CardBlueprint._Default;
3427 }
3428 this.id = _id;
3429 this.Num = 1;
3430 this.autoRefuel = true;
3431 EClass.game.cards.AssignUID(this);
3432 this.isNew = true;
3433 this.SetSource();
3434 this.OnBeforeCreate();
3435 if (this.sourceCard.quality != 0)
3436 {
3437 this.rarity = this.sourceCard.quality.ToEnum<Rarity>();
3438 }
3439 else if (this.bp.rarity != Rarity.Random)
3440 {
3441 this.rarity = this.bp.rarity;
3442 }
3443 else if (this.category.slot != 0 && this.category.slot != 45 && this.category.slot != 44)
3444 {
3445 if (EClass.rnd(10) == 0)
3446 {
3447 this.rarity = Rarity.Crude;
3448 }
3449 else if (EClass.rnd(10) == 0)
3450 {
3451 this.rarity = Rarity.Superior;
3452 }
3453 else if (EClass.rnd(80) == 0)
3454 {
3455 this.rarity = Rarity.Legendary;
3456 }
3457 else if (EClass.rnd(250) == 0)
3458 {
3459 this.rarity = Rarity.Mythical;
3460 }
3461 }
3462 if (this.rarity != Rarity.Normal && this.category.tag.Contains("fixedRarity"))
3463 {
3464 this.rarity = Rarity.Normal;
3465 }
3466 this.LV = this.DefaultLV;
3467 if (this.bp.lv != -999)
3468 {
3469 this.LV = this.bp.lv;
3470 }
3471 if (this.sourceCard.fixedMaterial)
3472 {
3473 this._material = EClass.sources.materials.alias[this.AliasMaterialOnCreate];
3474 }
3475 else
3476 {
3477 bool flag = (this.bp != null && this.bp.fixedMat) || this.sourceCard.quality == 4 || this.sourceCard.tierGroup.IsEmpty();
3478 if (_idMat != -1)
3479 {
3480 this._material = EClass.sources.materials.rows[_idMat];
3481 }
3482 else if (!flag)
3483 {
3484 if (this.sourceCard.tierGroup == "wood")
3485 {
3486 Debug.Log(this.id);
3487 }
3488 this._material = MATERIAL.GetRandomMaterial(genLv, this.sourceCard.tierGroup, this.bp.tryLevelMatTier);
3489 }
3490 else
3491 {
3492 this._material = EClass.sources.materials.alias[this.AliasMaterialOnCreate];
3493 }
3494 }
3495 this.idMaterial = this._material.id;
3496 this.things.SetOwner(this);
3497 this.elements.SetOwner(this, true);
3498 this.ApplyTrait();
3499 if (!this.bp.fixedQuality && this.trait.LevelAsQuality && (!EClass._zone.IsPCFaction || EClass.Branch.lv != 1) && EClass.debug.testThingQuality && EClass.rnd(2) == 0)
3500 {
3501 this.qualityTier = Mathf.Clamp(EClass.rnd(5) + 1, 1, 3);
3502 this.LV = this.LV + this.qualityTier * 10 + (this.LV - 1) * (125 + this.qualityTier * 25) / 100;
3503 }
3504 this.ApplyMaterial(false);
3505 this.OnCreate(genLv);
3506 this._CreateRenderer();
3507 this.trait.OnCreate(genLv);
3508 this.hp = this.MaxHP;
3509 if (this.HasTag(CTAG.hidden))
3510 {
3511 this.SetHidden(true);
3512 }
3513 this.isFloating = this.Pref.Float;
3514 }
3515
3516 // Token: 0x060012F4 RID: 4852 RVA: 0x0007A169 File Offset: 0x00078369
3517 public virtual void OnBeforeCreate()
3518 {
3519 }
3520
3521 // Token: 0x060012F5 RID: 4853 RVA: 0x0007A16B File Offset: 0x0007836B
3522 public virtual void OnCreate(int genLv)
3523 {
3524 }
3525
3526 // Token: 0x060012F6 RID: 4854 RVA: 0x0007A16D File Offset: 0x0007836D
3527 public virtual void SetSource()
3528 {
3529 }
3530
3531 // Token: 0x060012F7 RID: 4855 RVA: 0x0007A170 File Offset: 0x00078370
3532 public virtual void ApplyEditorTags(EditorTag tag)
3533 {
3534 if (tag <= EditorTag.IsOn)
3535 {
3536 if (tag == EditorTag.Empty)
3537 {
3538 this.RemoveThings();
3539 return;
3540 }
3541 if (tag == EditorTag.Hidden)
3542 {
3543 this.SetHidden(true);
3544 return;
3545 }
3546 if (tag != EditorTag.IsOn)
3547 {
3548 return;
3549 }
3550 this.isOn = true;
3551 return;
3552 }
3553 else
3554 {
3555 if (tag == EditorTag.IsOff)
3556 {
3557 this.isOn = false;
3558 return;
3559 }
3560 if (tag == EditorTag.NoSnow)
3561 {
3562 this.noSnow = true;
3563 return;
3564 }
3565 if (tag != EditorTag.Boss)
3566 {
3567 return;
3568 }
3569 EClass._zone.Boss = this.Chara;
3570 return;
3571 }
3572 }
3573
3574 // Token: 0x060012F8 RID: 4856 RVA: 0x0007A1D8 File Offset: 0x000783D8
3575 public void ApplyTrait()
3576 {
3577 string c_idTrait = this.c_idTrait;
3578 if (c_idTrait.IsEmpty())
3579 {
3580 if (this.sourceCard.trait.IsEmpty())
3581 {
3582 this.trait = (this.isChara ? new TraitChara() : new Trait());
3583 }
3584 else
3585 {
3586 this.trait = ClassCache.Create<Trait>("Trait" + this.sourceCard.trait[0], "Elin");
3587 }
3588 }
3589 else
3590 {
3591 this.trait = ClassCache.Create<Trait>(c_idTrait, "Elin");
3592 }
3593 this.trait.SetOwner(this);
3594 }
3595
3596 // Token: 0x060012F9 RID: 4857 RVA: 0x0007A268 File Offset: 0x00078468
3597 public Card SetLv(int a)
3598 {
3599 this.LV = a;
3600 if (!this.isChara)
3601 {
3602 return this;
3603 }
3604 Rand.SetSeed(this.uid);
3605 ElementContainer elementContainer = new ElementContainer();
3606 elementContainer.ApplyElementMap(this.uid, SourceValueType.Chara, this.Chara.job.elementMap, this.LV, false, false);
3607 elementContainer.ApplyElementMap(this.uid, SourceValueType.Chara, this.Chara.race.elementMap, this.LV, false, false);
3608 elementContainer.ApplyElementMap(this.uid, SourceValueType.Chara, this.Chara.source.elementMap, 1, false, true);
3609 foreach (Element element in this.elements.dict.Values)
3610 {
3611 int num = elementContainer.Value(element.id);
3612 if (num != 0)
3613 {
3614 int num2 = num - element.ValueWithoutLink;
3615 if (num2 != 0)
3616 {
3617 this.elements.ModBase(element.id, num2);
3618 }
3619 }
3620 }
3621 Rand.SetSeed(-1);
3622 this.hp = this.MaxHP;
3623 this.Chara.mana.value = this.Chara.mana.max;
3624 this.Chara.CalculateMaxStamina();
3625 this.SetDirtyWeight();
3626 return this;
3627 }
3628
3629 // Token: 0x060012FA RID: 4858 RVA: 0x0007A3C0 File Offset: 0x000785C0
3630 public void AddExp(int a)
3631 {
3632 if (!this.IsPC)
3633 {
3634 a *= 2;
3635 }
3636 this.exp += a;
3637 while (this.exp >= this.ExpToNext)
3638 {
3639 this.exp -= this.ExpToNext;
3640 this.LevelUp();
3641 }
3642 }
3643
3644 // Token: 0x060012FB RID: 4859 RVA: 0x0007A414 File Offset: 0x00078614
3645 public void LevelUp()
3646 {
3647 if (this.IsPC)
3648 {
3649 if (EClass.core.version.demo && EClass.player.totalFeat >= 5)
3650 {
3651 Msg.Say("demoLimit");
3652 return;
3653 }
3654 EClass.player.totalFeat++;
3655 Tutorial.Reserve("feat", null);
3656 }
3657 int num = this.feat;
3658 this.feat = num + 1;
3659 num = this.LV;
3660 this.LV = num + 1;
3661 this.Say("dingExp", this, null, null);
3662 this.PlaySound("jingle_lvup", 1f, true);
3663 this.PlayEffect("aura_heaven", true, 0f, default(Vector3));
3664 if (this.HasElement(1415, 1) && this.Evalue(1415) < 9 && this.LV >= this.Evalue(1415) * 5 + 10)
3665 {
3666 this.Chara.SetFeat(1415, this.Evalue(1415) + 1, true);
3667 }
3668 if (!this.IsPC)
3669 {
3670 if (this.Chara.race.id == "mutant")
3671 {
3672 int num2 = Mathf.Min(1 + this.LV / 5, 22);
3673 for (int i = 0; i < num2; i++)
3674 {
3675 if (this.Evalue(1644) < i + 1)
3676 {
3677 this.Chara.SetFeat(1644, i + 1, false);
3678 }
3679 }
3680 }
3681 this.Chara.TryUpgrade(true);
3682 }
3683 }
3684
3685 // Token: 0x060012FC RID: 4860 RVA: 0x0007A590 File Offset: 0x00078790
3686 public virtual void ApplyMaterialElements(bool remove)
3687 {
3688 }
3689
3690 // Token: 0x060012FD RID: 4861 RVA: 0x0007A592 File Offset: 0x00078792
3691 public virtual void ApplyMaterial(bool remove = false)
3692 {
3693 this._colorInt = 0;
3694 }
3695
3696 // Token: 0x060012FE RID: 4862 RVA: 0x0007A59B File Offset: 0x0007879B
3697 public Card ChangeMaterial(int idNew)
3698 {
3699 return this.ChangeMaterial(EClass.sources.materials.map[idNew]);
3700 }
3701
3702 // Token: 0x060012FF RID: 4863 RVA: 0x0007A5B8 File Offset: 0x000787B8
3703 public Card ChangeMaterial(string idNew)
3704 {
3705 return this.ChangeMaterial(EClass.sources.materials.alias[idNew]);
3706 }
3707
3708 // Token: 0x06001300 RID: 4864 RVA: 0x0007A5D8 File Offset: 0x000787D8
3709 public Card ChangeMaterial(SourceMaterial.Row row)
3710 {
3711 if (this.sourceCard.fixedMaterial)
3712 {
3713 return this;
3714 }
3715 this.ApplyMaterial(true);
3716 this._material = row;
3717 this.idMaterial = row.id;
3718 this.decay = 0;
3719 this.dirtyWeight = true;
3720 Card rootCard = this.GetRootCard();
3721 if (rootCard != null && rootCard.IsPC)
3722 {
3723 this.GetRootCard().SetDirtyWeight();
3724 }
3725 if (this.isThing)
3726 {
3727 LayerInventory.SetDirty(this.Thing);
3728 }
3729 this.ApplyMaterial(false);
3730 return this;
3731 }
3732
3733 // Token: 0x06001301 RID: 4865 RVA: 0x0007A656 File Offset: 0x00078856
3734 public void SetReplica(bool on)
3735 {
3736 this.isReplica = true;
3737 this.ChangeMaterial("granite");
3738 }
3739
3740 // Token: 0x06001302 RID: 4866 RVA: 0x0007A66B File Offset: 0x0007886B
3741 public Thing Add(string id, int num = 1, int lv = 1)
3742 {
3743 if (num == 0)
3744 {
3745 num = 1;
3746 }
3747 return this.AddCard(ThingGen.Create(id, -1, lv).SetNum(num)) as Thing;
3748 }
3749
3750 // Token: 0x06001303 RID: 4867 RVA: 0x0007A68C File Offset: 0x0007888C
3751 public Card AddCard(Card c)
3752 {
3753 return this.AddThing(c as Thing, true, -1, -1);
3754 }
3755
3756 // Token: 0x06001304 RID: 4868 RVA: 0x0007A69D File Offset: 0x0007889D
3757 public void RemoveCard(Card c)
3758 {
3759 this.RemoveThing(c as Thing);
3760 }
3761
3762 // Token: 0x06001305 RID: 4869 RVA: 0x0007A6AB File Offset: 0x000788AB
3763 public void NotifyAddThing(Thing t, int num)
3764 {
3765 }
3766
3767 // Token: 0x06001306 RID: 4870 RVA: 0x0007A6AD File Offset: 0x000788AD
3768 public Thing AddThing(string id, int lv = -1)
3769 {
3770 return this.AddThing(ThingGen.Create(id, -1, (lv == -1) ? this.LV : lv), true, -1, -1);
3771 }
3772
3773 // Token: 0x06001307 RID: 4871 RVA: 0x0007A6CC File Offset: 0x000788CC
3774 public Thing AddThing(Thing t, bool tryStack = true, int destInvX = -1, int destInvY = -1)
3775 {
3776 if (t.Num == 0 || t.isDestroyed)
3777 {
3778 Debug.LogWarning(string.Concat(new string[]
3779 {
3780 "tried to add destroyed thing:",
3781 t.Num.ToString(),
3782 "/",
3783 t.isDestroyed.ToString(),
3784 "/",
3785 (t != null) ? t.ToString() : null,
3786 "/",
3787 (this != null) ? this.ToString() : null
3788 }));
3789 return t;
3790 }
3791 if (t.parent == this)
3792 {
3793 Debug.LogWarning("already child:" + ((t != null) ? t.ToString() : null));
3794 return t;
3795 }
3796 if (this.things.Contains(t))
3797 {
3798 Debug.Log("already in the list" + ((t != null) ? t.ToString() : null));
3799 return t;
3800 }
3801 ICardParent cardParent = t.parent;
3802 Zone zone = EClass._zone;
3803 bool flag = this.IsPC && t.GetRootCard() == EClass.pc;
3804 if (t.parent != null)
3805 {
3806 t.parent.RemoveCard(t);
3807 }
3808 if (t.trait.ToggleType == ToggleType.Fire && destInvY == 0)
3809 {
3810 t.trait.Toggle(false, false);
3811 }
3812 t.isMasked = false;
3813 t.ignoreAutoPick = false;
3814 t.parent = this;
3815 t.noShadow = false;
3816 t.isSale = false;
3817 if (t.IsContainer)
3818 {
3819 t.RemoveEditorTag(EditorTag.PreciousContainer);
3820 }
3821 t.invX = -1;
3822 if (destInvY == -1)
3823 {
3824 t.invY = 0;
3825 }
3826 Thing thing = tryStack ? this.things.TryStack(t, destInvX, destInvY) : t;
3827 if (t == thing)
3828 {
3829 this.things.Add(t);
3830 this.things.OnAdd(t);
3831 }
3832 if (thing == t && this.IsPC && EClass.core.IsGameStarted && EClass._map != null && this.parent == EClass.game.activeZone && this.pos.IsValid && !flag)
3833 {
3834 this.NotifyAddThing(t, t.Num);
3835 }
3836 if (t == thing && this.isThing && this.parent == EClass._zone && this.placeState != PlaceState.roaming)
3837 {
3838 EClass._map.Stocked.Add(t);
3839 }
3840 this.SetDirtyWeight();
3841 if (this.ShouldTrySetDirtyInventory())
3842 {
3843 EClass.pc.SetDirtyWeight();
3844 LayerInventory.SetDirty(thing);
3845 }
3846 if (!this.IsPC)
3847 {
3848 if (!this.IsContainer)
3849 {
3850 return thing;
3851 }
3852 Card rootCard = this.GetRootCard();
3853 if (rootCard == null || !rootCard.IsPC)
3854 {
3855 return thing;
3856 }
3857 }
3858 Card.<>c__DisplayClass684_0 CS$<>8__locals1 = new Card.<>c__DisplayClass684_0();
3859 t.isNPCProperty = false;
3860 t.isGifted = false;
3861 CS$<>8__locals1.count = 0;
3862 CS$<>8__locals1.ings = EClass.player.recipes.knownIngredients;
3863 CS$<>8__locals1.<AddThing>g__TryAdd|0(t);
3864 if (t.CanSearchContents)
3865 {
3866 t.things.Foreach(delegate(Thing _t)
3867 {
3868 base.<AddThing>g__TryAdd|0(_t);
3869 }, true);
3870 }
3871 if (CS$<>8__locals1.count > 0 && EClass.core.IsGameStarted)
3872 {
3873 Msg.Say((CS$<>8__locals1.count == 1) ? "newIng" : "newIngs", CS$<>8__locals1.count.ToString() ?? "", null, null, null);
3874 }
3875 return thing;
3876 }
3877
3878 // Token: 0x06001308 RID: 4872 RVA: 0x0007A9E8 File Offset: 0x00078BE8
3879 public void RemoveThings()
3880 {
3881 for (int i = this.things.Count - 1; i >= 0; i--)
3882 {
3883 this.RemoveThing(this.things[i]);
3884 }
3885 }
3886
3887 // Token: 0x06001309 RID: 4873 RVA: 0x0007AA20 File Offset: 0x00078C20
3888 public void RemoveThing(Thing thing)
3889 {
3890 Chara chara = this.GetRootCard() as Chara;
3891 if (((chara != null) ? chara.held : null) == thing)
3892 {
3893 (this.GetRootCard() as Chara).held = null;
3894 this.RecalculateFOV();
3895 }
3896 this.dirtyWeight = true;
3897 if (thing.c_equippedSlot != 0 && this.isChara)
3898 {
3899 this.Chara.body.Unequip(thing, true);
3900 }
3901 this.things.Remove(thing);
3902 this.things.OnRemove(thing);
3903 if (this.isSale && this.things.Count == 0 && this.IsContainer)
3904 {
3905 this.isSale = false;
3906 EClass._map.props.sales.Remove(this);
3907 }
3908 if (thing.invY == 1)
3909 {
3910 WidgetCurrentTool.dirty = true;
3911 }
3912 thing.invX = -1;
3913 thing.invY = 0;
3914 if (thing.props != null)
3915 {
3916 thing.props.Remove(thing);
3917 }
3918 this.SetDirtyWeight();
3919 if (this.ShouldTrySetDirtyInventory())
3920 {
3921 LayerInventory.SetDirty(thing);
3922 WidgetHotbar.dirtyCurrentItem = true;
3923 thing.parent = null;
3924 if (thing.trait.IsContainer)
3925 {
3926 foreach (LayerInventory layerInventory in LayerInventory.listInv.Copy<LayerInventory>())
3927 {
3928 if (layerInventory.invs[0].owner.Container.GetRootCard() != EClass.pc && layerInventory.floatInv)
3929 {
3930 EClass.ui.layerFloat.RemoveLayer(layerInventory);
3931 }
3932 }
3933 }
3934 }
3935 thing.parent = null;
3936 }
3937
3938 // Token: 0x0600130A RID: 4874 RVA: 0x0007ABBC File Offset: 0x00078DBC
3939 public bool ShouldTrySetDirtyInventory()
3940 {
3941 return EClass.player.chara != null && (this.IsPC || this.GetRootCard() == EClass.pc || EClass.ui.layers.Count > 0);
3942 }
3943
3944 // Token: 0x0600130B RID: 4875 RVA: 0x0007ABF5 File Offset: 0x00078DF5
3945 public virtual bool CanStackTo(Thing to)
3946 {
3947 return false;
3948 }
3949
3950 // Token: 0x0600130C RID: 4876 RVA: 0x0007ABF8 File Offset: 0x00078DF8
3951 public bool TryStackTo(Thing to)
3952 {
3953 if (!this.CanStackTo(to))
3954 {
3955 return false;
3956 }
3957 to.ModNum(this.Num, true);
3958 to.decay = (to.decay * to.Num + this.decay * this.Num) / (to.Num + this.Num);
3959 if (this.c_isImportant)
3960 {
3961 to.c_isImportant = true;
3962 }
3963 if (EClass.core.config.game.markStack && to.GetRootCard() == EClass.pc)
3964 {
3965 to.isNew = true;
3966 }
3967 this.Destroy();
3968 return true;
3969 }
3970
3971 // Token: 0x0600130D RID: 4877 RVA: 0x0007AC8C File Offset: 0x00078E8C
3972 public ICardParent GetRoot()
3973 {
3974 if (this.parent == null)
3975 {
3976 return this;
3977 }
3978 return this.parent.GetRoot();
3979 }
3980
3981 // Token: 0x0600130E RID: 4878 RVA: 0x0007ACA4 File Offset: 0x00078EA4
3982 public Card GetRootCard()
3983 {
3984 Card card = this.parent as Card;
3985 if (card == null)
3986 {
3987 return this;
3988 }
3989 return card.GetRootCard();
3990 }
3991
3992 // Token: 0x0600130F RID: 4879 RVA: 0x0007ACC8 File Offset: 0x00078EC8
3993 public bool IsStackable(Thing tg)
3994 {
3995 return !(this.id != tg.id) && this.material == tg.material;
3996 }
3997
3998 // Token: 0x06001310 RID: 4880 RVA: 0x0007ACF0 File Offset: 0x00078EF0
3999 public Thing Duplicate(int num)
4000 {
4001 Thing thing = ThingGen.Create(this.id, -1, -1);
4002 thing.ChangeMaterial(this.idMaterial);
4003 thing._bits1 = this._bits1;
4004 thing._bits2 = this._bits2;
4005 thing.dir = this.dir;
4006 thing.refVal = this.refVal;
4007 thing.altitude = this.altitude;
4008 thing.idSkin = this.idSkin;
4009 thing.blessedState = this.blessedState;
4010 thing.rarityLv = this.rarityLv;
4011 thing.qualityTier = this.qualityTier;
4012 thing.LV = this.LV;
4013 thing.exp = this.exp;
4014 thing.encLV = this.encLV;
4015 thing.decay = this.decay;
4016 thing.mapInt.Clear();
4017 thing.mapStr.Clear();
4018 foreach (KeyValuePair<int, int> keyValuePair in this.mapInt)
4019 {
4020 thing.mapInt[keyValuePair.Key] = keyValuePair.Value;
4021 }
4022 foreach (KeyValuePair<int, string> keyValuePair2 in this.mapStr)
4023 {
4024 thing.mapStr[keyValuePair2.Key] = keyValuePair2.Value;
4025 }
4026 this.elements.CopyTo(thing.elements);
4027 thing.SetNum(num);
4028 if (thing.IsRangedWeapon)
4029 {
4030 thing.sockets = IO.DeepCopy<List<int>>(this.sockets);
4031 }
4032 return thing;
4033 }
4034
4035 // Token: 0x06001311 RID: 4881 RVA: 0x0007AEAC File Offset: 0x000790AC
4036 public Thing Split(int a)
4037 {
4038 if (a == this.Num)
4039 {
4040 return this.Thing;
4041 }
4042 Thing result = this.Duplicate(a);
4043 this.ModNum(-a, false);
4044 return result;
4045 }
4046
4047 // Token: 0x06001312 RID: 4882 RVA: 0x0007AECE File Offset: 0x000790CE
4048 public Thing SetNum(int a)
4049 {
4050 if (!this.isThing)
4051 {
4052 return null;
4053 }
4054 if (a == this.Num)
4055 {
4056 return this as Thing;
4057 }
4058 this.ModNum(a - this.Num, true);
4059 return this as Thing;
4060 }
4061
4062 // Token: 0x06001313 RID: 4883 RVA: 0x0007AEFF File Offset: 0x000790FF
4063 public Thing SetNoSell()
4064 {
4065 this.noSell = true;
4066 return this as Thing;
4067 }
4068
4069 // Token: 0x06001314 RID: 4884 RVA: 0x0007AF10 File Offset: 0x00079110
4070 public void ModNum(int a, bool notify = true)
4071 {
4072 if (this.Num + a < 0)
4073 {
4074 a = -this.Num;
4075 }
4076 this.Num += a;
4077 if (this.props != null)
4078 {
4079 this.props.OnNumChange(this, a);
4080 }
4081 if (this.parent != null)
4082 {
4083 this.parent.OnChildNumChange(this);
4084 }
4085 if (a > 0 && EClass.core.IsGameStarted && this.GetRootCard() == EClass.pc && notify)
4086 {
4087 this.NotifyAddThing(this.Thing, a);
4088 }
4089 this.SetDirtyWeight();
4090 if (this.Num <= 0)
4091 {
4092 this.Destroy();
4093 }
4094 }
4095
4096 // Token: 0x06001315 RID: 4885 RVA: 0x0007AFAE File Offset: 0x000791AE
4097 public void AddSocket()
4098 {
4099 if (this.sockets == null)
4100 {
4101 this.sockets = new List<int>();
4102 }
4103 this.sockets.Add(0);
4104 }
4105
4106 // Token: 0x06001316 RID: 4886 RVA: 0x0007AFD0 File Offset: 0x000791D0
4107 public void ApplySocket(Thing t)
4108 {
4109 TraitMod traitMod = t.trait as TraitMod;
4110 if (traitMod == null || this.sockets == null)
4111 {
4112 return;
4113 }
4114 this.ApplySocket(traitMod.source.id, traitMod.owner.encLV, traitMod.owner);
4115 }
4116
4117 // Token: 0x06001317 RID: 4887 RVA: 0x0007B018 File Offset: 0x00079218
4118 public void ApplySocket(int id, int lv, Card mod = null)
4119 {
4120 int i = 0;
4121 while (i < this.sockets.Count)
4122 {
4123 if (this.sockets[i] == 0)
4124 {
4125 if (lv >= 100)
4126 {
4127 lv = 99;
4128 }
4129 this.sockets[i] = id * 100 + lv;
4130 this.elements.ModBase(id, lv);
4131 if (mod != null)
4132 {
4133 mod.Destroy();
4134 return;
4135 }
4136 break;
4137 }
4138 else
4139 {
4140 i++;
4141 }
4142 }
4143 }
4144
4145 // Token: 0x06001318 RID: 4888 RVA: 0x0007B07C File Offset: 0x0007927C
4146 public void EjectSockets()
4147 {
4148 for (int i = 0; i < this.sockets.Count; i++)
4149 {
4150 int num = this.sockets[i];
4151 if (num != 0)
4152 {
4153 Thing thing = ThingGen.Create(this.isCopy ? "ash3" : "mod_ranged", -1, -1);
4154 int refVal = num / 100;
4155 int encLV = num % 100;
4156 if (!this.isCopy)
4157 {
4158 thing.refVal = refVal;
4159 thing.encLV = encLV;
4160 }
4161 EClass._map.TrySmoothPick(this.pos.IsBlocked ? EClass.pc.pos : this.pos, thing, EClass.pc);
4162 this.elements.ModBase(thing.refVal, -thing.encLV);
4163 this.sockets[i] = 0;
4164 }
4165 }
4166 }
4167
4168 // Token: 0x06001319 RID: 4889 RVA: 0x0007B14B File Offset: 0x0007934B
4169 public void OnChildNumChange(Card c)
4170 {
4171 if (this.ShouldTrySetDirtyInventory() && c.isThing)
4172 {
4173 LayerInventory.SetDirty(c.Thing);
4174 WidgetCurrentTool.RefreshCurrentHotItem();
4175 }
4176 }
4177
4178 // Token: 0x0600131A RID: 4890 RVA: 0x0007B16D File Offset: 0x0007936D
4179 public Card Install()
4180 {
4181 this.SetPlaceState(PlaceState.installed, false);
4182 return this;
4183 }
4184
4185 // Token: 0x0600131B RID: 4891 RVA: 0x0007B178 File Offset: 0x00079378
4186 public void SetPlaceState(PlaceState newState, bool byPlayer = false)
4187 {
4188 if (this.placeState == newState)
4189 {
4190 return;
4191 }
4192 if (this.parent != EClass._zone)
4193 {
4194 Debug.Log("tried to change placestate of non-root card:" + ((this != null) ? this.ToString() : null));
4195 return;
4196 }
4197 PlaceState placeState = this.placeState;
4198 Area area = this.pos.area;
4199 if (placeState == PlaceState.installed)
4200 {
4201 if (area != null)
4202 {
4203 area.OnUninstallCard(this);
4204 }
4205 if (!this.isRoofItem)
4206 {
4207 this.altitude = 0;
4208 this.freePos = false;
4209 this.fx = (this.fy = 0f);
4210 }
4211 this.trait.Uninstall();
4212 }
4213 if (placeState == PlaceState.installed || newState == PlaceState.installed)
4214 {
4215 this.ForeachPoint(delegate(Point p, bool main)
4216 {
4217 p.cell.RemoveCard(this);
4218 });
4219 this.placeState = newState;
4220 this.ForeachPoint(delegate(Point p, bool main)
4221 {
4222 p.cell.AddCard(this);
4223 });
4224 }
4225 else
4226 {
4227 this.placeState = newState;
4228 }
4229 if (newState == PlaceState.none)
4230 {
4231 this.placeState = PlaceState.roaming;
4232 if (this.props != null)
4233 {
4234 this.props.Remove(this);
4235 }
4236 }
4237 else
4238 {
4239 EClass._map.props.OnCardAddedToZone(this);
4240 if (this.placeState == PlaceState.installed)
4241 {
4242 if (this.isThing)
4243 {
4244 this.pos.detail.MoveThingToTop(this.Thing);
4245 }
4246 if (area != null)
4247 {
4248 area.OnInstallCard(this);
4249 }
4250 this.isRoofItem = false;
4251 this.trait.Install(byPlayer);
4252 }
4253 }
4254 if (this.trait.ShouldRefreshTile)
4255 {
4256 this.pos.RefreshNeighborTiles();
4257 }
4258 if (this.trait.ShouldTryRefreshRoom && (placeState == PlaceState.installed || this.placeState == PlaceState.installed))
4259 {
4260 EClass._map.OnSetBlockOrDoor(this.pos.x, this.pos.z);
4261 }
4262 this.trait.OnChangePlaceState(newState);
4263 if (EClass._zone.IsPCFaction)
4264 {
4265 EClass.Branch.resources.SetDirty();
4266 }
4267 }
4268
4269 // Token: 0x1700058D RID: 1421
4270 // (get) Token: 0x0600131C RID: 4892 RVA: 0x0007B339 File Offset: 0x00079539
4271 public int Quality
4272 {
4273 get
4274 {
4275 return this.Evalue(2);
4276 }
4277 }
4278
4279 // Token: 0x1700058E RID: 1422
4280 // (get) Token: 0x0600131D RID: 4893 RVA: 0x0007B342 File Offset: 0x00079542
4281 public int QualityLv
4282 {
4283 get
4284 {
4285 return this.Quality / 10;
4286 }
4287 }
4288
4289 // Token: 0x0600131E RID: 4894 RVA: 0x0007B350 File Offset: 0x00079550
4290 public int GetTotalQuality(bool applyBonus = true)
4291 {
4292 int num = 5 + this.LV + this.material.quality;
4293 if (applyBonus)
4294 {
4295 num = num * (100 + this.Quality) / 100;
4296 }
4297 return num;
4298 }
4299
4300 // Token: 0x0600131F RID: 4895 RVA: 0x0007B388 File Offset: 0x00079588
4301 public void ModEncLv(int a)
4302 {
4303 this.ApplyMaterialElements(true);
4304 this.encLV += a;
4305 this.ApplyMaterialElements(false);
4306 if (this.IsEquipmentOrRanged || this.IsAmmo)
4307 {
4308 if (this.IsWeapon || this.IsAmmo)
4309 {
4310 this.elements.ModBase(67, a);
4311 return;
4312 }
4313 this.elements.ModBase(65, a * 2);
4314 }
4315 }
4316
4317 // Token: 0x06001320 RID: 4896 RVA: 0x0007B3F2 File Offset: 0x000795F2
4318 public void SetEncLv(int a)
4319 {
4320 this.ModEncLv(a - this.encLV);
4321 }
4322
4323 // Token: 0x06001321 RID: 4897 RVA: 0x0007B404 File Offset: 0x00079604
4324 public virtual void SetBlessedState(BlessedState s)
4325 {
4326 int num = 0;
4327 if (s == BlessedState.Blessed && this.blessedState < BlessedState.Blessed)
4328 {
4329 num = 1;
4330 }
4331 if (s < BlessedState.Blessed && this.blessedState == BlessedState.Blessed)
4332 {
4333 num = -1;
4334 }
4335 if (num != 0 && (this.IsEquipmentOrRanged || this.IsAmmo))
4336 {
4337 if (this.IsWeapon || this.IsAmmo)
4338 {
4339 this.elements.ModBase(67, num);
4340 }
4341 else
4342 {
4343 this.elements.ModBase(65, num * 2);
4344 }
4345 }
4346 this.blessedState = s;
4347 }
4348
4349 // Token: 0x06001322 RID: 4898 RVA: 0x0007B47D File Offset: 0x0007967D
4350 public virtual void ChangeRarity(Rarity q)
4351 {
4352 this.rarity = q;
4353 }
4354
4355 // Token: 0x06001323 RID: 4899 RVA: 0x0007B488 File Offset: 0x00079688
4356 public bool TryPay(int a, string id = "money")
4357 {
4358 if (this.GetCurrency(id) < a)
4359 {
4360 if (this.IsPC)
4361 {
4362 SE.Beep();
4363 Msg.Say((id == "ration") ? "notEnoughFood" : "notEnoughMoney");
4364 }
4365 return false;
4366 }
4367 if (this.IsPC && !(id == "ration"))
4368 {
4369 SE.Pay();
4370 }
4371 this.ModCurrency(-a, id);
4372 return true;
4373 }
4374
4375 // Token: 0x06001324 RID: 4900 RVA: 0x0007B4F1 File Offset: 0x000796F1
4376 public void SetCharge(int a)
4377 {
4378 this.c_charges = a;
4379 LayerInventory.SetDirty(this.Thing);
4380 }
4381
4382 // Token: 0x06001325 RID: 4901 RVA: 0x0007B508 File Offset: 0x00079708
4383 public void ModCharge(int a, bool destroy = false)
4384 {
4385 this.c_charges += a;
4386 LayerInventory.SetDirty(this.Thing);
4387 if (this.c_charges <= 0 && destroy)
4388 {
4389 this.Say("spellbookCrumble", this, null, null);
4390 this.ModNum(-1, true);
4391 }
4392 }
4393
4394 // Token: 0x06001326 RID: 4902 RVA: 0x0007B554 File Offset: 0x00079754
4395 public void ModCurrency(int a, string id = "money")
4396 {
4397 if (a == 0)
4398 {
4399 return;
4400 }
4401 if (id == "influence")
4402 {
4403 EClass._zone.ModInfluence(a);
4404 return;
4405 }
4406 SourceMaterial.Row mat = null;
4407 this.things.AddCurrency(this, id, a, mat);
4408 }
4409
4410 // Token: 0x06001327 RID: 4903 RVA: 0x0007B590 File Offset: 0x00079790
4411 public int GetCurrency(string id = "money")
4412 {
4413 if (id == "influence")
4414 {
4415 return EClass._zone.influence;
4416 }
4417 int result = 0;
4418 SourceMaterial.Row mat = null;
4419 this.things.GetCurrency(id, ref result, mat);
4420 return result;
4421 }
4422
4423 // Token: 0x06001328 RID: 4904 RVA: 0x0007B5CC File Offset: 0x000797CC
4424 public virtual void HealHPHost(int a, HealSource origin = HealSource.None)
4425 {
4426 if (this.isChara)
4427 {
4428 if (this.Chara.parasite != null)
4429 {
4430 this.Chara.parasite.HealHP(a, HealSource.None);
4431 }
4432 if (this.Chara.ride != null)
4433 {
4434 this.Chara.ride.HealHP(a, HealSource.None);
4435 }
4436 }
4437 this.HealHP(a, origin);
4438 }
4439
4440 // Token: 0x06001329 RID: 4905 RVA: 0x0007B628 File Offset: 0x00079828
4441 public virtual void HealHP(int a, HealSource origin = HealSource.None)
4442 {
4443 this.hp += a;
4444 if (this.hp > this.MaxHP)
4445 {
4446 this.hp = this.MaxHP;
4447 }
4448 if (origin == HealSource.Magic)
4449 {
4450 this.PlaySound("heal", 1f, true);
4451 this.PlayEffect("heal", true, 0f, default(Vector3));
4452 return;
4453 }
4454 if (origin != HealSource.HOT)
4455 {
4456 return;
4457 }
4458 this.PlaySound("heal_tick", 1f, true);
4459 this.PlayEffect("heal_tick", true, 0f, default(Vector3));
4460 }
4461
4462 // Token: 0x0600132A RID: 4906 RVA: 0x0007B6C1 File Offset: 0x000798C1
4463 public virtual int GetArmorSkill()
4464 {
4465 return 0;
4466 }
4467
4468 // Token: 0x0600132B RID: 4907 RVA: 0x0007B6C4 File Offset: 0x000798C4
4469 public virtual int ApplyProtection(int dmg, int mod = 100)
4470 {
4471 int armorSkill = this.GetArmorSkill();
4472 Element orCreateElement = this.elements.GetOrCreateElement(armorSkill);
4473 int num = this.PV + orCreateElement.Value + this.DEX / 10;
4474 int num2 = 1;
4475 int sides = 1;
4476 int bonus = 0;
4477 if (num > 0)
4478 {
4479 int num3 = num / 4;
4480 num2 = num3 / 10 + 1;
4481 sides = num3 / num2 + 1;
4482 bonus = 0;
4483 dmg = dmg * 100 / (100 + num);
4484 }
4485 int num4 = Dice.Roll(num2, sides, bonus, this);
4486 dmg -= num4 * mod / 100;
4487 if (dmg < 0)
4488 {
4489 dmg = 0;
4490 }
4491 return dmg;
4492 }
4493
4494 // Token: 0x0600132C RID: 4908 RVA: 0x0007B747 File Offset: 0x00079947
4495 public void DamageHP(int dmg, AttackSource attackSource = AttackSource.None, Card origin = null)
4496 {
4497 this.DamageHP(dmg, 0, 0, attackSource, origin, true);
4498 }
4499
4500 // Token: 0x0600132D RID: 4909 RVA: 0x0007B758 File Offset: 0x00079958
4501 public void DamageHP(int dmg, int ele, int eleP = 100, AttackSource attackSource = AttackSource.None, Card origin = null, bool showEffect = true)
4502 {
4503 Card.<>c__DisplayClass724_0 CS$<>8__locals1 = new Card.<>c__DisplayClass724_0();
4504 CS$<>8__locals1.<>4__this = this;
4505 CS$<>8__locals1.dmg = dmg;
4506 CS$<>8__locals1.origin = origin;
4507 if (this.hp < 0)
4508 {
4509 return;
4510 }
4511 if (ele == 0)
4512 {
4513 CS$<>8__locals1.e = Element.Void;
4514 }
4515 else
4516 {
4517 CS$<>8__locals1.e = Element.Create(ele, 0);
4518 if (attackSource != AttackSource.Condition && showEffect)
4519 {
4520 ActEffect.TryDelay(delegate
4521 {
4522 CS$<>8__locals1.<>4__this.PlayEffect(CS$<>8__locals1.e.id, true, 0.25f);
4523 EClass.Sound.Play("atk_" + CS$<>8__locals1.e.source.alias);
4524 });
4525 }
4526 if (!CS$<>8__locals1.e.source.aliasRef.IsEmpty())
4527 {
4528 CS$<>8__locals1.dmg = Element.GetResistDamage(CS$<>8__locals1.dmg, this.Evalue(CS$<>8__locals1.e.source.aliasRef));
4529 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 100 / (100 + Mathf.Clamp(this.Evalue(961) * 5, -50, 200));
4530 }
4531 int dmg2 = CS$<>8__locals1.e.id;
4532 if (dmg2 != 910)
4533 {
4534 if (dmg2 == 912)
4535 {
4536 Chara chara = this.Chara;
4537 if (chara != null && chara.isWet)
4538 {
4539 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 150 / 100;
4540 }
4541 }
4542 }
4543 else
4544 {
4545 Chara chara2 = this.Chara;
4546 if (chara2 != null && chara2.isWet)
4547 {
4548 CS$<>8__locals1.dmg /= 3;
4549 }
4550 }
4551 }
4552 if (attackSource != AttackSource.Finish)
4553 {
4554 if (!this.IsPCFaction && this.LV > 50)
4555 {
4556 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * (100 - (int)Mathf.Min(80f, Mathf.Sqrt((float)(this.LV - 50)) * 2.5f)) / 100;
4557 }
4558 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * Mathf.Max(0, 100 - this.Evalue((CS$<>8__locals1.e == Element.Void) ? 55 : 56)) / 100;
4559 if (CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.IsPC && EClass.player.codex.Has(this.id))
4560 {
4561 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * (100 + Mathf.Min(10, EClass.player.codex.GetOrCreate(this.id).weakspot)) / 100;
4562 }
4563 if (this.isChara && this.Chara.body.GetAttackStyle() == AttackStyle.Shield && this.elements.ValueWithoutLink(123) >= 5 && CS$<>8__locals1.e == Element.Void)
4564 {
4565 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 90 / 100;
4566 }
4567 if (this.Evalue(971) > 0)
4568 {
4569 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 100 / Mathf.Clamp(100 + this.Evalue(971), 25, 1000);
4570 }
4571 if (this.HasElement(1305, 1))
4572 {
4573 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 90 / 100;
4574 }
4575 if (EClass.pc.HasElement(1207, 1) && this.isChara)
4576 {
4577 int num = 0;
4578 int num2 = 0;
4579 foreach (Condition condition in this.Chara.conditions)
4580 {
4581 if (condition.Type == ConditionType.Buff)
4582 {
4583 num++;
4584 }
4585 else if (condition.Type == ConditionType.Debuff)
4586 {
4587 num2++;
4588 }
4589 }
4590 if (this.IsPCParty)
4591 {
4592 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 100 / Mathf.Max(100 + num * 5, 120);
4593 }
4594 else
4595 {
4596 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * Mathf.Max(100 + num2 * 5, 120) / 100;
4597 }
4598 }
4599 if (this.IsPCParty && EClass.pc.ai is GoalAutoCombat)
4600 {
4601 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg - EClass.pc.Evalue(13) - 1;
4602 }
4603 else if (CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.IsPCParty && EClass.pc.ai is GoalAutoCombat)
4604 {
4605 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * 100 / Mathf.Max(110 - EClass.pc.Evalue(13), 105);
4606 }
4607 if (this.HasElement(1218, 1))
4608 {
4609 CS$<>8__locals1.dmg = CS$<>8__locals1.dmg * (1000 - this.Evalue(1218)) / 1000;
4610 if (CS$<>8__locals1.dmg <= 0 && EClass.rnd(4) == 0)
4611 {
4612 int dmg2 = CS$<>8__locals1.dmg;
4613 CS$<>8__locals1.dmg = dmg2 + 1;
4614 }
4615 }
4616 if (CS$<>8__locals1.dmg >= this.MaxHP / 10 && this.Evalue(68) > 0)
4617 {
4618 int num3 = this.MaxHP / 10;
4619 int num4 = CS$<>8__locals1.dmg - num3;
4620 num4 = num4 * 100 / (200 + this.Evalue(68) * 10);
4621 CS$<>8__locals1.dmg = num3 + num4;
4622 }
4623 }
4624 if (CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.IsPC && EClass.pc.Evalue(654) > 0)
4625 {
4626 CS$<>8__locals1.dmg = 0;
4627 }
4628 if (CS$<>8__locals1.dmg < 0)
4629 {
4630 CS$<>8__locals1.dmg = 0;
4631 }
4632 int num5 = Mathf.Clamp(CS$<>8__locals1.dmg * 6 / this.MaxHP, 0, 4) + ((CS$<>8__locals1.dmg > 0) ? 1 : 0);
4633 if (this.Evalue(1421) > 0)
4634 {
4635 int num6 = CS$<>8__locals1.dmg;
4636 if (this.hp > 0)
4637 {
4638 num6 = CS$<>8__locals1.dmg - this.hp;
4639 this.hp -= CS$<>8__locals1.dmg;
4640 if (this.hp < 0 && this.Chara.mana.value >= 0)
4641 {
4642 this.hp = 0;
4643 }
4644 }
4645 if (this.hp <= 0)
4646 {
4647 if (this.Evalue(1421) >= 2)
4648 {
4649 num6 /= 2;
4650 }
4651 CS$<>8__locals1.dmg = num6;
4652 if (this.Chara.mana.value > 0)
4653 {
4654 num6 -= this.Chara.mana.value;
4655 this.Chara.mana.value -= CS$<>8__locals1.dmg;
4656 }
4657 if (this.Chara.mana.value <= 0)
4658 {
4659 this.hp -= num6;
4660 }
4661 }
4662 }
4663 else
4664 {
4665 this.hp -= CS$<>8__locals1.dmg;
4666 }
4667 if (this.isSynced && CS$<>8__locals1.dmg != 0)
4668 {
4669 float ratio = (float)CS$<>8__locals1.dmg / (float)this.MaxHP;
4670 Card c = (this.parent is Chara) ? (this.parent as Chara) : this;
4671 ActEffect.TryDelay(delegate
4672 {
4673 c.PlayEffect("blood", true, 0f, default(Vector3)).SetParticleColor(EClass.Colors.matColors[CS$<>8__locals1.<>4__this.material.alias].main).Emit(20 + (int)(30f * ratio));
4674 if (EClass.core.config.test.showNumbers || CS$<>8__locals1.<>4__this.isThing)
4675 {
4676 Popper popper = EClass.scene.popper.Pop(CS$<>8__locals1.<>4__this.renderer.PositionCenter(), "DamageNum");
4677 Color color = c.IsPC ? EClass.Colors.textColors.damagePC : (c.IsPCFaction ? EClass.Colors.textColors.damagePCParty : EClass.Colors.textColors.damage);
4678 if (CS$<>8__locals1.e != Element.Void)
4679 {
4680 color = EClass.Colors.elementColors.TryGetValue(CS$<>8__locals1.e.source.alias, default(Color));
4681 float num13 = (color.r + color.g + color.b) / 3f;
4682 num13 = ((num13 > 0.5f) ? 0f : (0.6f - num13));
4683 color = new Color(color.r + num13, color.g + num13, color.b + num13, 1f);
4684 }
4685 popper.SetText(CS$<>8__locals1.dmg.ToString() ?? "", color);
4686 }
4687 });
4688 }
4689 ZoneInstanceBout zoneInstanceBout = EClass._zone.instance as ZoneInstanceBout;
4690 if (this.hp < 0)
4691 {
4692 if (this.isRestrained && this.IsPCFaction && EClass._zone.IsPCFaction && (!this.IsPC || (this.Chara.ai is AI_Torture && this.Chara.ai.IsRunning)))
4693 {
4694 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4695 if (this.Chara.stamina.value > 0 && (EClass.rnd(2) == 0 || !this.IsPC))
4696 {
4697 this.Chara.stamina.Mod(-1);
4698 }
4699 }
4700 else if (this.IsInstalled && this.pos.HasBlock && this.trait.IsDoor)
4701 {
4702 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4703 }
4704 else if (!this.trait.CanBeDestroyed)
4705 {
4706 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4707 }
4708 else if (this.HasEditorTag(EditorTag.Invulnerable) || (this.HasEditorTag(EditorTag.InvulnerableToMobs) && (CS$<>8__locals1.origin == null || !CS$<>8__locals1.origin.IsPCParty)))
4709 {
4710 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4711 }
4712 else if (this.isChara)
4713 {
4714 if (this.Chara.HasCondition<ConInvulnerable>())
4715 {
4716 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4717 }
4718 else if (this.IsPC && EClass.debug.godMode)
4719 {
4720 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4721 }
4722 else if (this.Chara.host != null)
4723 {
4724 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4725 }
4726 else if (zoneInstanceBout != null && LayerDrama.Instance)
4727 {
4728 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4729 }
4730 else if (LayerDrama.IsActive() && this.IsPC)
4731 {
4732 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4733 }
4734 else
4735 {
4736 if (attackSource != AttackSource.Finish && this.IsPCParty && this.Chara.host == null && EClass.pc.ai is GoalAutoCombat)
4737 {
4738 if (!EClass.player.invlunerable && (EClass.pc.ai as GoalAutoCombat).listHealthy.Contains(this.Chara))
4739 {
4740 Msg.Say(this.IsPC ? "abort_damage" : "abort_damgeAlly");
4741 EClass.player.invlunerable = true;
4742 EClass.player.TryAbortAutoCombat();
4743 EClass.pc.stamina.Mod(-EClass.pc.stamina.max / 5);
4744 }
4745 if (EClass.player.invlunerable)
4746 {
4747 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4748 goto IL_973;
4749 }
4750 }
4751 if (this.IsPC && this.Evalue(1220) > 0 && this.Chara.stamina.value >= this.Chara.stamina.max / 2)
4752 {
4753 this.Chara.stamina.Mod(-this.Chara.stamina.max / 2);
4754 this.Chara.AddCondition<ConInvulnerable>(100, false);
4755 CS$<>8__locals1.<DamageHP>g__EvadeDeath|1();
4756 }
4757 }
4758 }
4759 }
4760 IL_973:
4761 if (this.trait.CanBeAttacked)
4762 {
4763 this.renderer.PlayAnime(AnimeID.HitObj, default(Vector3), false);
4764 this.hp = this.MaxHP;
4765 }
4766 if (this.hp < 0)
4767 {
4768 if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && CS$<>8__locals1.origin != null && (CS$<>8__locals1.origin.isSynced || this.IsPC))
4769 {
4770 string text = "";
4771 if (this.IsPC && Lang.setting.combatTextStyle == 0)
4772 {
4773 if (CS$<>8__locals1.e != Element.Void && CS$<>8__locals1.e != null)
4774 {
4775 text = "dead_" + CS$<>8__locals1.e.source.alias;
4776 }
4777 if (text == "" || !LangGame.Has(text))
4778 {
4779 text = "dead_attack";
4780 }
4781 EClass.pc.Say(text, this, "", null);
4782 }
4783 else
4784 {
4785 if (CS$<>8__locals1.e != Element.Void && CS$<>8__locals1.e != null)
4786 {
4787 text = "kill_" + CS$<>8__locals1.e.source.alias;
4788 }
4789 if (text == "" || !LangGame.Has(text))
4790 {
4791 text = "kill_attack";
4792 }
4793 (this.IsPC ? EClass.pc : CS$<>8__locals1.origin).Say(text, CS$<>8__locals1.origin, this, null, null);
4794 }
4795 }
4796 if (this.isChara)
4797 {
4798 if (this.HasElement(1410, 1) && !this.Chara.HasCooldown(1410))
4799 {
4800 this.Chara.AddCooldown(1410, 0);
4801 this.Say("reboot", this, null, null);
4802 this.PlaySound("reboot", 1f, true);
4803 this.Chara.Cure(CureType.Boss, 100, BlessedState.Normal);
4804 this.hp = this.MaxHP / 3;
4805 this.Chara.AddCondition<ConInvulnerable>(100, false);
4806 return;
4807 }
4808 foreach (Chara chara3 in EClass._map.charas)
4809 {
4810 if (this.Chara.IsFriendOrAbove(chara3) && chara3.HasElement(1408, 1) && chara3.faith == EClass.game.religions.Healing && EClass.world.date.GetRawDay() != chara3.GetInt(58, null) && (!chara3.IsPCFaction || this.IsPCFaction))
4811 {
4812 Msg.alwaysVisible = true;
4813 Msg.Say("layhand", chara3, this, null, null);
4814 Msg.Say("pray_heal", this, null, null, null);
4815 this.hp = this.MaxHP;
4816 this.Chara.AddCondition<ConInvulnerable>(100, false);
4817 this.PlayEffect("revive", true, 0f, default(Vector3));
4818 this.PlaySound("revive", 1f, true);
4819 chara3.SetInt(58, EClass.world.date.GetRawDay());
4820 return;
4821 }
4822 }
4823 }
4824 if (zoneInstanceBout != null)
4825 {
4826 Chara chara4 = EClass._map.FindChara(zoneInstanceBout.uidTarget);
4827 if (chara4 != null)
4828 {
4829 if (this.IsPC)
4830 {
4831 EClass.pc.hp = 0;
4832 chara4.ShowDialog("_chara", "bout_lose", "");
4833 return;
4834 }
4835 if (chara4 == this)
4836 {
4837 this.hp = 0;
4838 chara4.ModAffinity(EClass.pc, 10, true);
4839 chara4.ShowDialog("_chara", "bout_win", "");
4840 return;
4841 }
4842 }
4843 }
4844 if (!this.isDestroyed)
4845 {
4846 this.Die(CS$<>8__locals1.e, CS$<>8__locals1.origin, attackSource);
4847 }
4848 if (CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.isChara)
4849 {
4850 if (CS$<>8__locals1.origin.IsPCFactionOrMinion && this.isChara && !this.isCopy)
4851 {
4852 EClass.player.stats.kills++;
4853 EClass.game.quests.list.ForeachReverse(delegate(Quest q)
4854 {
4855 q.OnKillChara(CS$<>8__locals1.<>4__this.Chara);
4856 });
4857 EClass.player.codex.AddKill(this.id);
4858 if (this.rarity >= Rarity.Legendary && this.Chara.OriginalHostility == Hostility.Enemy)
4859 {
4860 Guild.Fighter.AddContribution(5 + this.LV / 5);
4861 if (Guild.Fighter.relation.rank >= 4 && this.uid % 2 == 0)
4862 {
4863 int a = EClass.rndHalf(200 + this.LV * 20);
4864 Msg.Say("bounty", this.Chara, a.ToString() ?? "", null, null);
4865 EClass.pc.ModCurrency(a, "money");
4866 SE.Pay();
4867 }
4868 }
4869 }
4870 if (CS$<>8__locals1.origin.IsPCParty && EClass.pc.Evalue(1355) > 0)
4871 {
4872 ConStrife conStrife = (EClass.pc.AddCondition<ConStrife>(100, false) as ConStrife) ?? EClass.pc.GetCondition<ConStrife>();
4873 if (conStrife != null)
4874 {
4875 conStrife.AddKill();
4876 }
4877 }
4878 if (CS$<>8__locals1.origin.GetInt(106, null) == 0)
4879 {
4880 CS$<>8__locals1.origin.Chara.TalkTopic("kill");
4881 }
4882 }
4883 Msg.SetColor();
4884 }
4885 else if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && CS$<>8__locals1.origin != null)
4886 {
4887 (this.IsPC ? EClass.pc : CS$<>8__locals1.origin).Say("dmgMelee" + num5.ToString() + (this.IsPC ? "pc" : ""), CS$<>8__locals1.origin, this, null, null);
4888 }
4889 else if (this.isChara)
4890 {
4891 int num7 = (attackSource == AttackSource.Condition || attackSource == AttackSource.WeaponEnchant) ? 2 : 1;
4892 if (num5 >= num7)
4893 {
4894 if (CS$<>8__locals1.e != Element.Void)
4895 {
4896 this.Say("dmg_" + CS$<>8__locals1.e.source.alias, this, null, null);
4897 }
4898 if (CS$<>8__locals1.e == Element.Void || num5 >= 2)
4899 {
4900 this.Say("dmg" + num5.ToString(), this, null, null);
4901 }
4902 }
4903 }
4904 if (this.isChara && CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.IsAliveInCurrentZone && CS$<>8__locals1.origin.isChara)
4905 {
4906 if (CS$<>8__locals1.e.id == 916)
4907 {
4908 CS$<>8__locals1.origin.HealHP(Mathf.Clamp(EClass.rnd(CS$<>8__locals1.dmg * (50 + eleP) / 500 + 5), 1, CS$<>8__locals1.origin.MaxHP / 5 + EClass.rnd(10)), HealSource.None);
4909 }
4910 if ((attackSource == AttackSource.Melee || attackSource == AttackSource.Range) && CS$<>8__locals1.origin.Dist(this) <= 1)
4911 {
4912 if (attackSource == AttackSource.Melee && this.HasElement(1221, 1))
4913 {
4914 int ele2 = (this.Chara.MainElement == Element.Void) ? 924 : this.Chara.MainElement.id;
4915 this.Say("reflect_thorne", this, CS$<>8__locals1.origin, null, null);
4916 CS$<>8__locals1.origin.DamageHP(Mathf.Clamp(CS$<>8__locals1.dmg / 20, 1, this.MaxHP / 20), ele2, this.Power, AttackSource.Condition, null, true);
4917 }
4918 if (this.HasElement(1223, 1))
4919 {
4920 int ele3 = (this.Chara.MainElement == Element.Void) ? 923 : this.Chara.MainElement.id;
4921 this.Say("reflect_acid", this, CS$<>8__locals1.origin, null, null);
4922 CS$<>8__locals1.origin.DamageHP(Mathf.Clamp(CS$<>8__locals1.dmg / 20, 1, this.MaxHP / 20), ele3, this.Power * 2, AttackSource.Condition, null, true);
4923 }
4924 }
4925 if (CS$<>8__locals1.origin.HasElement(662, 1) && attackSource == AttackSource.Melee && CS$<>8__locals1.origin.isChara && this.Chara.IsHostile(CS$<>8__locals1.origin as Chara))
4926 {
4927 int num8 = EClass.rnd(3 + Mathf.Clamp(CS$<>8__locals1.dmg / 100, 0, CS$<>8__locals1.origin.Evalue(662) / 10));
4928 CS$<>8__locals1.origin.Chara.stamina.Mod(num8);
4929 if (this.IsAliveInCurrentZone)
4930 {
4931 this.Chara.stamina.Mod(-num8);
4932 }
4933 }
4934 if (CS$<>8__locals1.origin.HasElement(1350, 1) && attackSource == AttackSource.Melee)
4935 {
4936 int num9 = EClass.rndHalf(2 + Mathf.Clamp(CS$<>8__locals1.dmg / 10, 0, CS$<>8__locals1.origin.Chara.GetPietyValue() + 10));
4937 CS$<>8__locals1.origin.Chara.mana.Mod(num9);
4938 if (this.IsAliveInCurrentZone)
4939 {
4940 this.Chara.mana.Mod(-num9);
4941 }
4942 }
4943 if (CS$<>8__locals1.origin.HasElement(661, 1) && attackSource == AttackSource.Melee)
4944 {
4945 int num10 = EClass.rnd(2 + Mathf.Clamp(CS$<>8__locals1.dmg / 10, 0, CS$<>8__locals1.origin.Evalue(661) + 10));
4946 CS$<>8__locals1.origin.Chara.mana.Mod(num10);
4947 if (this.IsAliveInCurrentZone)
4948 {
4949 this.Chara.mana.Mod(-num10);
4950 }
4951 }
4952 }
4953 if (this.hp < 0)
4954 {
4955 return;
4956 }
4957 if (!this.isChara)
4958 {
4959 return;
4960 }
4961 if (CS$<>8__locals1.dmg > 0)
4962 {
4963 int a2 = 100 * (CS$<>8__locals1.dmg * 100 / this.MaxHP) / 100;
4964 a2 = Mathf.Min(a2, this.Chara.isRestrained ? 15 : 200);
4965 this.elements.ModExp(this.GetArmorSkill(), a2, false);
4966 if (this.Chara.body.GetAttackStyle() == AttackStyle.Shield)
4967 {
4968 this.elements.ModExp(123, a2, false);
4969 }
4970 }
4971 int num11 = (EClass.rnd(2) == 0) ? 1 : 0;
4972 if (attackSource == AttackSource.Condition)
4973 {
4974 num11 = 1 + EClass.rnd(2);
4975 }
4976 if (num11 > 0)
4977 {
4978 bool flag = this.Chara.HasCondition<ConPoison>() || ((CS$<>8__locals1.e.id == 915 || CS$<>8__locals1.e.id == 923) && this.ResistLv(this.Evalue(955)) < 4);
4979 this.AddBlood(num11, flag ? 6 : -1);
4980 }
4981 bool flag2 = true;
4982 switch (CS$<>8__locals1.e.id)
4983 {
4984 case 910:
4985 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
4986 {
4987 this.Chara.AddCondition<ConBurning>(eleP, false);
4988 }
4989 break;
4990 case 911:
4991 if (this.Chara.isWet)
4992 {
4993 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 10, 100))
4994 {
4995 this.Chara.AddCondition<ConFreeze>(eleP, false);
4996 }
4997 }
4998 else if (CS$<>8__locals1.<DamageHP>g__Chance|3(50 + eleP / 10, 100))
4999 {
5000 this.Chara.AddCondition<ConWet>(eleP, false);
5001 }
5002 break;
5003 case 912:
5004 if (CS$<>8__locals1.<DamageHP>g__Chance|3(75 + eleP / 20, 100) && EClass.rnd(3) == 0)
5005 {
5006 this.Chara.AddCondition<ConParalyze>(1, true);
5007 }
5008 break;
5009 case 913:
5010 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
5011 {
5012 this.Chara.AddCondition<ConBlind>(eleP, false);
5013 }
5014 break;
5015 case 914:
5016 flag2 = false;
5017 if (EClass.rnd(3) != 0)
5018 {
5019 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
5020 {
5021 this.Chara.AddCondition<ConConfuse>(eleP, false);
5022 }
5023 }
5024 else if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
5025 {
5026 this.Chara.AddCondition<ConSleep>(eleP, false);
5027 }
5028 if (CS$<>8__locals1.<DamageHP>g__Chance|3(50, 100))
5029 {
5030 this.Chara.SAN.Mod(EClass.rnd(2));
5031 }
5032 break;
5033 case 915:
5034 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
5035 {
5036 this.Chara.AddCondition<ConPoison>(eleP, false);
5037 }
5038 break;
5039 case 917:
5040 if (CS$<>8__locals1.<DamageHP>g__Chance|3(50 + eleP / 10, 100))
5041 {
5042 this.Chara.AddCondition<ConDim>(eleP, false);
5043 }
5044 break;
5045 case 918:
5046 flag2 = false;
5047 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
5048 {
5049 this.Chara.AddCondition<ConParalyze>(eleP, false);
5050 }
5051 break;
5052 case 920:
5053 flag2 = false;
5054 if (CS$<>8__locals1.<DamageHP>g__Chance|3(5 + eleP / 25, 40))
5055 {
5056 this.Chara.AddCondition<ConBlind>(eleP / 2, false);
5057 }
5058 if (CS$<>8__locals1.<DamageHP>g__Chance|3(5 + eleP / 25, 40))
5059 {
5060 this.Chara.AddCondition<ConParalyze>(eleP / 2, false);
5061 }
5062 if (CS$<>8__locals1.<DamageHP>g__Chance|3(5 + eleP / 25, 40))
5063 {
5064 this.Chara.AddCondition<ConConfuse>(eleP / 2, false);
5065 }
5066 if (CS$<>8__locals1.<DamageHP>g__Chance|3(5 + eleP / 25, 40))
5067 {
5068 this.Chara.AddCondition<ConPoison>(eleP / 2, false);
5069 }
5070 if (CS$<>8__locals1.<DamageHP>g__Chance|3(5 + eleP / 25, 40))
5071 {
5072 this.Chara.AddCondition<ConSleep>(eleP / 2, false);
5073 }
5074 if (CS$<>8__locals1.<DamageHP>g__Chance|3(5 + eleP / 25, 40))
5075 {
5076 this.Chara.AddCondition<ConDim>(eleP / 2, false);
5077 }
5078 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 10, 100))
5079 {
5080 this.Chara.SAN.Mod(EClass.rnd(2));
5081 }
5082 break;
5083 case 922:
5084 this.Chara.ModCorruption(EClass.rnd(eleP / 50 + 10));
5085 break;
5086 case 923:
5087 if (CS$<>8__locals1.<DamageHP>g__Chance|3(50 + eleP / 10, 100) && EClass.rnd(4) == 0)
5088 {
5089 ActEffect.Proc(EffectId.Acid, this.Chara, null, 100, default(ActRef));
5090 }
5091 break;
5092 case 924:
5093 if (CS$<>8__locals1.<DamageHP>g__Chance|3(50 + eleP / 10, 100))
5094 {
5095 this.Chara.AddCondition<ConBleed>(eleP, false);
5096 }
5097 break;
5098 case 925:
5099 if (EClass.rnd(3) == 0)
5100 {
5101 if (CS$<>8__locals1.<DamageHP>g__Chance|3(30 + eleP / 5, 100))
5102 {
5103 this.Chara.AddCondition<ConDim>(eleP, false);
5104 }
5105 }
5106 else if (EClass.rnd(2) == 0)
5107 {
5108 if (EClass.rnd(3) == 0)
5109 {
5110 this.Chara.AddCondition<ConParalyze>(1, true);
5111 }
5112 }
5113 else if (EClass.rnd(2) == 0)
5114 {
5115 this.Chara.AddCondition<ConConfuse>(1 + EClass.rnd(3), true);
5116 }
5117 break;
5118 }
5119 if (CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.HasElement(1411, 1) && !this.Chara.HasCondition<ConGravity>())
5120 {
5121 Condition.ignoreEffect = true;
5122 this.Chara.AddCondition<ConGravity>(2000, false);
5123 Condition.ignoreEffect = false;
5124 }
5125 if (this.Chara.conSleep != null && flag2)
5126 {
5127 this.Chara.conSleep.Kill(false);
5128 }
5129 if (this.Chara.host != null && this.hp == 0 && !this.Chara.HasCondition<ConFaint>())
5130 {
5131 this.Chara.AddCondition<ConFaint>(200, true);
5132 }
5133 if (this.IsPC)
5134 {
5135 float num12 = (float)this.hp / (float)this.MaxHP;
5136 if (this.Evalue(1421) > 0)
5137 {
5138 num12 = (float)this.Chara.mana.value / (float)this.Chara.mana.max;
5139 }
5140 if (num12 < 0.3f)
5141 {
5142 this.PlaySound("heartbeat", 1f - num12 * 2f, true);
5143 }
5144 }
5145 if (!this.IsPC && this.hp < this.MaxHP / 5 && this.Evalue(423) <= 0 && CS$<>8__locals1.dmg * 100 / this.MaxHP + 10 > EClass.rnd(this.IsPowerful ? 400 : 150) && !this.HasCondition<ConFear>())
5146 {
5147 this.Chara.AddCondition<ConFear>(100 + EClass.rnd(100), false);
5148 }
5149 if (this.Chara.ai.Current.CancelWhenDamaged && attackSource != AttackSource.Hunger && attackSource != AttackSource.Fatigue)
5150 {
5151 this.Chara.ai.Current.TryCancel(CS$<>8__locals1.origin);
5152 }
5153 if (this.Chara.HasCondition<ConWeapon>())
5154 {
5155 ConWeapon condition2 = this.Chara.GetCondition<ConWeapon>();
5156 if (CS$<>8__locals1.e.source.aliasRef == condition2.sourceElement.aliasRef)
5157 {
5158 condition2.Mod(-1, false);
5159 }
5160 }
5161 if (this.Chara.HasElement(1222, 1) && (CS$<>8__locals1.dmg >= this.MaxHP / 10 || EClass.rnd(20) == 0))
5162 {
5163 ActEffect.Proc(EffectId.Duplicate, this, null, 100, default(ActRef));
5164 }
5165 if (this.hp < this.MaxHP / 3 && this.HasElement(1409, 1) && !this.Chara.HasCooldown(1409))
5166 {
5167 this.Chara.AddCooldown(1409, 0);
5168 this.Chara.AddCondition<ConBoost>(this.Power, false);
5169 this.Chara.Cure(CureType.Boss, 100, BlessedState.Normal);
5170 this.Chara.HealHP(this.MaxHP / 2, HealSource.None);
5171 }
5172 if (CS$<>8__locals1.origin != null && CS$<>8__locals1.origin.isChara)
5173 {
5174 if (!AI_PlayMusic.ignoreDamage)
5175 {
5176 this.Chara.TrySetEnemy(CS$<>8__locals1.origin.Chara);
5177 }
5178 if (CS$<>8__locals1.origin.Evalue(428) > 0 && !this.IsPCFactionOrMinion && EClass.rnd(CS$<>8__locals1.dmg) >= EClass.rnd(this.MaxHP / 10) + this.MaxHP / 100 + 1)
5179 {
5180 CS$<>8__locals1.origin.Chara.TryNeckHunt(this.Chara, CS$<>8__locals1.origin.Evalue(428) * 20, true);
5181 }
5182 }
5183 }
5184
5185 // Token: 0x0600132E RID: 4910 RVA: 0x0007D2DC File Offset: 0x0007B4DC
5186 public virtual void Die(Element e = null, Card origin = null, AttackSource attackSource = AttackSource.None)
5187 {
5188 Card rootCard = this.GetRootCard();
5189 Point _pos = ((rootCard != null) ? rootCard.pos : null) ?? this.pos;
5190 if (_pos != null && !_pos.IsValid)
5191 {
5192 _pos = null;
5193 }
5194 if (this.trait.EffectDead == EffectDead.Default && _pos != null)
5195 {
5196 _pos.PlaySound(this.material.GetSoundDead(this.sourceCard), true, 1f, true);
5197 _pos.PlayEffect("mine").SetParticleColor(this.material.GetColor()).Emit(10 + EClass.rnd(10));
5198 this.material.AddBlood(_pos, 6);
5199 if (_pos.IsSync)
5200 {
5201 string text = (rootCard != this) ? "destroyed_inv_" : "destroyed_ground_";
5202 if (e != null && LangGame.Has(text + e.source.alias))
5203 {
5204 text += e.source.alias;
5205 }
5206 if (attackSource != AttackSource.Throw)
5207 {
5208 Msg.Say(text, this, rootCard, null, null);
5209 }
5210 }
5211 else if (attackSource != AttackSource.Throw)
5212 {
5213 Msg.Say("destroyed", this, null, null, null);
5214 }
5215 }
5216 if (_pos != null)
5217 {
5218 this.things.ForeachReverse(delegate(Thing t)
5219 {
5220 if (t.trait is TraitChestMerchant)
5221 {
5222 return;
5223 }
5224 EClass._zone.AddCard(t, _pos);
5225 });
5226 }
5227 this.Destroy();
5228 if (e != null && _pos != null && e.id == 21)
5229 {
5230 EClass._zone.AddCard(ThingGen.Create((EClass.rnd(2) == 0) ? "ash" : "ash2", -1, -1), _pos);
5231 }
5232 if (this.trait.ThrowType == ThrowType.Explosive)
5233 {
5234 this.Explode(this.pos, origin);
5235 }
5236 }
5237
5238 // Token: 0x0600132F RID: 4911 RVA: 0x0007D4A4 File Offset: 0x0007B6A4
5239 public void Explode(Point p, Card origin)
5240 {
5241 ActEffect.ProcAt(EffectId.Explosive, 100, this.blessedState, this, null, p, true, new ActRef
5242 {
5243 origin = ((origin != null) ? origin.Chara : null),
5244 refThing = this.Thing,
5245 aliasEle = "eleImpact"
5246 });
5247 }
5248
5249 // Token: 0x06001330 RID: 4912 RVA: 0x0007D4FC File Offset: 0x0007B6FC
5250 public void Deconstruct()
5251 {
5252 this.PlaySound(this.material.GetSoundDead(this.sourceCard), 1f, true);
5253 this.Destroy();
5254 }
5255
5256 // Token: 0x06001331 RID: 4913 RVA: 0x0007D524 File Offset: 0x0007B724
5257 public void Destroy()
5258 {
5259 if (this.isDestroyed)
5260 {
5261 Debug.Log(this.Name + " is already destroyed.");
5262 return;
5263 }
5264 if (this.isChara)
5265 {
5266 if (this.IsPCFaction && !this.Chara.isSummon)
5267 {
5268 Debug.Log(this);
5269 return;
5270 }
5271 this.Chara.DropHeld(null);
5272 this.Chara.isDead = true;
5273 if (this.IsPCParty)
5274 {
5275 EClass.pc.party.RemoveMember(this.Chara);
5276 }
5277 if (this.IsGlobal)
5278 {
5279 EClass.game.cards.globalCharas.Remove(this.Chara);
5280 }
5281 }
5282 if (this.renderer.hasActor)
5283 {
5284 this.renderer.KillActor();
5285 }
5286 if (this.parent != null)
5287 {
5288 this.parent.RemoveCard(this);
5289 }
5290 for (int i = this.things.Count - 1; i >= 0; i--)
5291 {
5292 this.things[i].Destroy();
5293 }
5294 this.isDestroyed = true;
5295 }
5296
5297 // Token: 0x06001332 RID: 4914 RVA: 0x0007D628 File Offset: 0x0007B828
5298 public void SpawnLoot(Card origin)
5299 {
5300 if (!this.isChara || this.IsPCFactionMinion || (this.isCopy && EClass.rnd(10) != 0))
5301 {
5302 return;
5303 }
5304 bool isUserZone = EClass._zone.IsUserZone;
5305 bool flag = EClass._zone is Zone_Music;
5306 List<Card> list = new List<Card>();
5307 SourceRace.Row race = this.Chara.race;
5308 if (!this.IsPCFaction && !isUserZone && this.sourceCard.idActor.IsEmpty())
5309 {
5310 int i = 500;
5311 if (this.rarity >= Rarity.Legendary)
5312 {
5313 i = ((!EClass.player.codex.DroppedCard(this.id)) ? 1 : 10);
5314 EClass.player.codex.MarkCardDrop(this.id);
5315 }
5316 if (this.trait is TraitAdventurerBacker)
5317 {
5318 i = 10;
5319 }
5320 if (this.<SpawnLoot>g__chance|729_0(i))
5321 {
5322 Thing thing = ThingGen.Create("figure", -1, -1);
5323 thing.MakeFigureFrom(this.id);
5324 list.Add(thing);
5325 }
5326 if (this.<SpawnLoot>g__chance|729_0(i))
5327 {
5328 Thing thing2 = ThingGen.Create("figure3", -1, -1);
5329 thing2.MakeFigureFrom(this.id);
5330 list.Add(thing2);
5331 }
5332 }
5333 bool flag2 = this.Chara.race.corpse[1].ToInt() > EClass.rnd(1500) || (this.Chara.IsPowerful && !this.IsPCFaction) || EClass.debug.godFood;
5334 if (this.Chara.race.IsAnimal && EClass.rnd(EClass._zone.IsPCFaction ? 3 : 5) == 0)
5335 {
5336 flag2 = true;
5337 }
5338 if (origin != null && origin.HasElement(290, 1))
5339 {
5340 if (!flag2 && this.Chara.race.corpse[1].ToInt() > EClass.rnd(150000 / (100 + (int)Mathf.Sqrt((float)origin.Evalue(290)) * 5)))
5341 {
5342 flag2 = true;
5343 origin.elements.ModExp(290, 100, false);
5344 }
5345 else
5346 {
5347 origin.elements.ModExp(290, 5, false);
5348 }
5349 }
5350 if (flag2 && !isUserZone)
5351 {
5352 string a = this.Chara.race.corpse[0];
5353 if (a == "_meat" && EClass.rnd(10) == 0)
5354 {
5355 a = "meat_marble";
5356 }
5357 Thing thing3 = ThingGen.Create(a, -1, -1);
5358 if (thing3.source._origin == "meat")
5359 {
5360 thing3.MakeFoodFrom(this);
5361 }
5362 else
5363 {
5364 thing3.ChangeMaterial(this.Chara.race.material);
5365 }
5366 list.Add(thing3);
5367 }
5368 if (!this.IsPCFaction && this.<SpawnLoot>g__chance|729_0(200))
5369 {
5370 list.Add(this.Chara.MakeGene(null));
5371 }
5372 if (!this.IsPCFaction && !isUserZone)
5373 {
5374 foreach (string text in this.sourceCard.loot.Concat(this.Chara.race.loot).ToList<string>())
5375 {
5376 string[] array = text.Split('/', StringSplitOptions.None);
5377 int num = array[1].ToInt();
5378 if (num >= 1000 || num > EClass.rnd(1000) || EClass.debug.godMode)
5379 {
5380 list.Add(ThingGen.Create(array[0], -1, -1).SetNum((num >= 1000) ? (num / 1000 + ((EClass.rnd(1000) > num % 1000) ? 1 : 0)) : 1));
5381 }
5382 }
5383 if (race.IsMachine)
5384 {
5385 if (this.<SpawnLoot>g__chance|729_0(20))
5386 {
5387 list.Add(ThingGen.Create("microchip", -1, -1));
5388 }
5389 if (this.<SpawnLoot>g__chance|729_0(15))
5390 {
5391 list.Add(ThingGen.Create("battery", -1, -1));
5392 }
5393 }
5394 else
5395 {
5396 if (race.IsAnimal)
5397 {
5398 if (this.<SpawnLoot>g__chance|729_0(15))
5399 {
5400 list.Add(ThingGen.Create("fang", -1, -1));
5401 }
5402 if (this.<SpawnLoot>g__chance|729_0(10))
5403 {
5404 list.Add(ThingGen.Create("skin", -1, -1));
5405 }
5406 }
5407 if (this.<SpawnLoot>g__chance|729_0(20))
5408 {
5409 list.Add(ThingGen.Create("offal", -1, -1));
5410 }
5411 if (this.<SpawnLoot>g__chance|729_0(20))
5412 {
5413 list.Add(ThingGen.Create("heart", -1, -1));
5414 }
5415 }
5416 if (!this.isBackerContent && !flag)
5417 {
5418 int num2 = 1;
5419 List<Thing> list2 = new List<Thing>();
5420 foreach (Thing thing4 in this.things)
5421 {
5422 if (!thing4.HasTag(CTAG.gift) && !(thing4.trait is TraitChestMerchant))
5423 {
5424 if (thing4.isGifted || thing4.rarity >= Rarity.Artifact)
5425 {
5426 list.Add(thing4);
5427 }
5428 else if (thing4.IsEquipmentOrRanged)
5429 {
5430 if (thing4.rarity >= Rarity.Legendary)
5431 {
5432 list2.Add(thing4);
5433 }
5434 else if (EClass.rnd(200) == 0)
5435 {
5436 list.Add(thing4);
5437 }
5438 }
5439 else if (EClass.rnd(5) == 0)
5440 {
5441 list.Add(thing4);
5442 }
5443 }
5444 }
5445 if (num2 > 0 && list2.Count > 0)
5446 {
5447 list2.Shuffle<Thing>();
5448 int num3 = 0;
5449 while (num3 < list2.Count && num3 < num2)
5450 {
5451 list.Add(list2[num3]);
5452 num3++;
5453 }
5454 }
5455 }
5456 if (!this.isBackerContent && this.id != "big_sister")
5457 {
5458 foreach (Thing thing5 in this.things)
5459 {
5460 if (!thing5.HasTag(CTAG.gift) && !(thing5.trait is TraitChestMerchant))
5461 {
5462 if (thing5.isGifted || thing5.rarity >= Rarity.Legendary || thing5.trait.DropChance > EClass.rndf(1f))
5463 {
5464 list.Add(thing5);
5465 }
5466 else if (thing5.IsEquipmentOrRanged)
5467 {
5468 if (EClass.rnd(200) == 0)
5469 {
5470 list.Add(thing5);
5471 }
5472 }
5473 else if (EClass.rnd(5) == 0)
5474 {
5475 list.Add(thing5);
5476 }
5477 }
5478 }
5479 }
5480 }
5481 foreach (Thing thing6 in this.things)
5482 {
5483 if (thing6.GetInt(116, null) != 0)
5484 {
5485 list.Add(thing6);
5486 }
5487 }
5488 Point nearestPoint = this.GetRootCard().pos;
5489 if (nearestPoint.IsBlocked)
5490 {
5491 nearestPoint = nearestPoint.GetNearestPoint(false, true, true, false);
5492 }
5493 foreach (Card card in list)
5494 {
5495 card.isHidden = false;
5496 card.SetInt(116, 0);
5497 EClass._zone.AddCard(card, nearestPoint);
5498 if (card.IsEquipmentOrRanged && card.rarity >= Rarity.Superior && !card.IsCursed)
5499 {
5500 foreach (Chara chara in EClass._map.charas)
5501 {
5502 if (chara.HasElement(1412, 1) && chara.Dist(nearestPoint) < 3)
5503 {
5504 card.Thing.TryLickEnchant(chara, true, null, null);
5505 break;
5506 }
5507 }
5508 }
5509 }
5510 }
5511
5512 // Token: 0x06001333 RID: 4915 RVA: 0x0007DE10 File Offset: 0x0007C010
5513 public Thing TryMakeRandomItem(int lv = -1)
5514 {
5515 if (lv == -1)
5516 {
5517 lv = EClass._zone.DangerLv;
5518 }
5519 string text = this.id;
5520 uint num = <PrivateImplementationDetails>.ComputeStringHash(text);
5521 if (num <= 2291038882U)
5522 {
5523 if (num <= 1062293841U)
5524 {
5525 if (num != 51003139U)
5526 {
5527 if (num != 1062293841U)
5528 {
5529 goto IL_2A6;
5530 }
5531 if (!(text == "log"))
5532 {
5533 goto IL_2A6;
5534 }
5535 this.ChangeMaterial((from m in EClass.sources.materials.rows
5536 where m.category == "wood"
5537 select m).RandomItem<SourceMaterial.Row>());
5538 goto IL_2A6;
5539 }
5540 else if (!(text == "egg_fertilized"))
5541 {
5542 goto IL_2A6;
5543 }
5544 }
5545 else if (num != 1555468929U)
5546 {
5547 if (num != 2291038882U)
5548 {
5549 goto IL_2A6;
5550 }
5551 if (!(text == "milk"))
5552 {
5553 goto IL_2A6;
5554 }
5555 }
5556 else if (!(text == "_meat"))
5557 {
5558 goto IL_2A6;
5559 }
5560 }
5561 else if (num <= 3595465691U)
5562 {
5563 if (num != 2585652531U)
5564 {
5565 if (num != 3595465691U)
5566 {
5567 goto IL_2A6;
5568 }
5569 if (!(text == "ore_gem"))
5570 {
5571 goto IL_2A6;
5572 }
5573 this.ChangeMaterial(MATERIAL.GetRandomMaterialFromCategory(lv, "gem", this.material));
5574 goto IL_2A6;
5575 }
5576 else
5577 {
5578 if (!(text == "ore"))
5579 {
5580 goto IL_2A6;
5581 }
5582 this.ChangeMaterial(MATERIAL.GetRandomMaterialFromCategory(lv, "ore", this.material));
5583 goto IL_2A6;
5584 }
5585 }
5586 else if (num != 3786258943U)
5587 {
5588 if (num != 3871660930U)
5589 {
5590 goto IL_2A6;
5591 }
5592 if (!(text == "meat_marble"))
5593 {
5594 goto IL_2A6;
5595 }
5596 }
5597 else if (!(text == "_egg"))
5598 {
5599 goto IL_2A6;
5600 }
5601 string text2 = "c_wilds";
5602 if (this.id == "_meat" || this.id == "meat_marble")
5603 {
5604 text2 = "c_animal";
5605 }
5606 int i = 0;
5607 while (i < 20)
5608 {
5609 CardRow cardRow = SpawnList.Get(text2, null, null).Select(lv, -1);
5610 if (!(cardRow.model.Chara.race.corpse[0] != "_meat") || !(this.id != "milk") || !(this.id != "_egg") || !(this.id != "egg_fertilized"))
5611 {
5612 if (!(this.id == "milk"))
5613 {
5614 this.MakeFoodFrom(cardRow.model);
5615 break;
5616 }
5617 if (this.c_idRefCard.IsEmpty())
5618 {
5619 this.MakeRefFrom(cardRow.model, null);
5620 break;
5621 }
5622 break;
5623 }
5624 else
5625 {
5626 i++;
5627 }
5628 }
5629 IL_2A6:
5630 return this as Thing;
5631 }
5632
5633 // Token: 0x06001334 RID: 4916 RVA: 0x0007E0C9 File Offset: 0x0007C2C9
5634 public Card MakeFoodFrom(string _id)
5635 {
5636 return this.MakeFoodFrom(EClass.sources.cards.map[_id].model);
5637 }
5638
5639 // Token: 0x06001335 RID: 4917 RVA: 0x0007E0EC File Offset: 0x0007C2EC
5640 public Card MakeFoodFrom(Card c)
5641 {
5642 this.MakeRefFrom(c, null);
5643 this.ChangeMaterial(c.material);
5644 SourceRace.Row race = c.Chara.race;
5645 int num = race.food[0].ToInt();
5646 bool flag = this.id == "meat_marble";
5647 int num2 = 1;
5648 bool flag2 = this.category.IsChildOf("meat");
5649 bool flag3 = this.category.IsChildOf("egg");
5650 if (flag)
5651 {
5652 num += 100;
5653 }
5654 if (flag2)
5655 {
5656 this.elements.SetBase(70, race.STR * race.STR / 5 * num / 100 - 10 + num / 10, 0);
5657 if (flag)
5658 {
5659 this.elements.SetBase(440, race.END * race.END / 5 * num / 100 - 10 + num / 10, 0);
5660 }
5661 this.elements.SetBase(71, (int)Mathf.Clamp((float)(num / 10) + Mathf.Sqrt((float)race.height) - 10f, 1f, 60f), 0);
5662 }
5663 else if (flag3)
5664 {
5665 this.elements.SetBase(444, race.LER * race.LER / 5 * num / 100 - 10 + num / 10, 0);
5666 num2 = 2;
5667 }
5668 else
5669 {
5670 num2 = 3;
5671 }
5672 foreach (Element element in c.elements.dict.Values)
5673 {
5674 if ((!flag3 || element.id != 1229) && (element.source.category == "food" || element.source.tag.Contains("foodEnc") || element.IsTrait))
5675 {
5676 this.elements.SetBase(element.id, element.Value, 0);
5677 }
5678 }
5679 List<Tuple<int, int>> list = new List<Tuple<int, int>>();
5680 foreach (KeyValuePair<int, int> keyValuePair in race.elementMap)
5681 {
5682 if (EClass.sources.elements.map[keyValuePair.Key].tag.Contains("primary"))
5683 {
5684 list.Add(new Tuple<int, int>(keyValuePair.Key, keyValuePair.Value));
5685 }
5686 }
5687 list.Sort((Tuple<int, int> a, Tuple<int, int> b) => b.Item2 - a.Item2);
5688 int num3 = 0;
5689 while (num3 < num2 && num3 < list.Count)
5690 {
5691 Tuple<int, int> tuple = list[num3];
5692 this.elements.SetBase(tuple.Item1, tuple.Item2 * tuple.Item2 / 4, 0);
5693 num3++;
5694 }
5695 if (race.IsUndead)
5696 {
5697 this.elements.ModBase(73, -20);
5698 }
5699 this.isWeightChanged = true;
5700 this.c_weight = race.height * 4 + 100;
5701 this.SetBlessedState(BlessedState.Normal);
5702 int num4 = c.LV - c.sourceCard.LV;
5703 if (num4 < 0)
5704 {
5705 num4 = 0;
5706 }
5707 num4 = EClass.curve(num4, 10, 10, 80);
5708 if (c.rarity >= Rarity.Legendary || c.IsUnique)
5709 {
5710 num4 += 60;
5711 }
5712 if (num4 > 0)
5713 {
5714 this.elements.ModBase(2, num4);
5715 }
5716 return this;
5717 }
5718
5719 // Token: 0x06001336 RID: 4918 RVA: 0x0007E478 File Offset: 0x0007C678
5720 public void MakeFoodRef(Card c1, Card c2 = null)
5721 {
5722 Card card = c1;
5723 Card card2 = c2;
5724 if (Card.<MakeFoodRef>g__IsIgnoreName|733_0(card))
5725 {
5726 card = null;
5727 }
5728 if (Card.<MakeFoodRef>g__IsIgnoreName|733_0(card2))
5729 {
5730 card2 = null;
5731 }
5732 if (card == null && card2 != null)
5733 {
5734 card = card2;
5735 card2 = null;
5736 }
5737 if (card != null)
5738 {
5739 this.MakeRefFrom(card, card2);
5740 if (card.c_idRefCard != null)
5741 {
5742 this.c_idRefCard = card.c_idRefCard;
5743 this.c_altName = this.TryGetFoodName(card);
5744 }
5745 if (card2 != null && card2.c_idRefCard != null)
5746 {
5747 this.c_idRefCard2 = card2.c_idRefCard;
5748 this.c_altName2 = this.TryGetFoodName(card2);
5749 }
5750 }
5751 }
5752
5753 // Token: 0x06001337 RID: 4919 RVA: 0x0007E4F8 File Offset: 0x0007C6F8
5754 public string TryGetFoodName(Card c)
5755 {
5756 if (c.c_idRefCard.IsEmpty())
5757 {
5758 return c.c_altName;
5759 }
5760 SourceChara.Row row = EClass.sources.cards.map[c.c_idRefCard] as SourceChara.Row;
5761 if (row == null || !row.isChara)
5762 {
5763 return c.c_altName;
5764 }
5765 if (!row.aka.IsEmpty())
5766 {
5767 if (row.name == "*r" && row.aka == "*r")
5768 {
5769 return "corpseGeneral".lang();
5770 }
5771 if (row.name == "*r")
5772 {
5773 return row.GetText("aka", false);
5774 }
5775 }
5776 return row.GetName();
5777 }
5778
5779 // Token: 0x06001338 RID: 4920 RVA: 0x0007E5AC File Offset: 0x0007C7AC
5780 public string GetFoodName(string s)
5781 {
5782 return s.Replace("_corpseFrom".lang(), "_corpseTo".lang());
5783 }
5784
5785 // Token: 0x06001339 RID: 4921 RVA: 0x0007E5C8 File Offset: 0x0007C7C8
5786 public void MakeFigureFrom(string id)
5787 {
5788 this.MakeRefFrom(id);
5789 }
5790
5791 // Token: 0x0600133A RID: 4922 RVA: 0x0007E5D1 File Offset: 0x0007C7D1
5792 public void MakeRefFrom(string id)
5793 {
5794 this.c_idRefCard = id;
5795 }
5796
5797 // Token: 0x0600133B RID: 4923 RVA: 0x0007E5DC File Offset: 0x0007C7DC
5798 public void MakeRefFrom(Card c1, Card c2 = null)
5799 {
5800 this.c_idRefCard = c1.id;
5801 this.c_altName = (c1.IsPC ? c1.c_altName : c1.GetName(NameStyle.Ref, c1.isChara ? 0 : 1));
5802 if (c2 != null)
5803 {
5804 this.c_idRefCard2 = c2.id;
5805 this.c_altName2 = (c2.IsPC ? c2.c_altName : c2.GetName(NameStyle.Ref, c2.isChara ? 0 : 1));
5806 }
5807 }
5808
5809 // Token: 0x0600133C RID: 4924 RVA: 0x0007E656 File Offset: 0x0007C856
5810 public void SetHidden(bool hide = true)
5811 {
5812 this.isHidden = hide;
5813 this.pos.cell.Refresh();
5814 }
5815
5816 // Token: 0x0600133D RID: 4925 RVA: 0x0007E66F File Offset: 0x0007C86F
5817 public virtual Card.MoveResult _Move(Point p, Card.MoveType type = Card.MoveType.Walk)
5818 {
5819 EClass._map.MoveCard(p, this);
5820 if (this.isChara)
5821 {
5822 this.Chara.SyncRide();
5823 }
5824 return Card.MoveResult.Success;
5825 }
5826
5827 // Token: 0x0600133E RID: 4926 RVA: 0x0007E694 File Offset: 0x0007C894
5828 public unsafe void MoveImmediate(Point p, bool focus = true, bool cancelAI = true)
5829 {
5830 if (p == null)
5831 {
5832 return;
5833 }
5834 EClass._map.MoveCard(p, this);
5835 if (!this.IsPC || focus)
5836 {
5837 this.renderer.SetFirst(true, *p.PositionCenter());
5838 }
5839 if (this.isChara)
5840 {
5841 if (cancelAI)
5842 {
5843 this.Chara.ai.Cancel();
5844 }
5845 this.Chara.SyncRide();
5846 }
5847 if (this.IsPC && focus)
5848 {
5849 EClass.screen.FocusPC();
5850 EClass.screen.RefreshPosition();
5851 }
5852 }
5853
5854 // Token: 0x0600133F RID: 4927 RVA: 0x0007E71C File Offset: 0x0007C91C
5855 public unsafe void Teleport(Point point, bool silent = false, bool force = false)
5856 {
5857 if (EClass._zone.IsRegion)
5858 {
5859 this.SayNothingHappans();
5860 return;
5861 }
5862 this.PlayEffect("teleport", true, 0f, default(Vector3));
5863 if (!force && (this.elements.Has(400) || (this.isChara && this.Chara.HasCondition<ConGravity>())))
5864 {
5865 this.Say("antiTeleport", this, null, null);
5866 this.PlaySound("gravity", 1f, true);
5867 return;
5868 }
5869 if (!silent)
5870 {
5871 this.PlaySound("teleport", 1f, true);
5872 this.Say("teleported", this, null, null);
5873 }
5874 this._Move(point, Card.MoveType.Walk);
5875 this.renderer.SetFirst(true, *this.pos.PositionCenter());
5876 if (this.isChara)
5877 {
5878 this.Chara.ai.Cancel();
5879 foreach (Chara chara in EClass._map.charas)
5880 {
5881 if (chara.enemy == this)
5882 {
5883 chara.SetEnemy(null);
5884 }
5885 }
5886 this.Chara.RemoveCondition<ConEntangle>();
5887 }
5888 if (this.IsPC)
5889 {
5890 EClass.screen.FocusPC();
5891 EClass.screen.RefreshPosition();
5892 EClass.player.haltMove = true;
5893 }
5894 this.PlayEffect("teleport", false, 0f, default(Vector3));
5895 }
5896
5897 // Token: 0x06001340 RID: 4928 RVA: 0x0007E8A4 File Offset: 0x0007CAA4
5898 public virtual void OnLand()
5899 {
5900 if (this.Cell.IsTopWaterAndNoSnow)
5901 {
5902 this.PlayEffect("ripple", true, 0f, default(Vector3));
5903 this.PlaySound("Footstep/water", 1f, true);
5904 }
5905 }
5906
5907 // Token: 0x06001341 RID: 4929 RVA: 0x0007E8EB File Offset: 0x0007CAEB
5908 public int ResistLvFrom(int ele)
5909 {
5910 return this.ResistLv(EClass.sources.elements.alias[EClass.sources.elements.map[ele].aliasRef].id);
5911 }
5912
5913 // Token: 0x06001342 RID: 4930 RVA: 0x0007E926 File Offset: 0x0007CB26
5914 public int ResistLv(int res)
5915 {
5916 return Element.GetResistLv(this.Evalue(res));
5917 }
5918
5919 // Token: 0x06001343 RID: 4931 RVA: 0x0007E934 File Offset: 0x0007CB34
5920 public bool HasElement(int ele, int req = 1)
5921 {
5922 return this.elements.Value(ele) >= req;
5923 }
5924
5925 // Token: 0x06001344 RID: 4932 RVA: 0x0007E948 File Offset: 0x0007CB48
5926 public bool HasElement(string id, int req = 1)
5927 {
5928 return this.HasElement(EClass.sources.elements.alias[id].id, req);
5929 }
5930
5931 // Token: 0x06001345 RID: 4933 RVA: 0x0007E96B File Offset: 0x0007CB6B
5932 public virtual CardRenderer _CreateRenderer()
5933 {
5934 this.renderer = new CardRenderer();
5935 this.renderer.SetOwner(this);
5936 return this.renderer;
5937 }
5938
5939 // Token: 0x06001346 RID: 4934 RVA: 0x0007E98C File Offset: 0x0007CB8C
5940 public void AddBlood(int a = 1, int id = -1)
5941 {
5942 if (EClass._zone.IsRegion)
5943 {
5944 return;
5945 }
5946 for (int i = 0; i < a; i++)
5947 {
5948 EClass._map.AddDecal(this.pos.x + ((EClass.rnd(2) == 0) ? 0 : (EClass.rnd(3) - 1)), this.pos.z + ((EClass.rnd(2) == 0) ? 0 : (EClass.rnd(3) - 1)), (id == -1) ? (this.isChara ? this.Chara.race.blood : this.material.decal) : id, 1, true);
5949 }
5950 this.PlaySound("blood", 1f, true);
5951 }
5952
5953 // Token: 0x06001347 RID: 4935 RVA: 0x0007EA3C File Offset: 0x0007CC3C
5954 public RenderParam GetRenderParam()
5955 {
5956 RenderParam shared = RenderParam.shared;
5957 shared.color = 11010048f;
5958 shared.liquidLv = 0;
5959 shared.cell = null;
5960 this.SetRenderParam(shared);
5961 return shared;
5962 }
5963
5964 // Token: 0x06001348 RID: 4936 RVA: 0x0007EA70 File Offset: 0x0007CC70
5965 public virtual void SetRenderParam(RenderParam p)
5966 {
5967 }
5968
5969 // Token: 0x06001349 RID: 4937 RVA: 0x0007EA72 File Offset: 0x0007CC72
5970 public void DyeRandom()
5971 {
5972 this.Dye(EClass.sources.materials.rows.RandomItem<SourceMaterial.Row>().alias);
5973 }
5974
5975 // Token: 0x0600134A RID: 4938 RVA: 0x0007EA93 File Offset: 0x0007CC93
5976 public void Dye(string idMat)
5977 {
5978 this.Dye(EClass.sources.materials.alias[idMat]);
5979 }
5980
5981 // Token: 0x0600134B RID: 4939 RVA: 0x0007EAB0 File Offset: 0x0007CCB0
5982 public void Dye(SourceMaterial.Row mat)
5983 {
5984 this.isDyed = true;
5985 this.c_dyeMat = mat.id;
5986 this._colorInt = 0;
5987 }
5988
5989 // Token: 0x0600134C RID: 4940 RVA: 0x0007EACC File Offset: 0x0007CCCC
5990 public void RefreshColor()
5991 {
5992 if (this.isChara)
5993 {
5994 if (this.isDyed)
5995 {
5996 this._colorInt = BaseTileMap.GetColorInt(ref this.DyeMat.matColor, this.sourceRenderCard.colorMod);
5997 return;
5998 }
5999 if (this.isElemental)
6000 {
6001 this._colorInt = BaseTileMap.GetColorInt(ref EClass.setting.elements[this.Chara.MainElement.source.alias].colorSprite, this.sourceRenderCard.colorMod);
6002 return;
6003 }
6004 this._colorInt = 104025;
6005 return;
6006 }
6007 else
6008 {
6009 if (this.isDyed)
6010 {
6011 this._colorInt = BaseTileMap.GetColorInt(ref this.DyeMat.matColor, this.sourceRenderCard.colorMod);
6012 return;
6013 }
6014 if (this.sourceRenderCard.useRandomColor)
6015 {
6016 this._colorInt = BaseTileMap.GetColorInt(this.GetRandomColor(), this.sourceRenderCard.colorMod);
6017 return;
6018 }
6019 if (this.sourceRenderCard.useAltColor)
6020 {
6021 this._colorInt = BaseTileMap.GetColorInt(ref this.material.altColor, this.sourceRenderCard.colorMod);
6022 return;
6023 }
6024 this._colorInt = BaseTileMap.GetColorInt(ref this.material.matColor, this.sourceRenderCard.colorMod);
6025 return;
6026 }
6027 }
6028
6029 // Token: 0x0600134D RID: 4941 RVA: 0x0007EC04 File Offset: 0x0007CE04
6030 public ref Color GetRandomColor()
6031 {
6032 Rand.UseSeed(EClass.game.seed + this.sourceCard._index + this.refVal, delegate
6033 {
6034 Card._randColor = EClass.sources.materials.rows.RandomItem<SourceMaterial.Row>().matColor;
6035 });
6036 return ref Card._randColor;
6037 }
6038
6039 // Token: 0x0600134E RID: 4942 RVA: 0x0007EC58 File Offset: 0x0007CE58
6040 public virtual Sprite GetSprite(int dir = 0)
6041 {
6042 if (this.trait is TraitAbility)
6043 {
6044 Act act = (this.trait as TraitAbility).CreateAct();
6045 return ((act != null) ? act.GetSprite() : null) ?? EClass.core.refs.icons.defaultAbility;
6046 }
6047 return this.sourceCard.GetSprite(dir, this.idSkin, this.IsInstalled && this.pos.cell.IsSnowTile);
6048 }
6049
6050 // Token: 0x0600134F RID: 4943 RVA: 0x0007ECD7 File Offset: 0x0007CED7
6051 public virtual Sprite GetImageSprite()
6052 {
6053 return null;
6054 }
6055
6056 // Token: 0x06001350 RID: 4944 RVA: 0x0007ECDA File Offset: 0x0007CEDA
6057 public void SetImage(Image image, int dir, int idSkin = 0)
6058 {
6059 this.sourceRenderCard.SetImage(image, this.GetSprite(dir), this.colorInt, true, dir, idSkin);
6060 }
6061
6062 // Token: 0x06001351 RID: 4945 RVA: 0x0007ECF8 File Offset: 0x0007CEF8
6063 public virtual void SetImage(Image image)
6064 {
6065 if (this.trait is TraitAbility)
6066 {
6067 (this.trait as TraitAbility).act.SetImage(image);
6068 return;
6069 }
6070 this.sourceRenderCard.SetImage(image, this.GetSprite(0), this.colorInt, true, 0, 0);
6071 }
6072
6073 // Token: 0x06001352 RID: 4946 RVA: 0x0007ED45 File Offset: 0x0007CF45
6074 public void ShowEmo(Emo _emo = Emo.none, float duration = 0f, bool skipSame = true)
6075 {
6076 if (this.isChara && this.Chara.host != null)
6077 {
6078 return;
6079 }
6080 if (_emo == this.lastEmo && skipSame)
6081 {
6082 return;
6083 }
6084 if (_emo != Emo.none)
6085 {
6086 this.renderer.ShowEmo(_emo, duration);
6087 }
6088 this.lastEmo = _emo;
6089 }
6090
6091 // Token: 0x1700058F RID: 1423
6092 // (get) Token: 0x06001353 RID: 4947 RVA: 0x0007ED82 File Offset: 0x0007CF82
6093 public Point ThisOrParentPos
6094 {
6095 get
6096 {
6097 if (!(this.parent is Card))
6098 {
6099 return this.pos;
6100 }
6101 return (this.parent as Card).pos;
6102 }
6103 }
6104
6105 // Token: 0x06001354 RID: 4948 RVA: 0x0007EDA8 File Offset: 0x0007CFA8
6106 public void PlaySoundHold(bool spatial = true)
6107 {
6108 this.PlaySound(this.material.GetSoundDrop(this.sourceCard), 1f, spatial);
6109 }
6110
6111 // Token: 0x06001355 RID: 4949 RVA: 0x0007EDC8 File Offset: 0x0007CFC8
6112 public void PlaySoundDrop(bool spatial = true)
6113 {
6114 this.PlaySound(this.material.GetSoundDrop(this.sourceCard), 1f, spatial);
6115 }
6116
6117 // Token: 0x06001356 RID: 4950 RVA: 0x0007EDE8 File Offset: 0x0007CFE8
6118 public SoundSource PlaySound(string id, float v = 1f, bool spatial = true)
6119 {
6120 if (this.IsPC)
6121 {
6122 spatial = false;
6123 }
6124 if (this.Dist(EClass.pc) < EClass.player.lightRadius + 1 || !spatial)
6125 {
6126 return this.ThisOrParentPos.PlaySound(id, this.isSynced || !spatial, v, spatial);
6127 }
6128 return null;
6129 }
6130
6131 // Token: 0x06001357 RID: 4951 RVA: 0x0007EE3B File Offset: 0x0007D03B
6132 public void KillAnime()
6133 {
6134 this.renderer.KillAnime();
6135 }
6136
6137 // Token: 0x06001358 RID: 4952 RVA: 0x0007EE48 File Offset: 0x0007D048
6138 public void PlayAnime(AnimeID id, bool force = false)
6139 {
6140 this.renderer.PlayAnime(id, force);
6141 }
6142
6143 // Token: 0x06001359 RID: 4953 RVA: 0x0007EE57 File Offset: 0x0007D057
6144 public void PlayAnime(AnimeID id, Point dest, bool force = false)
6145 {
6146 this.renderer.PlayAnime(id, dest);
6147 }
6148
6149 // Token: 0x0600135A RID: 4954 RVA: 0x0007EE68 File Offset: 0x0007D068
6150 public void PlayAnimeLoot()
6151 {
6152 this.renderer.PlayAnime(AnimeID.Loot, default(Vector3), false);
6153 }
6154
6155 // Token: 0x0600135B RID: 4955 RVA: 0x0007EE8C File Offset: 0x0007D08C
6156 public unsafe Effect PlayEffect(string id, bool useRenderPos = true, float range = 0f, Vector3 fix = default(Vector3))
6157 {
6158 if (id.IsEmpty())
6159 {
6160 return null;
6161 }
6162 return Effect.Get(id)._Play(this.pos, fix + ((this.isSynced && useRenderPos) ? this.renderer.position : (*this.pos.Position())) + new Vector3(Rand.Range(-range, range), Rand.Range(-range, range), 0f), 0f, null, null);
6163 }
6164
6165 // Token: 0x0600135C RID: 4956 RVA: 0x0007EF08 File Offset: 0x0007D108
6166 public unsafe void PlayEffect(int ele, bool useRenderPos = true, float range = 0f)
6167 {
6168 Effect effect = Effect.Get("Element/" + EClass.sources.elements.map[ele].alias);
6169 if (effect == null)
6170 {
6171 Debug.Log(ele);
6172 return;
6173 }
6174 effect._Play(this.pos, ((this.isSynced && useRenderPos) ? this.renderer.position : (*this.pos.Position())) + new Vector3(Rand.Range(-range, range), Rand.Range(-range, range), 0f), 0f, null, null);
6175 }
6176
6177 // Token: 0x0600135D RID: 4957 RVA: 0x0007EFAE File Offset: 0x0007D1AE
6178 public virtual void SetDir(int d)
6179 {
6180 this.dir = d;
6181 this.renderer.RefreshSprite();
6182 }
6183
6184 // Token: 0x0600135E RID: 4958 RVA: 0x0007EFC2 File Offset: 0x0007D1C2
6185 public void SetRandomDir()
6186 {
6187 this.SetDir(EClass.rnd(4));
6188 }
6189
6190 // Token: 0x0600135F RID: 4959 RVA: 0x0007EFD0 File Offset: 0x0007D1D0
6191 public virtual void LookAt(Card c)
6192 {
6193 }
6194
6195 // Token: 0x06001360 RID: 4960 RVA: 0x0007EFD2 File Offset: 0x0007D1D2
6196 public virtual void LookAt(Point p)
6197 {
6198 }
6199
6200 // Token: 0x06001361 RID: 4961 RVA: 0x0007EFD4 File Offset: 0x0007D1D4
6201 public virtual void Rotate(bool reverse = false)
6202 {
6203 int num = 4;
6204 if (this.sourceCard.tiles.Length > 4)
6205 {
6206 num = this.sourceCard.tiles.Length;
6207 }
6208 if (this.TileType == TileType.Door)
6209 {
6210 num = 2;
6211 }
6212 if (reverse)
6213 {
6214 int dir = this.dir;
6215 this.dir = dir - 1;
6216 }
6217 else
6218 {
6219 int dir = this.dir;
6220 this.dir = dir + 1;
6221 }
6222 if (this.dir < 0)
6223 {
6224 this.dir = num - 1;
6225 }
6226 if (this.dir == num)
6227 {
6228 this.dir = 0;
6229 }
6230 this.SetDir(this.dir);
6231 this.renderer.RefreshSprite();
6232 }
6233
6234 // Token: 0x06001362 RID: 4962 RVA: 0x0007F070 File Offset: 0x0007D270
6235 public void ChangeAltitude(int a)
6236 {
6237 this.altitude += a;
6238 if (this.altitude < 0)
6239 {
6240 this.altitude = 0;
6241 }
6242 if (this.altitude > this.TileType.MaxAltitude)
6243 {
6244 this.altitude = this.TileType.MaxAltitude;
6245 }
6246 }
6247
6248 // Token: 0x06001363 RID: 4963 RVA: 0x0007F0BF File Offset: 0x0007D2BF
6249 public virtual SubPassData GetSubPassData()
6250 {
6251 return SubPassData.Default;
6252 }
6253
6254 // Token: 0x06001364 RID: 4964 RVA: 0x0007F0C8 File Offset: 0x0007D2C8
6255 public unsafe void SetFreePos(Point point)
6256 {
6257 this.freePos = (EClass.game.config.FreePos && this.isThing && this.TileType.FreeStyle && !this.sourceCard.multisize && !EClass.scene.actionMode.IsRoofEditMode(this));
6258 if (this.freePos)
6259 {
6260 Vector3 vector = *point.Position();
6261 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6262 this.fx = EInput.mposWorld.x + EClass.setting.render.freePosFix.x;
6263 this.fy = EInput.mposWorld.y + EClass.setting.render.freePosFix.y;
6264 if (EClass.game.config.snapFreePos)
6265 {
6266 this.fx -= this.fx % 0.2f;
6267 this.fy -= this.fy % 0.1f;
6268 }
6269 this.fx = this.fx - vector.x + thingPosition.x;
6270 this.fy = this.fy - vector.y + thingPosition.y;
6271 return;
6272 }
6273 this.fx = (this.fy = 0f);
6274 }
6275
6276 // Token: 0x06001365 RID: 4965 RVA: 0x0007F224 File Offset: 0x0007D424
6277 public unsafe void RenderMarker(Point point, bool active, HitResult result, bool main, int dir, bool useCurrentPosition = false)
6278 {
6279 if (dir != -1)
6280 {
6281 this.dir = dir;
6282 }
6283 Vector3 vector = *point.Position();
6284 bool skipRender = point.cell.skipRender;
6285 if (result != HitResult.Default && EClass.screen.guide.isActive && !skipRender)
6286 {
6287 EClass.screen.guide.passGuideBlock.Add(ref vector, (float)((point.HasObj || point.HasChara) ? 5 : 0), 0f);
6288 }
6289 if (!main)
6290 {
6291 return;
6292 }
6293 RenderParam renderParam = this.GetRenderParam();
6294 if (EClass.scene.actionMode.IsRoofEditMode(this))
6295 {
6296 renderParam.x = vector.x;
6297 renderParam.y = vector.y;
6298 renderParam.z = vector.z;
6299 EClass.screen.tileMap.SetRoofHeight(renderParam, point.cell, point.x, point.z, 0, 0, -1, false);
6300 vector.x = renderParam.x;
6301 vector.y = renderParam.y;
6302 vector.z = renderParam.z;
6303 }
6304 if (this.TileType.UseMountHeight && !EClass.scene.actionMode.IsRoofEditMode(this))
6305 {
6306 this.TileType.GetMountHeight(ref vector, point, this.dir, this);
6307 }
6308 vector.z += EClass.setting.render.thingZ;
6309 if (!skipRender)
6310 {
6311 Vector3 thingPosition = EClass.screen.tileMap.GetThingPosition(this, point);
6312 if (this.freePos)
6313 {
6314 vector.x += this.fx;
6315 vector.y += this.fy;
6316 vector.z += thingPosition.z;
6317 }
6318 else
6319 {
6320 vector += thingPosition;
6321 }
6322 }
6323 if (useCurrentPosition)
6324 {
6325 vector = this.renderer.position;
6326 vector.z += -0.01f;
6327 }
6328 if (this.TileType == TileType.Door)
6329 {
6330 vector.z -= 0.5f;
6331 }
6332 renderParam.matColor = (float)(active ? EClass.Colors.blockColors.Active : EClass.Colors.blockColors.Inactive);
6333 point.ApplyAnime(ref vector);
6334 if (this.renderer.hasActor)
6335 {
6336 this.renderer.actor.RefreshSprite();
6337 }
6338 this.renderer.Draw(renderParam, ref vector, false);
6339 }
6340
6341 // Token: 0x06001366 RID: 4966 RVA: 0x0007F470 File Offset: 0x0007D670
6342 public void RecalculateFOV()
6343 {
6344 if (this.fov != null)
6345 {
6346 this.ClearFOV();
6347 this.fov = null;
6348 if (this.IsPC)
6349 {
6350 EClass.player.lightRadius = 1;
6351 }
6352 }
6353 this.CalculateFOV();
6354 }
6355
6356 // Token: 0x06001367 RID: 4967 RVA: 0x0007F4A0 File Offset: 0x0007D6A0
6357 public bool HasLight()
6358 {
6359 return this.GetLightRadius() > 0;
6360 }
6361
6362 // Token: 0x17000590 RID: 1424
6363 // (get) Token: 0x06001368 RID: 4968 RVA: 0x0007F4AC File Offset: 0x0007D6AC
6364 public LightData LightData
6365 {
6366 get
6367 {
6368 if (this._LightData == null)
6369 {
6370 return this._LightData = ((!this.sourceCard.lightData.IsEmpty()) ? EClass.Colors.lightColors[this.sourceCard.lightData] : null);
6371 }
6372 return this._LightData;
6373 }
6374 }
6375
6376 // Token: 0x06001369 RID: 4969 RVA: 0x0007F500 File Offset: 0x0007D700
6377 public float GetLightPower()
6378 {
6379 float num = this.isChara ? EClass.scene.profile.light.fovCurveChara.Evaluate(EClass.scene.timeRatio) : EClass.scene.profile.global.fovPower;
6380 if (this.LightData != null)
6381 {
6382 return 0.01f * this.LightData.color.a * 256f * 1.12f;
6383 }
6384 if (this.IsPCFaction && !this.IsPC)
6385 {
6386 num *= 4f;
6387 }
6388 return num;
6389 }
6390
6391 // Token: 0x0600136A RID: 4970 RVA: 0x0007F593 File Offset: 0x0007D793
6392 public int GetSightRadius()
6393 {
6394 if (this.IsPC)
6395 {
6396 return this.GetLightRadius();
6397 }
6398 return (EClass._map.IsIndoor ? 4 : 5) + (this.IsPCFaction ? 1 : 0);
6399 }
6400
6401 // Token: 0x0600136B RID: 4971 RVA: 0x0007F5C4 File Offset: 0x0007D7C4
6402 public int GetLightRadius()
6403 {
6404 if (!this.isThing)
6405 {
6406 int num = (this.LightData != null) ? this.LightData.radius : 0;
6407 int num2 = 0;
6408 if (this.IsPC)
6409 {
6410 if (this.Chara.isBlind)
6411 {
6412 return 1;
6413 }
6414 num = ((EClass._map.IsIndoor || EClass.world.date.IsNight) ? 2 : ((EClass.world.date.periodOfDay == PeriodOfDay.Day) ? 6 : 5));
6415 num2 = 2;
6416 }
6417 else
6418 {
6419 if (!EClass.core.config.graphic.drawAllyLight)
6420 {
6421 return 0;
6422 }
6423 if (this.LightData == null && !EClass._map.IsIndoor && !EClass.world.date.IsNight)
6424 {
6425 return 0;
6426 }
6427 }
6428 if (this.IsPCFaction)
6429 {
6430 Thing equippedThing = this.Chara.body.GetEquippedThing(45);
6431 if (equippedThing != null)
6432 {
6433 num2 = (equippedThing.trait as TraitLightSource).LightRadius;
6434 }
6435 if (this.Chara.held != null && this.IsPC)
6436 {
6437 int lightRadius = this.Chara.held.GetLightRadius();
6438 if (lightRadius > 0)
6439 {
6440 if (lightRadius > num2)
6441 {
6442 num2 = this.Chara.held.GetLightRadius() - 1;
6443 }
6444 if (num2 < 3)
6445 {
6446 num2 = 3;
6447 }
6448 }
6449 }
6450 if (num < num2)
6451 {
6452 num = num2;
6453 }
6454 }
6455 return num;
6456 }
6457 if (!this.IsInstalled && EClass.pc.held != this)
6458 {
6459 return 0;
6460 }
6461 if (this.trait is TraitLightSource && this.Thing.isEquipped)
6462 {
6463 return (this.trait as TraitLightSource).LightRadius;
6464 }
6465 if (this.LightData == null || !this.trait.IsLightOn)
6466 {
6467 return 0;
6468 }
6469 return this.LightData.radius;
6470 }
6471
6472 // Token: 0x0600136C RID: 4972 RVA: 0x0007F768 File Offset: 0x0007D968
6473 public void CalculateFOV()
6474 {
6475 int lightRadius = this.GetLightRadius();
6476 if (lightRadius == 0 || !this.IsAliveInCurrentZone || !EClass._zone.isStarted)
6477 {
6478 return;
6479 }
6480 float num = this.GetLightPower();
6481 if (this.IsPC)
6482 {
6483 if (this.Chara.held != null && this.Chara.held.GetLightRadius() > 0)
6484 {
6485 num += this.Chara.held.GetLightPower();
6486 }
6487 if (lightRadius <= 2)
6488 {
6489 num = 0f;
6490 }
6491 foreach (Condition condition in this.Chara.conditions)
6492 {
6493 condition.OnCalculateFov(this.fov, ref lightRadius, ref num);
6494 }
6495 if (num > EClass.scene.profile.global.playerLightPowerLimit)
6496 {
6497 num = EClass.scene.profile.global.playerLightPowerLimit;
6498 }
6499 num *= EClass.scene.profile.light.playerLightMod;
6500 EClass.player.lightRadius = lightRadius;
6501 EClass.player.lightPower = num;
6502 }
6503 if (this.fov == null)
6504 {
6505 this.fov = this.CreateFov();
6506 }
6507 this.fov.Perform(this.pos.x, this.pos.z, lightRadius, num * 2f);
6508 }
6509
6510 // Token: 0x0600136D RID: 4973 RVA: 0x0007F8CC File Offset: 0x0007DACC
6511 public void SetRandomLightColors()
6512 {
6513 this.c_lightColor = (int)((byte)(EClass.rnd(8) + 1)) * 1024 + (int)((byte)(EClass.rnd(8) + 1) * 32) + (int)((byte)(EClass.rnd(8) + 1));
6514 }
6515
6516 // Token: 0x0600136E RID: 4974 RVA: 0x0007F8FC File Offset: 0x0007DAFC
6517 public Fov CreateFov()
6518 {
6519 Fov fov = new Fov();
6520 int num = this.trait.UseLightColor ? this.c_lightColor : 0;
6521 if (num != 0)
6522 {
6523 fov.r = (byte)(num / 1024);
6524 fov.g = (byte)(num % 1024 / 32);
6525 fov.b = (byte)(num % 32);
6526 }
6527 else if (this.LightData != null)
6528 {
6529 fov.r = (byte)(this.LightData.color.r * 16f);
6530 fov.g = (byte)(this.LightData.color.g * 16f);
6531 fov.b = (byte)(this.LightData.color.b * 16f);
6532 }
6533 else if (this.isChara)
6534 {
6535 fov.r = 0;
6536 fov.g = 0;
6537 fov.b = 0;
6538 }
6539 else
6540 {
6541 fov.r = 3;
6542 fov.g = 2;
6543 fov.b = 1;
6544 }
6545 if (this.isChara && this.Chara.held != null && this.Chara.held.GetLightRadius() > 0)
6546 {
6547 Fov fov2 = this.Chara.held.CreateFov();
6548 Fov fov3 = fov;
6549 fov3.r += fov2.r;
6550 Fov fov4 = fov;
6551 fov4.g += fov2.g;
6552 Fov fov5 = fov;
6553 fov5.b += fov2.b;
6554 }
6555 if (this.IsPC)
6556 {
6557 fov.isPC = true;
6558 foreach (Condition condition in this.Chara.conditions)
6559 {
6560 condition.OnCreateFov(fov);
6561 }
6562 }
6563 fov.limitGradient = (this.IsPCParty && EClass.scene.profile.global.limitGradient);
6564 return fov;
6565 }
6566
6567 // Token: 0x0600136F RID: 4975 RVA: 0x0007FAE0 File Offset: 0x0007DCE0
6568 public void ClearFOV()
6569 {
6570 if (this.fov == null || this.fov.lastPoints.Count == 0)
6571 {
6572 return;
6573 }
6574 this.fov.Perform(this.pos.x, this.pos.z, 0, 1f);
6575 }
6576
6577 // Token: 0x06001370 RID: 4976 RVA: 0x0007FB2F File Offset: 0x0007DD2F
6578 public virtual void OnSimulateHour(VirtualDate date)
6579 {
6580 this.trait.OnSimulateHour(date);
6581 if (date.IsRealTime)
6582 {
6583 this.DecayNatural(1);
6584 }
6585 }
6586
6587 // Token: 0x06001371 RID: 4977 RVA: 0x0007FB4C File Offset: 0x0007DD4C
6588 public void DecayNatural(int hour = 1)
6589 {
6590 if (this.isNPCProperty)
6591 {
6592 return;
6593 }
6594 this.things.ForeachReverse(delegate(Thing t)
6595 {
6596 t.DecayNatural(hour);
6597 });
6598 if (this.parent is Card && (this.parent as Card).trait.CanChildDecay(this))
6599 {
6600 this.Decay(10 * hour);
6601 return;
6602 }
6603 if (this.isChara || this.trait.Decay == 0)
6604 {
6605 return;
6606 }
6607 this.Decay(this.trait.Decay * hour);
6608 }
6609
6610 // Token: 0x06001372 RID: 4978 RVA: 0x0007FBEC File Offset: 0x0007DDEC
6611 public void Decay(int a = 10)
6612 {
6613 Card card = this.parent as Card;
6614 int num = 200;
6615 int num2 = this.MaxDecay / 4 * 3;
6616 if (a > 0)
6617 {
6618 if (card != null)
6619 {
6620 num = card.trait.DecaySpeedChild;
6621 }
6622 num = num * this.trait.DecaySpeed / 100;
6623 int num3 = this.Evalue(405);
6624 if (num3 != 0)
6625 {
6626 num = num * (100 - num3 * 2) / 100;
6627 }
6628 if (num < 0)
6629 {
6630 num = 0;
6631 }
6632 }
6633 else
6634 {
6635 num = 100;
6636 }
6637 a = a * num / 100;
6638 if (!this.IsDecayed && this.decay + a > this.MaxDecay)
6639 {
6640 if (card != null && !card.trait.OnChildDecay(this))
6641 {
6642 return;
6643 }
6644 if (EClass.pc.HasElement(1325, 1) && this.GetRootCard() is Chara && this.category.IsChildOf("food"))
6645 {
6646 Thing thing = TraitSeed.MakeRandomSeed(true).SetNum(Mathf.Min(this.Num, 3));
6647 card.AddCard(thing);
6648 if (!this.<Decay>g__IsParentLocked|800_0())
6649 {
6650 this.GetRootCard().Say("seed_rot", this.GetRootCard(), this, thing.Name, null);
6651 }
6652 this.Destroy();
6653 return;
6654 }
6655 if (this.parent == EClass._zone)
6656 {
6657 this.Say("rot", this, null, null);
6658 }
6659 else if (this.GetRootCard() == EClass.pc)
6660 {
6661 if (!this.<Decay>g__IsParentLocked|800_0())
6662 {
6663 EClass.pc.Say("rotInv", this, EClass.pc, null, null);
6664 }
6665 LayerInventory.SetDirty(this.Thing);
6666 }
6667 if (this.IsFood)
6668 {
6669 this.elements.SetBase(73, -10, 0);
6670 }
6671 }
6672 else if (this.decay < num2 && this.decay + a >= num2 && this.GetRootCard() == EClass.pc)
6673 {
6674 if (!this.<Decay>g__IsParentLocked|800_0())
6675 {
6676 EClass.pc.Say("rottingInv", this, EClass.pc, null, null);
6677 }
6678 LayerInventory.SetDirty(this.Thing);
6679 }
6680 this.decay += a;
6681 }
6682
6683 // Token: 0x06001373 RID: 4979 RVA: 0x0007FDE4 File Offset: 0x0007DFE4
6684 public void Talk(string idTopic, string ref1 = null, string ref2 = null, bool forceSync = false)
6685 {
6686 if (this.IsPC && !EClass.player.forceTalk && idTopic != "goodBoy" && idTopic != "insane")
6687 {
6688 EClass.player.forceTalk = false;
6689 Msg.SetColor();
6690 return;
6691 }
6692 EClass.player.forceTalk = false;
6693 if (!this.isSynced && !forceSync)
6694 {
6695 Msg.SetColor();
6696 return;
6697 }
6698 GameLang.refDrama1 = ref1;
6699 GameLang.refDrama2 = ref2;
6700 string talkText = this.GetTalkText(idTopic, true, true);
6701 if (this.id == "adv_gaki")
6702 {
6703 BackerContent.GakiConvert(ref talkText);
6704 }
6705 this.TalkRaw(talkText, ref1, ref2, forceSync);
6706 }
6707
6708 // Token: 0x06001374 RID: 4980 RVA: 0x0007FE88 File Offset: 0x0007E088
6709 public void TalkRaw(string text, string ref1 = null, string ref2 = null, bool forceSync = false)
6710 {
6711 if ((!this.isSynced && !forceSync) || text.IsEmpty())
6712 {
6713 Msg.SetColor();
6714 return;
6715 }
6716 if (ref1 != null)
6717 {
6718 text = text.Replace("#1", ref1);
6719 }
6720 if (ref2 != null)
6721 {
6722 text = text.Replace("#2", ref2);
6723 }
6724 this.HostRenderer.Say(this.ApplyNewLine(text), default(Color), 0f);
6725 bool flag = text.StartsWith("*");
6726 Msg.SetColor(text.StartsWith("(") ? Msg.colors.Thinking : (flag ? Msg.colors.Ono : Msg.colors.Talk));
6727 if (!flag)
6728 {
6729 text = text.Bracket(0);
6730 }
6731 Msg.Say(text.Replace("&", ""));
6732 }
6733
6734 // Token: 0x06001375 RID: 4981 RVA: 0x0007FF58 File Offset: 0x0007E158
6735 public string ApplyNewLine(string text)
6736 {
6737 if (text.Contains("&"))
6738 {
6739 string str = "_comma".lang();
6740 text = text.Replace(str + " &", Environment.NewLine ?? "");
6741 text = text.Replace(str + "&", Environment.NewLine ?? "");
6742 text = text.Replace("&", Environment.NewLine ?? "");
6743 }
6744 return text;
6745 }
6746
6747 // Token: 0x17000591 RID: 1425
6748 // (get) Token: 0x06001376 RID: 4982 RVA: 0x0007FFDB File Offset: 0x0007E1DB
6749 public CardRenderer HostRenderer
6750 {
6751 get
6752 {
6753 if (!this.isChara || this.Chara.host == null)
6754 {
6755 return this.renderer;
6756 }
6757 return this.Chara.host.renderer;
6758 }
6759 }
6760
6761 // Token: 0x06001377 RID: 4983 RVA: 0x0008000C File Offset: 0x0007E20C
6762 public void SayRaw(string text, string ref1 = null, string ref2 = null)
6763 {
6764 if (!this.isSynced)
6765 {
6766 return;
6767 }
6768 if (text.IsEmpty())
6769 {
6770 return;
6771 }
6772 if (ref1 != null)
6773 {
6774 text = text.Replace("#1", ref1);
6775 }
6776 if (ref2 != null)
6777 {
6778 text = text.Replace("#2", ref2);
6779 }
6780 this.HostRenderer.Say(text, default(Color), 0f);
6781 }
6782
6783 // Token: 0x17000592 RID: 1426
6784 // (get) Token: 0x06001378 RID: 4984 RVA: 0x00080067 File Offset: 0x0007E267
6785 public bool ShouldShowMsg
6786 {
6787 get
6788 {
6789 return (this.IsPC || this.parent == EClass.pc || this.isSynced) && (!this.isChara || !this.Chara.isDead);
6790 }
6791 }
6792
6793 // Token: 0x06001379 RID: 4985 RVA: 0x000800A0 File Offset: 0x0007E2A0
6794 public void SayNothingHappans()
6795 {
6796 this.Say("nothingHappens", null, null);
6797 }
6798
6799 // Token: 0x0600137A RID: 4986 RVA: 0x000800AF File Offset: 0x0007E2AF
6800 public void Say(string lang, string ref1 = null, string ref2 = null)
6801 {
6802 if (this.ShouldShowMsg)
6803 {
6804 Msg.Say(this.IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, ref1, ref2, null, null);
6805 }
6806 Msg.SetColor();
6807 }
6808
6809 // Token: 0x0600137B RID: 4987 RVA: 0x000800E9 File Offset: 0x0007E2E9
6810 public void Say(string lang, Card c1, Card c2, string ref1 = null, string ref2 = null)
6811 {
6812 if (this.ShouldShowMsg)
6813 {
6814 Msg.Say(this.IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, c2, ref1, ref2);
6815 }
6816 Msg.SetColor();
6817 }
6818
6819 // Token: 0x0600137C RID: 4988 RVA: 0x00080125 File Offset: 0x0007E325
6820 public void Say(string lang, Card c1, string ref1 = null, string ref2 = null)
6821 {
6822 if (this.ShouldShowMsg)
6823 {
6824 Msg.Say(this.IsPC ? Lang.Game.TryGetId(lang + "_pc", lang) : lang, c1, ref1, ref2, null);
6825 }
6826 Msg.SetColor();
6827 }
6828
6829 // Token: 0x0600137D RID: 4989 RVA: 0x00080160 File Offset: 0x0007E360
6830 public string GetTalkText(string idTopic, bool stripPun = false, bool useDefault = true)
6831 {
6832 bool flag = this.isChara && this.Chara.IsHuman;
6833 string text = MOD.listTalk.GetTalk(this.c_idTalk.IsEmpty(this.id), idTopic, useDefault, flag);
6834 if (!text.IsEmpty())
6835 {
6836 text = text.Split('|', StringSplitOptions.None).RandomItem<string>();
6837 if (!flag || (this.IsDeadOrSleeping && this.IsAliveInCurrentZone))
6838 {
6839 if (!text.StartsWith("(") && !text.StartsWith("*"))
6840 {
6841 text = "(" + text + ")";
6842 }
6843 text = text.Replace("。)", ")");
6844 }
6845 }
6846 return this.ApplyTone(text, stripPun);
6847 }
6848
6849 // Token: 0x0600137E RID: 4990 RVA: 0x00080211 File Offset: 0x0007E411
6850 public string ApplyTone(string text, bool stripPun = false)
6851 {
6852 text = GameLang.ConvertDrama(text, this.Chara);
6853 Chara chara = this.Chara;
6854 string c_idTone = this.c_idTone;
6855 Biography biography = this.bio;
6856 return Card.ApplyTone(chara, ref text, c_idTone, (biography != null) ? biography.gender : 0, stripPun);
6857 }
6858
6859 // Token: 0x0600137F RID: 4991 RVA: 0x00080248 File Offset: 0x0007E448
6860 public static string ApplyTone(Chara c, ref string text, string _tones, int gender, bool stripPun = false)
6861 {
6862 if (text.IsEmpty())
6863 {
6864 return text;
6865 }
6866 string[] array = _tones.IsEmpty("").Split('|', StringSplitOptions.None);
6867 string key = array[0];
6868 MOD.tones.Initialize();
6869 string text2;
6870 if (!Lang.setting.useTone || MOD.tones.list.Count == 0)
6871 {
6872 text2 = text.Replace("{", "").Replace("}", "");
6873 }
6874 else
6875 {
6876 if (array[0].IsEmpty())
6877 {
6878 key = "default";
6879 }
6880 if (MOD.tones.all.ContainsKey(key))
6881 {
6882 StringBuilder stringBuilder = MOD.tones.ApplyTone(key, ref text, gender);
6883 if (Lang.isJP && c != null && c.trait.EnableTone)
6884 {
6885 if (array.Length >= 2)
6886 {
6887 stringBuilder.Replace("_toneI".lang(), array[1]);
6888 }
6889 if (array.Length >= 3)
6890 {
6891 stringBuilder.Replace("_toneYou".lang(), array[2]);
6892 }
6893 }
6894 text2 = stringBuilder.ToString();
6895 }
6896 else
6897 {
6898 text2 = text.Replace("{", "").Replace("}", "");
6899 }
6900 }
6901 if (!stripPun || !Lang.setting.stripPuns)
6902 {
6903 return text2;
6904 }
6905 return text2.StripLastPun();
6906 }
6907
6908 // Token: 0x06001380 RID: 4992 RVA: 0x00080389 File Offset: 0x0007E589
6909 public void SetRandomTalk()
6910 {
6911 MOD.listTalk.Initialize();
6912 if (!MOD.listTalk.list[0].ContainsKey(this.id))
6913 {
6914 this.c_idTalk = MOD.listTalk.GetRandomID("human");
6915 }
6916 }
6917
6918 // Token: 0x06001381 RID: 4993 RVA: 0x000803C8 File Offset: 0x0007E5C8
6919 public void SetRandomTone()
6920 {
6921 MOD.tones.Initialize();
6922 List<Dictionary<string, string>> list = MOD.tones.list;
6923 if (list.Count == 0)
6924 {
6925 return;
6926 }
6927 string text = list.RandomItem<Dictionary<string, string>>()["id"];
6928 for (int i = 0; i < 10; i++)
6929 {
6930 Dictionary<string, string> dictionary = list.RandomItem<Dictionary<string, string>>();
6931 if (EClass.rnd(100) <= dictionary["chance"].ToInt())
6932 {
6933 text = dictionary["id"];
6934 break;
6935 }
6936 }
6937 ToneDataList tones = MOD.tones;
6938 string text2 = text;
6939 Biography biography = this.bio;
6940 this.c_idTone = tones.GetToneID(text2, (biography != null) ? biography.gender : 0);
6941 }
6942
6943 // Token: 0x06001382 RID: 4994 RVA: 0x00080464 File Offset: 0x0007E664
6944 public void TryStack(Thing t)
6945 {
6946 if (t == this)
6947 {
6948 return;
6949 }
6950 ThingContainer.DestData dest = this.things.GetDest(t, true);
6951 if (dest.stack != null)
6952 {
6953 if (this.IsPC)
6954 {
6955 this.Say("stack_thing", t, dest.stack, null, null);
6956 }
6957 t.TryStackTo(dest.stack);
6958 }
6959 }
6960
6961 // Token: 0x06001383 RID: 4995 RVA: 0x000804B8 File Offset: 0x0007E6B8
6962 public void ApplyBacker(int bid)
6963 {
6964 this.ChangeRarity(Rarity.Normal);
6965 SourceBacker.Row row = EClass.sources.backers.map.TryGetValue(bid, null);
6966 if (row == null)
6967 {
6968 return;
6969 }
6970 this.c_idBacker = row.id;
6971 if (row.type == 4)
6972 {
6973 this.Chara.bio.SetGender(row.gender);
6974 this.Chara.hostility = (this.Chara.c_originalHostility = Hostility.Neutral);
6975 }
6976 if (row.type == 6)
6977 {
6978 this.Chara.bio.SetGender(row.gender);
6979 this.Chara.bio.SetPortrait(this.Chara);
6980 this.Chara.idFaith = row.deity.ToLower();
6981 }
6982 if (row.type == 4 || row.type == 5 || row.type == 7)
6983 {
6984 this.idSkin = ((row.skin == 0) ? EClass.rnd(this.sourceCard._tiles.Length) : row.skin);
6985 if (this.id == "putty_snow")
6986 {
6987 this.idSkin = 0;
6988 }
6989 }
6990 if (bid == 164)
6991 {
6992 this.Chara.EQ_ID("amulet_moonnight", -1, Rarity.Random);
6993 }
6994 }
6995
6996 // Token: 0x06001384 RID: 4996 RVA: 0x000805F4 File Offset: 0x0007E7F4
6997 public void RemoveBacker()
6998 {
6999 if (this.c_idBacker == 164)
7000 {
7001 Thing thing = this.Chara.things.Find("amulet_moonnight", -1, -1);
7002 if (thing != null)
7003 {
7004 thing.Destroy();
7005 }
7006 }
7007 this.c_idBacker = 0;
7008 }
7009
7010 // Token: 0x06001385 RID: 4997 RVA: 0x00080636 File Offset: 0x0007E836
7011 public void SetPaintData()
7012 {
7013 EClass.ui.Hide(0f);
7014 EClass.core.WaitForEndOfFrame(delegate
7015 {
7016 this.ClearPaintSprite();
7017 this.c_textureData = this.GetPaintData();
7018 EClass.core.WaitForEndOfFrame(delegate
7019 {
7020 EClass.ui.Show(0f);
7021 });
7022 });
7023 }
7024
7025 // Token: 0x06001386 RID: 4998 RVA: 0x00080660 File Offset: 0x0007E860
7026 public byte[] GetPaintData()
7027 {
7028 Sprite sprite = this.GetSprite(0);
7029 Texture2D texture2D = ScreenCapture.CaptureScreenshotAsTexture();
7030 int num = sprite.texture.width * 2;
7031 int num2 = sprite.texture.height * 2;
7032 int x = (int)Mathf.Clamp(Input.mousePosition.x - (float)(num / 2), 1f, (float)(texture2D.width - num - 1));
7033 int y = (int)Mathf.Clamp(Input.mousePosition.y - (float)(num2 / 2), 1f, (float)(texture2D.height - num2 - 1));
7034 Color[] pixels = texture2D.GetPixels(x, y, num, num2);
7035 Texture2D texture2D2 = new Texture2D(num, num2, TextureFormat.ARGB32, false);
7036 texture2D2.SetPixels(pixels);
7037 texture2D2.Apply();
7038 byte[] result = texture2D2.EncodeToJPG();
7039 UnityEngine.Object.Destroy(texture2D);
7040 UnityEngine.Object.Destroy(texture2D2);
7041 return result;
7042 }
7043
7044 // Token: 0x06001387 RID: 4999 RVA: 0x0008071B File Offset: 0x0007E91B
7045 public void ClearPaintSprite()
7046 {
7047 if (this._paintSprite)
7048 {
7049 UnityEngine.Object.Destroy(this._paintSprite.texture);
7050 UnityEngine.Object.Destroy(this._paintSprite);
7051 this._paintSprite = null;
7052 }
7053 }
7054
7055 // Token: 0x06001388 RID: 5000 RVA: 0x0008074C File Offset: 0x0007E94C
7056 public Sprite GetPaintSprite()
7057 {
7058 if (!this._paintSprite)
7059 {
7060 byte[] c_textureData = this.c_textureData;
7061 Texture2D texture2D = new Texture2D(1, 1);
7062 texture2D.LoadImage(c_textureData);
7063 this._paintSprite = Sprite.Create(texture2D, new Rect(0f, 0f, (float)texture2D.width, (float)texture2D.height), new Vector2(0.5f, 0.5f), 200f);
7064 EClass.game.loadedTextures.Add(texture2D);
7065 TraitCanvas traitCanvas = this.trait as TraitCanvas;
7066 if (traitCanvas != null)
7067 {
7068 texture2D.filterMode = (traitCanvas.PointFilter ? FilterMode.Point : FilterMode.Bilinear);
7069 }
7070 }
7071 return this._paintSprite;
7072 }
7073
7074 // Token: 0x06001389 RID: 5001 RVA: 0x000807F8 File Offset: 0x0007E9F8
7075 public void TryUnrestrain(bool force = false, Chara c = null)
7076 {
7077 if (this.GetRestrainer() == null || force)
7078 {
7079 this.isRestrained = false;
7080 this.Say("unrestrained", this, null, null);
7081 if (this != c)
7082 {
7083 this.Talk("thanks", null, null, false);
7084 }
7085 this.MoveImmediate(this.pos.GetNearestPoint(false, true, true, false), true, true);
7086 this.renderer.SetFirst(true);
7087 if (c != null)
7088 {
7089 if (this.c_rescueState == RescueState.WaitingForRescue)
7090 {
7091 this.c_rescueState = RescueState.Rescued;
7092 if (c.IsPC)
7093 {
7094 EClass.player.ModKarma(2);
7095 }
7096 }
7097 foreach (Chara tg in c.pos.ListCharasInRadius(c, 5, (Chara _c) => _c.id == "fanatic" && _c.faith != this.Chara.faith))
7098 {
7099 c.DoHostileAction(tg, true);
7100 }
7101 }
7102 }
7103 }
7104
7105 // Token: 0x0600138A RID: 5002 RVA: 0x000808E0 File Offset: 0x0007EAE0
7106 public TraitShackle GetRestrainer()
7107 {
7108 foreach (Card card in this.pos.ListCards(false))
7109 {
7110 if (card.trait is TraitShackle && card.c_uidRefCard == this.uid)
7111 {
7112 return card.trait as TraitShackle;
7113 }
7114 }
7115 return null;
7116 }
7117
7118 // Token: 0x0600138B RID: 5003 RVA: 0x00080960 File Offset: 0x0007EB60
7119 public virtual void Tick()
7120 {
7121 }
7122
7123 // Token: 0x0600138C RID: 5004 RVA: 0x00080964 File Offset: 0x0007EB64
7124 public static int GetTilePrice(TileRow row, SourceMaterial.Row mat)
7125 {
7126 int num = 0;
7127 if (row.id == 0)
7128 {
7129 return num;
7130 }
7131 num = row.value * mat.value / 100;
7132 if (num < 0)
7133 {
7134 num = 1;
7135 }
7136 return num;
7137 }
7138
7139 // Token: 0x0600138D RID: 5005 RVA: 0x00080995 File Offset: 0x0007EB95
7140 public Thing SetPriceFix(int a)
7141 {
7142 this.c_priceFix = a;
7143 return this.Thing;
7144 }
7145
7146 // Token: 0x0600138E RID: 5006 RVA: 0x000809A4 File Offset: 0x0007EBA4
7147 public int GetEquipValue()
7148 {
7149 return this.GetValue(false);
7150 }
7151
7152 // Token: 0x0600138F RID: 5007 RVA: 0x000809B0 File Offset: 0x0007EBB0
7153 public void SetSale(bool sale)
7154 {
7155 if (this.isSale == sale)
7156 {
7157 return;
7158 }
7159 this.isSale = sale;
7160 if (this.isSale)
7161 {
7162 EClass._map.props.sales.Add(this);
7163 return;
7164 }
7165 EClass._map.props.sales.Remove(this);
7166 }
7167
7168 // Token: 0x06001390 RID: 5008 RVA: 0x00080A04 File Offset: 0x0007EC04
7169 public int GetValue(bool sell = false)
7170 {
7171 int value = this.trait.GetValue();
7172 if (value == 0)
7173 {
7174 return 0;
7175 }
7176 float num = (float)value;
7177 num = num * (float)Mathf.Max(100 + this.rarityLv + Mathf.Min(this.QualityLv * 10, 200), 80) / 100f;
7178 if (this.IsFood && !this.material.tag.Contains("food"))
7179 {
7180 num *= 0.5f;
7181 }
7182 float num2;
7183 if (this.IsEquipmentOrRanged || this.trait is TraitMod)
7184 {
7185 if (sell)
7186 {
7187 num *= 0.3f;
7188 }
7189 num2 = 2f;
7190 }
7191 else
7192 {
7193 num2 = 0.5f;
7194 }
7195 if (this.isReplica)
7196 {
7197 num *= 0.15f;
7198 }
7199 if (!this.IsUnique)
7200 {
7201 if (this.IsEquipmentOrRanged && this.rarity >= Rarity.Legendary)
7202 {
7203 num = Mathf.Max(num, 1800f + num / 5f);
7204 }
7205 num = num * (100f + num2 * (float)(this.material.value - 100)) / 100f;
7206 if (this.IsEquipmentOrRanged)
7207 {
7208 int num3 = 0;
7209 foreach (Element element in this.elements.dict.Values)
7210 {
7211 num3 += element.source.value;
7212 }
7213 num = num * (float)(100 + (sell ? ((int)MathF.Sqrt((float)num3) * 10) : num3)) / 100f;
7214 if (this.rarity >= Rarity.Legendary)
7215 {
7216 num = Mathf.Max(num, 3600f + num / 5f);
7217 }
7218 }
7219 }
7220 if (this.trait is TraitRecipe && sell)
7221 {
7222 num *= 0.1f;
7223 }
7224 if (this.encLV != 0)
7225 {
7226 if (this.category.tag.Contains("enc"))
7227 {
7228 num *= 0.7f + (float)(this.encLV - 1) * 0.2f;
7229 }
7230 else if (this.IsFood)
7231 {
7232 if (this.id == "honey")
7233 {
7234 num += (float)(this.encLV * 10);
7235 }
7236 else
7237 {
7238 num = num * Mathf.Min(1f + 0.1f * (float)this.encLV, 2f) + (float)(this.encLV * 100);
7239 }
7240 }
7241 else
7242 {
7243 num *= 1f + (float)this.encLV * 0.01f;
7244 }
7245 }
7246 return (int)num;
7247 }
7248
7249 // Token: 0x06001391 RID: 5009 RVA: 0x00080C70 File Offset: 0x0007EE70
7250 public virtual int GetPrice(CurrencyType currency = CurrencyType.Money, bool sell = false, PriceType priceType = PriceType.Default, Chara c = null)
7251 {
7252 if (!sell)
7253 {
7254 if (this.id == "littleball")
7255 {
7256 return 0;
7257 }
7258 if (currency != CurrencyType.Medal)
7259 {
7260 if (currency == CurrencyType.Plat && this.id == "lucky_coin")
7261 {
7262 return 100;
7263 }
7264 }
7265 else
7266 {
7267 string text = this.id;
7268 uint num = <PrivateImplementationDetails>.ComputeStringHash(text);
7269 if (num <= 2142614709U)
7270 {
7271 if (num <= 696483963U)
7272 {
7273 if (num != 319581401U)
7274 {
7275 if (num != 371758720U)
7276 {
7277 if (num == 696483963U)
7278 {
7279 if (text == "diary_catsister")
7280 {
7281 return 85;
7282 }
7283 }
7284 }
7285 else if (text == "wrench_extend_v")
7286 {
7287 return 6;
7288 }
7289 }
7290 else if (text == "diary_lady")
7291 {
7292 return 25;
7293 }
7294 }
7295 else if (num <= 1237752336U)
7296 {
7297 if (num != 875087290U)
7298 {
7299 if (num == 1237752336U)
7300 {
7301 if (text == "water")
7302 {
7303 return 3;
7304 }
7305 }
7306 }
7307 else if (text == "wrench_extend_h")
7308 {
7309 return 6;
7310 }
7311 }
7312 else if (num != 1783752896U)
7313 {
7314 if (num == 2142614709U)
7315 {
7316 if (text == "diary_sister")
7317 {
7318 return 12;
7319 }
7320 }
7321 }
7322 else if (text == "wrench_bed")
7323 {
7324 return 3;
7325 }
7326 }
7327 else if (num <= 2853982554U)
7328 {
7329 if (num != 2149577330U)
7330 {
7331 if (num != 2315782384U)
7332 {
7333 if (num == 2853982554U)
7334 {
7335 if (text == "wrench_storage")
7336 {
7337 return 4;
7338 }
7339 }
7340 }
7341 else if (text == "monsterball")
7342 {
7343 return this.LV / 8;
7344 }
7345 }
7346 else if (text == "1165")
7347 {
7348 return 10;
7349 }
7350 }
7351 else if (num <= 2987720544U)
7352 {
7353 if (num != 2893910830U)
7354 {
7355 if (num == 2987720544U)
7356 {
7357 if (text == "wrench_fridge")
7358 {
7359 return 15;
7360 }
7361 }
7362 }
7363 else if (text == "bill_tax")
7364 {
7365 return 3;
7366 }
7367 }
7368 else if (num != 3142504220U)
7369 {
7370 if (num == 3660019884U)
7371 {
7372 if (text == "container_magic")
7373 {
7374 return 20;
7375 }
7376 }
7377 }
7378 else if (text == "bill")
7379 {
7380 return 3;
7381 }
7382 }
7383 }
7384 if (sell && this.noSell)
7385 {
7386 return 0;
7387 }
7388 if (!sell && this.id == "casino_coin")
7389 {
7390 return 20;
7391 }
7392 int value = this.GetValue(sell);
7393 if (value == 0)
7394 {
7395 return 0;
7396 }
7397 if (c == null)
7398 {
7399 c = EClass.pc;
7400 }
7401 float p = (float)value;
7402 Trait trait = this.trait;
7403 if (!(trait is TraitBed))
7404 {
7405 TraitContainer traitContainer = trait as TraitContainer;
7406 if (traitContainer != null)
7407 {
7408 p *= 1f + 1f * (float)(this.things.width - traitContainer.Width) + 1f * (float)(this.things.height - traitContainer.Height);
7409 }
7410 }
7411 else
7412 {
7413 p *= 1f + 0.5f * (float)this.c_containerSize;
7414 }
7415 p += (float)this.c_priceAdd;
7416 if (this.c_priceFix != 0)
7417 {
7418 p = (float)((int)(p * (float)Mathf.Clamp(100 + this.c_priceFix, 0, 1000000) / 100f));
7419 if (p == 0f)
7420 {
7421 return 0;
7422 }
7423 }
7424 if (this.isStolen)
7425 {
7426 if (sell && priceType == PriceType.PlayerShop && EClass.Branch != null && EClass.Branch.policies.IsActive(2824, -1))
7427 {
7428 p = p * 100f / Mathf.Max(110f, 170f - Mathf.Sqrt((float)(EClass.Branch.Evalue(2824) * 5)));
7429 }
7430 else if (sell && Guild.Thief.IsMember)
7431 {
7432 p = (float)Guild.Thief.SellStolenPrice((int)p);
7433 }
7434 else
7435 {
7436 p *= 0.5f;
7437 }
7438 }
7439 if (!sell && this.category.id == "spellbook")
7440 {
7441 p = (float)Guild.Mage.BuySpellbookPrice((int)p);
7442 }
7443 int num2 = (priceType == PriceType.CopyShop) ? 5 : 1;
7444 float num3 = 1f + Mathf.Min(0.01f * (float)this.Evalue(752), 1f) + Mathf.Min(0.01f * (float)this.Evalue(751), 1f) * (float)num2;
7445 p *= num3;
7446 p *= 0.2f;
7447 if (sell)
7448 {
7449 p *= 0.2f;
7450 if (currency == CurrencyType.Money && (this.category.IsChildOf("meal") || this.category.IsChildOf("preserved")))
7451 {
7452 p *= 0.5f;
7453 }
7454 if (priceType - PriceType.Shipping <= 1 && (this.category.IsChildOf("vegi") || this.category.IsChildOf("fruit")))
7455 {
7456 p *= ((EClass.pc.faith == EClass.game.religions.Harvest) ? 3f : 2f);
7457 }
7458 }
7459 if (this.id == "rod_wish")
7460 {
7461 p *= (sell ? 0.01f : 50f);
7462 }
7463 switch (currency)
7464 {
7465 case CurrencyType.Medal:
7466 p *= 0.0002f;
7467 goto IL_7FA;
7468 case CurrencyType.Ecopo:
7469 if (this.trait is TraitSeed)
7470 {
7471 p *= 2f;
7472 goto IL_7FA;
7473 }
7474 if (this.trait is TraitEcoMark)
7475 {
7476 p *= 1f;
7477 goto IL_7FA;
7478 }
7479 p *= 0.2f;
7480 goto IL_7FA;
7481 case CurrencyType.Money2:
7482 p *= 0.005f;
7483 goto IL_7FA;
7484 case CurrencyType.Influence:
7485 p *= 0.002f;
7486 goto IL_7FA;
7487 case CurrencyType.Casino_coin:
7488 p *= 0.1f;
7489 goto IL_7FA;
7490 }
7491 if (this.IsIdentified || (this.trait is TraitErohon && !sell))
7492 {
7493 if (this.blessedState == BlessedState.Blessed)
7494 {
7495 p *= 1.25f;
7496 }
7497 else if (this.blessedState == BlessedState.Cursed)
7498 {
7499 p *= 0.5f;
7500 }
7501 else if (this.blessedState == BlessedState.Doomed)
7502 {
7503 p *= 0.2f;
7504 }
7505 if (this.trait.HasCharges)
7506 {
7507 p = p * 0.05f + p * (0.5f + Mathf.Clamp(0.1f * (float)this.c_charges, 0f, 1.5f));
7508 }
7509 if (this.IsDecayed)
7510 {
7511 p *= 0.5f;
7512 }
7513 }
7514 else
7515 {
7516 Rand.UseSeed(this.uid, delegate
7517 {
7518 p = (float)(sell ? (1 + EClass.rnd(15)) : (50 + EClass.rnd(500)));
7519 });
7520 }
7521 if (!sell)
7522 {
7523 p *= 1f + 0.2f * (float)c.Evalue(1406);
7524 }
7525 IL_7FA:
7526 float num4 = Math.Clamp(Mathf.Sqrt((float)(c.Evalue(291) + ((!sell && EClass._zone.IsPCFaction) ? (EClass.Branch.Evalue(2800) * 2) : 0))), 0f, 25f);
7527 if (priceType != PriceType.Shipping)
7528 {
7529 if (priceType == PriceType.PlayerShop)
7530 {
7531 if (sell)
7532 {
7533 float num5 = 1.25f;
7534 if (EClass.Branch != null)
7535 {
7536 if (EClass.Branch.policies.IsActive(2817, -1))
7537 {
7538 num5 += 0.1f + 0.01f * Mathf.Sqrt((float)EClass.Branch.Evalue(2817));
7539 }
7540 if (EClass.Branch.policies.IsActive(2816, -1))
7541 {
7542 num5 += 0.2f + 0.02f * Mathf.Sqrt((float)EClass.Branch.Evalue(2816));
7543 }
7544 if (this.isChara)
7545 {
7546 if (EClass.Branch.policies.IsActive(2828, -1))
7547 {
7548 num5 += 0.1f + 0.01f * Mathf.Sqrt((float)EClass.Branch.Evalue(2828));
7549 }
7550 }
7551 else if (this.category.IsChildOf("food") || this.category.IsChildOf("drink"))
7552 {
7553 if (EClass.Branch.policies.IsActive(2818, -1))
7554 {
7555 num5 += 0.05f + 0.005f * Mathf.Sqrt((float)EClass.Branch.Evalue(2818));
7556 }
7557 }
7558 else if (this.category.IsChildOf("furniture"))
7559 {
7560 if (EClass.Branch.policies.IsActive(2819, -1))
7561 {
7562 num5 += 0.05f + 0.005f * Mathf.Sqrt((float)EClass.Branch.Evalue(2819));
7563 }
7564 }
7565 else if (EClass.Branch.policies.IsActive(2820, -1))
7566 {
7567 num5 += 0.05f + 0.005f * Mathf.Sqrt((float)EClass.Branch.Evalue(2820));
7568 }
7569 }
7570 p *= num5;
7571 }
7572 }
7573 }
7574 else if (sell)
7575 {
7576 p *= 1.1f;
7577 }
7578 if (currency > CurrencyType.Money)
7579 {
7580 num4 = 0f;
7581 }
7582 p *= (sell ? (1f + num4 * 0.02f) : (1f - num4 * 0.02f));
7583 if (sell)
7584 {
7585 p = (float)EClass.curve((int)p, 10000, 10000, 80);
7586 }
7587 if (p < 1f)
7588 {
7589 p = (float)(sell ? 0 : 1);
7590 }
7591 if (!sell)
7592 {
7593 if (currency == CurrencyType.Casino_coin)
7594 {
7595 if (p > 100000f)
7596 {
7597 p = (float)(Mathf.CeilToInt(p / 100000f) * 100000);
7598 }
7599 else if (p > 10000f)
7600 {
7601 p = (float)(Mathf.CeilToInt(p / 10000f) * 10000);
7602 }
7603 else if (p > 1000f)
7604 {
7605 p = (float)(Mathf.CeilToInt(p / 1000f) * 1000);
7606 }
7607 else if (p > 100f)
7608 {
7609 p = (float)(Mathf.CeilToInt(p / 100f) * 100);
7610 }
7611 else if (p > 10f)
7612 {
7613 p = (float)(Mathf.CeilToInt(p / 10f) * 10);
7614 }
7615 }
7616 if (this.trait is TraitDeed)
7617 {
7618 p *= Mathf.Pow(2f, (float)EClass.player.flags.landDeedBought);
7619 }
7620 }
7621 return (int)p;
7622 }
7623
7624 // Token: 0x06001392 RID: 5010 RVA: 0x00081889 File Offset: 0x0007FA89
7625 public virtual string GetHoverText()
7626 {
7627 return this.Name + this.GetExtraName();
7628 }
7629
7630 // Token: 0x06001393 RID: 5011 RVA: 0x0008189C File Offset: 0x0007FA9C
7631 public virtual string GetHoverText2()
7632 {
7633 return "";
7634 }
7635
7636 // Token: 0x06001394 RID: 5012 RVA: 0x000818A4 File Offset: 0x0007FAA4
7637 public int Dist(Card c)
7638 {
7639 if (!this.IsMultisize && !c.IsMultisize)
7640 {
7641 return this.pos.Distance(c.pos);
7642 }
7643 if (this.IsMultisize)
7644 {
7645 int dist = 99;
7646 this.ForeachPoint(delegate(Point p, bool main)
7647 {
7648 int num = Card.<Dist>g__DistMulti|837_0(p, c);
7649 if (num < dist)
7650 {
7651 dist = num;
7652 }
7653 });
7654 return dist;
7655 }
7656 return Card.<Dist>g__DistMulti|837_0(this.pos, c);
7657 }
7658
7659 // Token: 0x06001395 RID: 5013 RVA: 0x00081924 File Offset: 0x0007FB24
7660 public int Dist(Point p)
7661 {
7662 return this.pos.Distance(p);
7663 }
7664
7665 // Token: 0x06001396 RID: 5014 RVA: 0x00081932 File Offset: 0x0007FB32
7666 public bool IsInMutterDistance(int d = 10)
7667 {
7668 return this.pos.Distance(EClass.pc.pos) < d;
7669 }
7670
7671 // Token: 0x06001397 RID: 5015 RVA: 0x0008194C File Offset: 0x0007FB4C
7672 public void SetCensored(bool enable)
7673 {
7674 this.isCensored = enable;
7675 if (EClass.core.config.other.noCensor)
7676 {
7677 this.isCensored = false;
7678 }
7679 this.renderer.SetCensored(this.isCensored);
7680 }
7681
7682 // Token: 0x06001398 RID: 5016 RVA: 0x00081984 File Offset: 0x0007FB84
7683 public void SetDeconstruct(bool deconstruct)
7684 {
7685 if (this.isDeconstructing == deconstruct)
7686 {
7687 return;
7688 }
7689 if (deconstruct)
7690 {
7691 EClass._map.props.deconstructing.Add(this);
7692 }
7693 else
7694 {
7695 EClass._map.props.deconstructing.Remove(this);
7696 }
7697 this.isDeconstructing = deconstruct;
7698 }
7699
7700 // Token: 0x06001399 RID: 5017 RVA: 0x000819D4 File Offset: 0x0007FBD4
7701 public virtual void SetSortVal(UIList.SortMode m, CurrencyType currency = CurrencyType.Money)
7702 {
7703 switch (m)
7704 {
7705 case UIList.SortMode.ByNumber:
7706 this.sortVal = -this.Num * 1000;
7707 return;
7708 case UIList.SortMode.ByValue:
7709 this.sortVal = -this.GetPrice(currency, false, PriceType.Default, null) * 1000;
7710 return;
7711 case UIList.SortMode.ByCategory:
7712 this.sortVal = this.category.sortVal * 1000;
7713 return;
7714 case UIList.SortMode.ByEquip:
7715 this.sortVal = ((this.c_equippedSlot != 0) ? 0 : (this.category.sortVal * 1000));
7716 return;
7717 case UIList.SortMode.ByWeight:
7718 this.sortVal = -this.ChildrenAndSelfWeight * 1000;
7719 return;
7720 case UIList.SortMode.ByPrice:
7721 this.sortVal = -this.GetPrice(currency, false, PriceType.Default, null) * 1000;
7722 return;
7723 case UIList.SortMode.ByWeightSingle:
7724 this.sortVal = -this.ChildrenAndSelfWeightSingle * 1000;
7725 return;
7726 }
7727 this.sortVal = this.sourceCard._index * 1000;
7728 }
7729
7730 // Token: 0x0600139A RID: 5018 RVA: 0x00081AE0 File Offset: 0x0007FCE0
7731 public virtual int SecondaryCompare(UIList.SortMode m, Card c)
7732 {
7733 int num = 0;
7734 if (num == 0)
7735 {
7736 num = this.id.CompareTo(c.id);
7737 }
7738 if (num == 0)
7739 {
7740 num = this.trait.CompareTo(c);
7741 }
7742 if (num == 0)
7743 {
7744 num = this.GetName(NameStyle.Full, 1).CompareTo(c.GetName(NameStyle.Full, 1));
7745 }
7746 if (num == 0)
7747 {
7748 num = this.refVal - c.refVal;
7749 }
7750 if (num == 0)
7751 {
7752 num = this.c_charges - c.c_charges;
7753 }
7754 if (num == 0)
7755 {
7756 num = this.encLV - c.encLV;
7757 }
7758 if (num == 0)
7759 {
7760 num = this.uid - c.uid;
7761 }
7762 return num;
7763 }
7764
7765 // Token: 0x0600139B RID: 5019 RVA: 0x00081B74 File Offset: 0x0007FD74
7766 public void ForeachFOV(Func<Point, bool> func)
7767 {
7768 if (this.fov == null)
7769 {
7770 return;
7771 }
7772 foreach (KeyValuePair<int, byte> keyValuePair in this.fov.lastPoints)
7773 {
7774 Point arg = new Point().Set(keyValuePair.Key);
7775 if (func(arg))
7776 {
7777 break;
7778 }
7779 }
7780 }
7781
7782 // Token: 0x0600139C RID: 5020 RVA: 0x00081BEC File Offset: 0x0007FDEC
7783 public void ForeachPoint(Action<Point, bool> action)
7784 {
7785 if (this.IsMultisize)
7786 {
7787 this.pos.ForeachMultiSize(this.W, this.H, action);
7788 return;
7789 }
7790 action(this.pos, true);
7791 }
7792
7793 // Token: 0x0600139D RID: 5021 RVA: 0x00081C1C File Offset: 0x0007FE1C
7794 public void OnInspect()
7795 {
7796 }
7797
7798 // Token: 0x17000593 RID: 1427
7799 // (get) Token: 0x0600139E RID: 5022 RVA: 0x00081C1E File Offset: 0x0007FE1E
7800 public bool CanInspect
7801 {
7802 get
7803 {
7804 return !this.isDestroyed && this.ExistsOnMap;
7805 }
7806 }
7807
7808 // Token: 0x17000594 RID: 1428
7809 // (get) Token: 0x0600139F RID: 5023 RVA: 0x00081C30 File Offset: 0x0007FE30
7810 public string InspectName
7811 {
7812 get
7813 {
7814 return this.Name;
7815 }
7816 }
7817
7818 // Token: 0x17000595 RID: 1429
7819 // (get) Token: 0x060013A0 RID: 5024 RVA: 0x00081C38 File Offset: 0x0007FE38
7820 public Point InspectPoint
7821 {
7822 get
7823 {
7824 return this.pos;
7825 }
7826 }
7827
7828 // Token: 0x17000596 RID: 1430
7829 // (get) Token: 0x060013A1 RID: 5025 RVA: 0x00081C40 File Offset: 0x0007FE40
7830 public Vector3 InspectPosition
7831 {
7832 get
7833 {
7834 return this.renderer.position;
7835 }
7836 }
7837
7838 // Token: 0x060013A2 RID: 5026 RVA: 0x00081C4D File Offset: 0x0007FE4D
7839 public virtual void WriteNote(UINote n, Action<UINote> onWriteNote = null, IInspect.NoteMode mode = IInspect.NoteMode.Default, Recipe recipe = null)
7840 {
7841 }
7842
7843 // Token: 0x060013A3 RID: 5027 RVA: 0x00081C50 File Offset: 0x0007FE50
7844 public void Inspect()
7845 {
7846 SE.Play("pop_paper");
7847 if (this.isChara)
7848 {
7849 LayerChara layerChara = EClass.ui.AddLayerDontCloseOthers<LayerChara>();
7850 layerChara.windows[0].SetRect(EClass.core.refs.rects.center, false);
7851 layerChara.SetChara(this.Chara);
7852 return;
7853 }
7854 EClass.ui.AddLayerDontCloseOthers<LayerInfo>().SetThing(this.Thing, false);
7855 }
7856
7857 // Token: 0x060013A4 RID: 5028 RVA: 0x00081CC2 File Offset: 0x0007FEC2
7858 public virtual bool HasCondition<T>() where T : Condition
7859 {
7860 return false;
7861 }
7862
7863 // Token: 0x060013A5 RID: 5029 RVA: 0x00081CC8 File Offset: 0x0007FEC8
7864 public bool HaveFur()
7865 {
7866 if (!this.isChara)
7867 {
7868 return false;
7869 }
7870 string a = this.id;
7871 return a == "putty_snow" || a == "putty_snow_gold" || !this.Chara.race.fur.IsEmpty();
7872 }
7873
7874 // Token: 0x060013A6 RID: 5030 RVA: 0x00081D1A File Offset: 0x0007FF1A
7875 public bool CanBeSheared()
7876 {
7877 return !EClass._zone.IsUserZone && this.HaveFur() && this.c_fur >= 0;
7878 }
7879
7880 // Token: 0x060013AA RID: 5034 RVA: 0x00081DBA File Offset: 0x0007FFBA
7881 [CompilerGenerated]
7882 private bool <SpawnLoot>g__chance|729_0(int i)
7883 {
7884 i = i * 100 / (100 + EClass.player.codex.GetOrCreate(this.id).BonusDropLv * 10);
7885 if (i < 1)
7886 {
7887 i = 1;
7888 }
7889 return EClass.rnd(i) == 0;
7890 }
7891
7892 // Token: 0x060013AB RID: 5035 RVA: 0x00081DF8 File Offset: 0x0007FFF8
7893 [CompilerGenerated]
7894 internal static bool <MakeFoodRef>g__IsIgnoreName|733_0(Card c)
7895 {
7896 if (c == null)
7897 {
7898 return true;
7899 }
7900 string a = c.id;
7901 return a == "dough_cake" || a == "dough_bread" || a == "noodle" || a == "flour" || a == "rice";
7902 }
7903
7904 // Token: 0x060013AC RID: 5036 RVA: 0x00081E55 File Offset: 0x00080055
7905 [CompilerGenerated]
7906 private bool <Decay>g__IsParentLocked|800_0()
7907 {
7908 return this.parent is Thing && (this.parent as Thing).c_lockLv > 0;
7909 }
7910
7911 // Token: 0x060013AF RID: 5039 RVA: 0x00081EE4 File Offset: 0x000800E4
7912 [CompilerGenerated]
7913 internal static int <Dist>g__DistMulti|837_0(Point p1, Card c)
7914 {
7915 if (!c.IsMultisize)
7916 {
7917 return p1.Distance(c.pos);
7918 }
7919 int dist = 99;
7920 c.ForeachPoint(delegate(Point p, bool main)
7921 {
7922 int num = p1.Distance(p);
7923 if (num < dist)
7924 {
7925 dist = num;
7926 }
7927 });
7928 return dist;
7929 }
7930
7931 // Token: 0x04000F4B RID: 3915
7932 [JsonProperty(PropertyName = "A")]
7933 public int[] _ints = new int[30];
7934
7935 // Token: 0x04000F4C RID: 3916
7936 [JsonProperty(PropertyName = "B")]
7937 public string id = "";
7938
7939 // Token: 0x04000F4D RID: 3917
7940 [JsonProperty(PropertyName = "C")]
7941 public ThingContainer things = new ThingContainer();
7942
7943 // Token: 0x04000F4E RID: 3918
7944 [JsonProperty(PropertyName = "D")]
7945 public ElementContainerCard elements = new ElementContainerCard();
7946
7947 // Token: 0x04000F4F RID: 3919
7948 [JsonProperty(PropertyName = "E")]
7949 public Biography bio;
7950
7951 // Token: 0x04000F50 RID: 3920
7952 [JsonProperty(PropertyName = "SC")]
7953 public List<int> sockets;
7954
7955 // Token: 0x04000F51 RID: 3921
7956 public AIAct reservedAct;
7957
7958 // Token: 0x04000F52 RID: 3922
7959 public Props props;
7960
7961 // Token: 0x04000F53 RID: 3923
7962 public Trait trait;
7963
7964 // Token: 0x04000F54 RID: 3924
7965 public ICardParent parent;
7966
7967 // Token: 0x04000F55 RID: 3925
7968 public Fov fov;
7969
7970 // Token: 0x04000F56 RID: 3926
7971 public Point pos = new Point();
7972
7973 // Token: 0x04000F57 RID: 3927
7974 public CardRenderer renderer;
7975
7976 // Token: 0x04000F58 RID: 3928
7977 public int turn;
7978
7979 // Token: 0x04000F59 RID: 3929
7980 public int _colorInt;
7981
7982 // Token: 0x04000F5A RID: 3930
7983 public float roundTimer;
7984
7985 // Token: 0x04000F5B RID: 3931
7986 public float angle = 180f;
7987
7988 // Token: 0x04000F5C RID: 3932
7989 public bool isDestroyed;
7990
7991 // Token: 0x04000F5D RID: 3933
7992 public CardBlueprint bp;
7993
7994 // Token: 0x04000F5E RID: 3934
7995 public BitArray32 _bits1;
7996
7997 // Token: 0x04000F5F RID: 3935
7998 public BitArray32 _bits2;
7999
8000 // Token: 0x04000F60 RID: 3936
8001 public PlaceState placeState;
8002
8003 // Token: 0x04000F61 RID: 3937
8004 public bool dirtyWeight = true;
8005
8006 // Token: 0x04000F62 RID: 3938
8007 private int _childrenWeight;
8008
8009 // Token: 0x04000F63 RID: 3939
8010 private SourceCategory.Row _category;
8011
8012 // Token: 0x04000F64 RID: 3940
8013 public SourceMaterial.Row _material;
8014
8015 // Token: 0x04000F65 RID: 3941
8016 private static Color _randColor;
8017
8018 // Token: 0x04000F66 RID: 3942
8019 public Emo lastEmo;
8020
8021 // Token: 0x04000F67 RID: 3943
8022 private LightData _LightData;
8023
8024 // Token: 0x04000F68 RID: 3944
8025 private Sprite _paintSprite;
8026
8027 // Token: 0x04000F69 RID: 3945
8028 public int sortVal;
8029
8030 // Token: 0x02000948 RID: 2376
8031 public enum MoveResult
8032 {
8033 // Token: 0x0400271F RID: 10015
8034 Fail,
8035 // Token: 0x04002720 RID: 10016
8036 Success,
8037 // Token: 0x04002721 RID: 10017
8038 Door
8039 }
8040
8041 // Token: 0x02000949 RID: 2377
8042 public enum MoveType
8043 {
8044 // Token: 0x04002723 RID: 10019
8045 Walk,
8046 // Token: 0x04002724 RID: 10020
8047 Force
8048 }
8049}
Definition AIAct.cs:7
Definition Act.2.cs:7
Definition Area.cs:6
Definition Card.cs:13
Definition Cell.cs:10
Definition Chara.cs:12
Definition DNA.cs:9
Definition Dice.cs:7
Definition Fov.cs:7
Definition Guild.cs:5
Definition Msg.cs:7
Definition Point.cs:11
Definition Props.cs:8
Definition Quest.cs:8
Definition Thing.cs:10
Definition Trait.cs:9
Definition Zone.cs:14