Elin Decompiled Documentation EA 23.292 Nightly
Loading...
Searching...
No Matches
FEAT.cs
Go to the documentation of this file.
1using System.Collections.Generic;
2using UnityEngine;
3
4public class FEAT
5{
6 public const int featLER = 1624;
7
8 public const int featMAG = 1625;
9
10 public const int featWIL = 1626;
11
12 public const int featDefense = 1631;
13
14 public const int featLuck = 1628;
15
16 public const int featSPD = 1629;
17
18 public const int featHardy = 1630;
19
20 public const int featPER = 1623;
21
22 public const int featEvade = 1632;
23
24 public const int featCHA = 1627;
25
26 public const int featEND = 1622;
27
28 public const int featManaMeat = 1421;
29
30 public const int featSTR = 1620;
31
32 public const int featStamina = 1612;
33
34 public const int featMana = 1611;
35
36 public const int featLife = 1610;
37
38 public const int featDisguise = 1427;
39
40 public const int featNeckHunter = 1426;
41
42 public const int featMimic = 1425;
43
44 public const int featElite = 1424;
45
46 public const int featPeaky = 1423;
47
48 public const int featHealer = 1422;
49
50 public const int featSpotting = 1633;
51
52 public const int featExecutioner = 1420;
53
54 public const int featDEX = 1621;
55
56 public const int featNegotiate = 1634;
57
58 public const int featGourmet = 1650;
59
60 public const int featFaith = 1636;
61
62 public const int featMilitant = 1419;
63
64 public const int featComat = 1750;
65
66 public const int featFastFucker = 1664;
67
68 public const int featFastEater = 1663;
69
70 public const int featGoldenFinger = 1662;
71
72 public const int featDismantler = 1661;
73
74 public const int featLooter = 1660;
75
76 public const int featFisher = 1659;
77
78 public const int featChef = 1658;
79
80 public const int featManaCost = 1657;
81
82 public const int featScavenger = 1656;
83
84 public const int featModelBeliever = 1655;
85
86 public const int featMartial = 1635;
87
88 public const int featHeavyCasting = 1654;
89
90 public const int featRapidArrow = 1652;
91
92 public const int featMagicManner = 1651;
93
94 public const int featDefender = 1649;
95
96 public const int featRapidMagic = 1648;
97
98 public const int featSummoner = 1647;
99
100 public const int featLonelySoul = 1646;
101
102 public const int featParty = 1645;
103
104 public const int featBodyParts = 1644;
105
106 public const int featSorter = 1643;
107
108 public const int featSleeper = 1642;
109
110 public const int featResCurse = 1641;
111
112 public const int featAnimalLover = 1640;
113
114 public const int featDreamWaker = 1653;
115
116 public const int featSwordsage = 1418;
117
118 public const int featGod_trickery1 = 1345;
119
120 public const int featInquisitor = 1416;
121
122 public const int featCosmicHorror = 1233;
123
124 public const int featHeavyEater = 1234;
125
126 public const int featLightEater = 1235;
127
128 public const int featNorland = 1236;
129
130 public const int featRoran = 1237;
131
132 public const int featElder = 1238;
133
134 public const int featDemon = 1239;
135
136 public const int featMassSummoner = 1240;
137
138 public const int featMeatCushion = 1241;
139
140 public const int featGeneSlot = 1242;
141
142 public const int featEternalYouth = 1243;
143
144 public const int featCentaur = 1244;
145
146 public const int featSevenSense = 1245;
147
148 public const int featPegasus = 1246;
149
150 public const int featLibra = 1247;
151
152 public const int featMiscreation = 1248;
153
154 public const int featBloodBond = 1249;
155
156 public const int featVampire = 1250;
157
158 public const int featAshborn = 1251;
159
160 public const int featWitch = 1417;
161
162 public const int featGoodKarma = 1270;
163
164 public const int featBadKarma = 1271;
165
166 public const int featPeacemaker = 1272;
167
168 public const int featBloom = 1273;
169
170 public const int featSlimeEvolution = 1274;
171
172 public const int featBelovedOne = 1275;
173
174 public const int featHarem = 1276;
175
176 public const int featGoddess = 1290;
177
178 public const int featGod_element1 = 1300;
179
180 public const int featBaby = 1232;
181
182 public const int featGod_earth1 = 1305;
183
184 public const int featNirvana = 1231;
185
186 public const int featLittleOne = 1229;
187
188 public const int featSlowFood = 1200;
189
190 public const int featManaBond = 1201;
191
192 public const int featFastLearner = 1202;
193
194 public const int featGrowParts = 1203;
195
196 public const int featFairyWeak = 1204;
197
198 public const int featCannibalism = 1205;
199
200 public const int featMelilithCurse = 1206;
201
202 public const int featFoxBless = 1207;
203
204 public const int featFoxLearn = 1208;
205
206 public const int featFluffyTail = 1209;
207
208 public const int featUndead = 1210;
209
210 public const int featSnail = 1211;
211
212 public const int featFairyResist = 1212;
213
214 public const int featElea = 1213;
215
216 public const int featManaPrecision = 1214;
217
218 public const int featDwarf = 1215;
219
220 public const int featSuccubus = 1216;
221
222 public const int featGolem = 1217;
223
224 public const int featMetal = 1218;
225
226 public const int featElderCrab = 1219;
227
228 public const int featFate = 1220;
229
230 public const int featSpike = 1221;
231
232 public const int featSplit = 1222;
233
234 public const int featAcidBody = 1223;
235
236 public const int featShiva = 1224;
237
238 public const int featLoyal = 1225;
239
240 public const int featUnderground = 1226;
241
242 public const int featServant = 1227;
243
244 public const int featDemigod = 1228;
245
246 public const int featAdam = 1230;
247
248 public const int featGod_wind1 = 1310;
249
250 public const int featAquatic = 1252;
251
252 public const int featGod_healing1 = 1320;
253
254 public const int featFoxMaid = 1415;
255
256 public const int featWhiteVixen = 1414;
257
258 public const int featFairysan = 1413;
259
260 public const int featLuckyCat = 1412;
261
262 public const int featEarthStrength = 1411;
263
264 public const int featReboot = 1410;
265
266 public const int featBoost = 1409;
267
268 public const int featPaladin2 = 1408;
269
270 public const int featPaladin = 1407;
271
272 public const int featGod_machine1 = 1315;
273
274 public const int featTourist = 1406;
275
276 public const int featPianist = 1405;
277
278 public const int featArcher = 1404;
279
280 public const int featFarmer = 1403;
281
282 public const int featWizard = 1402;
283
284 public const int featThief = 1401;
285
286 public const int featWarrior = 1400;
287
288 public const int featGod_strife1 = 1355;
289
290 public const int featGod_moonshadow1 = 1350;
291
292 public const int featGod_oblivion1 = 1340;
293
294 public const int featGod_harmony1 = 1335;
295
296 public const int featGod_luck1 = 1330;
297
298 public const int featGod_harvest1 = 1325;
299
300 public static readonly int[] IDS = new int[147]
301 {
302 1624, 1625, 1626, 1631, 1628, 1629, 1630, 1623, 1632, 1627,
303 1622, 1421, 1620, 1612, 1611, 1610, 1427, 1426, 1425, 1424,
304 1423, 1422, 1633, 1420, 1621, 1634, 1650, 1636, 1419, 1750,
305 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656, 1655,
306 1635, 1654, 1652, 1651, 1649, 1648, 1647, 1646, 1645, 1644,
307 1643, 1642, 1641, 1640, 1653, 1418, 1345, 1416, 1233, 1234,
308 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244,
309 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1417, 1270, 1271,
310 1272, 1273, 1274, 1275, 1276, 1290, 1300, 1232, 1305, 1231,
311 1229, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208,
312 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218,
313 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228,
314 1230, 1310, 1252, 1320, 1415, 1414, 1413, 1412, 1411, 1410,
315 1409, 1408, 1407, 1315, 1406, 1405, 1404, 1403, 1402, 1401,
316 1400, 1355, 1350, 1340, 1335, 1330, 1325
317 };
318}
319public class Feat : Element
320{
321 public static List<string> hints = new List<string>();
322
323 public static string[] featRef = new string[5];
324
325 public override bool ShowBonuses => false;
326
327 public override string Name => base.source.GetText().SplitNewline().TryGet(base.Value - 1);
328
329 public override string FullName
330 {
331 get
332 {
333 string[] array = base.source.GetText().SplitNewline();
334 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
335 }
336 }
337
338 public override bool ShowXP => false;
339
340 public override bool ShowValue => false;
341
342 public override int CostLearn => base.source.cost.TryGet(base.Value - 1);
343
344 public override bool CanLink(ElementContainer owner)
345 {
346 return !base.IsGlobalElement;
347 }
348
349 public override Sprite GetIcon(string suffix = "")
350 {
351 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
352 }
353
354 public override void OnWriteNote(UINote n, ElementContainer owner)
355 {
356 Apply(base.Value, owner, hint: true);
357 foreach (string hint in hints)
358 {
359 n.AddText("_bullet".lang() + hint);
360 }
361 }
362
364 {
365 string text = "";
366 Apply(base.Value, owner, hint: true);
367 foreach (string hint in hints)
368 {
369 text = text + hint.StripLastPun() + ", ";
370 }
371 return text.TrimEnd(' ').TrimEnd(',');
372 }
373
374 public override bool IsPurchaseFeatReqMet(ElementContainer owner, int lv = -1)
375 {
376 if (base.source.req.Length != 0)
377 {
378 Element element = owner.GetElement(base.source.req[0]);
379 if (element == null || element.ValueWithoutLink < ((base.source.req.Length == 1) ? 1 : base.source.req[Mathf.Clamp(((lv == -1 && owner != null) ? owner.Value(id) : lv) + 1, 1, base.source.req.Length - 1)].ToInt()))
380 {
381 return false;
382 }
383 }
384 return true;
385 }
386
387 public override void WritePurchaseReq(UINote n, int lv = -1)
388 {
389 if (base.source.req.Length != 0)
390 {
391 Element element = Element.Create(base.source.req[0], (base.source.req.Length == 1) ? 1 : base.source.req[Mathf.Clamp(((lv == -1 && owner != null) ? owner.Value(id) : lv) + 1, 1, base.source.req.Length - 1)].ToInt());
392 if (element != null)
393 {
394 n.AddHeader("featReq");
395 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
396 }
397 }
398 }
399
400 public List<string> Apply(int a, ElementContainer owner, bool hint = false)
401 {
402 if (hint)
403 {
404 hints.Clear();
405 }
407 {
408 feat = this,
409 owner = owner,
410 hint = hint
411 };
412 elinFeatApplyEventArgs.SetData(a);
413 BaseModManager.PublishEvent("elin.feat.apply", elinFeatApplyEventArgs);
414 a = elinFeatApplyEventArgs.data;
415 int value = base.Value;
416 int A = Mathf.Abs(a);
417 int invert = ((a >= 0) ? 1 : (-1));
418 if (hint)
419 {
420 featRef[0] = a.ToString() ?? "";
421 featRef[1] = a.ToString() ?? "";
422 }
423 Chara chara = owner.Chara;
424 int num = vPotential;
425 if (!hint && a > 0 && chara != null)
426 {
427 num = (vPotential = chara.LV);
428 }
429 switch (id)
430 {
431 case 1660:
432 featRef[0] = (a * 25).ToString() ?? "";
433 break;
434 case 1206:
435 ModBase(78, -a * 10, hide: false);
436 break;
437 case 1642:
438 featRef[0] = ((a == 1) ? 10 : ((a == 2) ? 20 : 30)).ToString() ?? "";
439 break;
440 case 1643:
441 featRef[0] = ((a == 1) ? 1 : ((a == 2) ? 3 : 5)).ToString() ?? "";
442 break;
443 case 1610:
444 ModBase(60, a * 4, hide: false);
445 break;
446 case 1611:
447 ModBase(61, a * 4, hide: false);
448 break;
449 case 1612:
450 ModBase(62, a * 4, hide: false);
451 break;
452 case 1620:
453 ModAttribute(70);
454 break;
455 case 1621:
456 ModAttribute(72);
457 break;
458 case 1622:
459 ModAttribute(71);
460 break;
461 case 1623:
462 ModAttribute(73);
463 break;
464 case 1626:
465 ModAttribute(75);
466 break;
467 case 1625:
468 ModAttribute(76);
469 break;
470 case 1627:
471 ModAttribute(77);
472 break;
473 case 1624:
474 ModAttribute(74);
475 break;
476 case 1629:
477 ModBase(79, a * 5, hide: false);
478 break;
479 case 1630:
480 ModBase(65, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide: false);
481 break;
482 case 1631:
483 ModBase(64, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide: false);
484 break;
485 case 1632:
486 ModBase(150, a * 2, hide: false);
487 break;
488 case 1633:
489 ModBase(210, a * 3, hide: false);
490 ModBase(402, ((A == 3) ? 1 : 0) * invert, hide: false);
491 break;
492 case 1634:
493 ModBase(291, a * 4, hide: false);
494 break;
495 case 1635:
496 ModBase(100, a * 3, hide: false);
497 break;
498 case 1636:
499 ModBase(306, a * 4, hide: false);
500 break;
501 case 1628:
502 ModBase(78, a * 2, hide: false);
503 break;
504 case 1640:
505 ModBase(77, a * 2, hide: false);
506 break;
507 case 1400:
508 featRef[0] = (a * 10).ToString() ?? "";
509 break;
510 case 1404:
511 featRef[0] = (a * 10).ToString() ?? "";
512 break;
513 case 1401:
514 ModBase(78, a * 15, hide: false);
515 break;
516 case 1406:
517 featRef[0] = (a * 20).ToString() ?? "";
518 featRef[1] = (a * 5).ToString() ?? "";
519 break;
520 case 1644:
521 featRef[0] = a.ToString() ?? "";
522 if (!hint)
523 {
524 if (a > 0)
525 {
527 }
528 else
529 {
530 _ = a;
531 _ = 0;
532 }
533 if (owner.Chara.IsPC && (bool)WidgetEquip.Instance)
534 {
536 }
537 }
538 ModBase(60, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide: false);
539 ModBase(79, (A > 5) ? ((A - 5) * -5 * invert) : 0, hide: false);
540 ModBase(77, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide: false);
541 break;
542 case 1230:
543 ModBase(60, A * 2 * invert, hide: false);
544 ModBase(79, A * 3 * invert, hide: false);
545 break;
546 case 1204:
547 ModBase(64, a * 50, hide: true);
548 ModBase(401, a, hide: false);
549 break;
550 case 1202:
551 ModBase(403, a * 20, hide: true);
552 break;
553 case 1210:
554 ModBase(955, a * 5, hide: false);
555 ModBase(953, a * 10, hide: false);
556 ModBase(958, a * 5, hide: false);
557 ModBase(956, a * 10, hide: false);
558 ModBase(950, a * -5, hide: false);
559 ModBase(960, a * -5, hide: false);
560 ModBase(423, a, hide: false);
561 break;
562 case 1290:
563 ModBase(418, a * 100, hide: false);
564 break;
565 case 1239:
566 ModBase(956, a * 5, hide: false);
567 ModBase(959, a * 5, hide: false);
568 ModBase(423, a, hide: false);
569 ModBase(424, a, hide: false);
570 ModBase(421, a, hide: false);
571 break;
572 case 1233:
573 ModBase(954, a * 10, hide: false);
574 ModBase(423, a, hide: false);
575 ModBase(425, a, hide: false);
576 ModBase(424, a, hide: false);
577 ModBase(421, a, hide: false);
578 break;
579 case 1226:
580 ModBase(955, a * 5, hide: false);
581 ModBase(953, a * 5, hide: false);
582 break;
583 case 1212:
584 ModBase(961, a * 5, hide: false);
585 ModBase(953, a * 5, hide: false);
586 ModBase(958, a * 5, hide: false);
587 ModBase(956, a * 5, hide: false);
588 ModBase(954, a * 5, hide: false);
589 ModBase(957, a * 5, hide: false);
590 ModBase(959, a * 5, hide: false);
591 break;
592 case 1213:
593 ModBase(962, a * 20, hide: false);
594 break;
595 case 1224:
596 ModBase(951, a * 15, hide: false);
597 break;
598 case 1217:
599 ModBase(952, a * -10, hide: false);
600 ModBase(955, a * 20, hide: false);
601 ModBase(964, a * 20, hide: false);
602 break;
603 case 1218:
604 ModBase(950, a / 40, hide: false);
605 ModBase(952, a / 40, hide: false);
606 ModBase(955, a / 40, hide: false);
607 ModBase(953, a / 40, hide: false);
608 ModBase(958, a / 40, hide: false);
609 ModBase(956, a / 40, hide: false);
610 ModBase(954, a / 40, hide: false);
611 ModBase(959, a / 40, hide: false);
612 ModBase(964, a / 40, hide: false);
613 ModBase(961, a / 40, hide: false);
614 break;
615 case 1221:
616 ModBase(964, a * 20, hide: false);
617 break;
618 case 1223:
619 ModBase(963, a * 20, hide: false);
620 break;
621 case 1216:
622 ModBase(6020, a, hide: false);
623 break;
624 case 1250:
625 ModBase(950, a * -10, hide: false);
626 ModBase(951, a * 5, hide: false);
627 ModBase(961, a * 5, hide: false);
628 ModBase(8793, a, hide: false);
629 ModBase(6607, a, hide: false);
630 break;
631 case 1415:
632 ModBase(60, a * 15, hide: false);
633 ModBase(79, a * 5, hide: false);
634 ModBase(953, a * 3, hide: false);
635 ModBase(961, a, hide: false);
636 ModBase(960, a, hide: false);
637 break;
638 case 1419:
639 ModPotential(101, a * 50);
640 ModPotential(111, a * 50);
641 ModPotential(103, a * 50);
642 ModPotential(106, a * 50);
643 ModPotential(122, a * 50);
644 ModPotential(120, a * 50);
645 ModPotential(123, a * 50);
646 break;
647 case 1274:
648 featRef[3] = (a - 7).ToString() ?? "";
649 break;
650 case 1750:
651 {
652 string[] array = featRef;
653 int num2 = a;
654 array[0] = num2.ToString() ?? "";
655 featRef[1] = (a * 2).ToString() ?? "";
656 break;
657 }
658 case 1532:
659 ModBase(73, -a * 5, hide: false);
660 break;
661 case 1533:
662 ModBase(73, a * 5, hide: false);
663 break;
664 case 1510:
665 ModBase(65, a * 3, hide: false);
666 break;
667 case 1511:
668 ModBase(65, -a * 3, hide: false);
669 break;
670 case 1512:
671 ModBase(73, a * 5, hide: false);
672 break;
673 case 1513:
674 ModBase(73, -a * 5, hide: false);
675 break;
676 case 1514:
677 ModBase(72, a * 3, hide: false);
678 break;
679 case 1515:
680 ModBase(72, -a * 3, hide: false);
681 break;
682 case 1516:
683 ModBase(300, a * 4, hide: false);
684 break;
685 case 1517:
686 ModBase(300, -a * 4, hide: false);
687 break;
688 case 1518:
689 ModBase(79, a * 5, hide: false);
690 break;
691 case 1519:
692 ModBase(79, -a * 5, hide: false);
693 break;
694 case 1520:
695 ModBase(70, a * 3, hide: false);
696 break;
697 case 1521:
698 ModBase(70, -a * 3, hide: false);
699 break;
700 case 1522:
701 ModBase(77, a * 5, hide: false);
702 break;
703 case 1523:
704 ModBase(77, -a * 5, hide: false);
705 break;
706 case 1524:
707 ModBase(307, a * 4, hide: false);
708 break;
709 case 1525:
710 ModBase(307, -a * 4, hide: false);
711 break;
712 case 1526:
713 ModBase(951, a * 5, hide: false);
714 ModBase(950, -a * 5, hide: false);
715 break;
716 case 1527:
717 ModBase(951, -a * 5, hide: false);
718 ModBase(950, a * 5, hide: false);
719 break;
720 case 1528:
721 ModBase(952, a * 5, hide: false);
722 break;
723 case 1529:
724 ModBase(952, -a * 5, hide: false);
725 break;
726 case 1530:
727 ModBase(960, a * 5, hide: false);
728 ModBase(956, -a * 5, hide: false);
729 break;
730 case 1531:
731 ModBase(960, -a * 5, hide: false);
732 ModBase(956, a * 5, hide: false);
733 break;
734 case 1300:
735 case 1305:
736 case 1310:
737 case 1315:
738 case 1320:
739 case 1325:
740 case 1330:
741 case 1335:
742 case 1340:
743 case 1345:
744 case 1350:
745 case 1355:
746 GodHint();
747 break;
748 case 1550:
749 ModBase(404, -a * 10, hide: false);
750 break;
751 case 1551:
752 ModBase(77, -a * (4 + num / 5), hide: false);
753 break;
754 case 1552:
755 ModBase(79, a * Mathf.Min(30 + num / 5, 100), hide: false);
756 if (!hint && a > 0)
757 {
758 chara?.body.UnequipAll(39);
759 }
760 break;
761 case 1553:
762 ModBase(73, a * (5 + num / 3), hide: false);
763 ModBase(77, -a * (5 + num / 3), hide: false);
764 break;
765 case 1554:
766 ModBase(404, a * 10, hide: false);
767 ModBase(401, a, hide: false);
768 ModBase(79, a * (10 + num / 5), hide: false);
769 if (!hint && a > 0)
770 {
771 chara?.body.UnequipAll(33);
772 }
773 break;
774 case 1555:
775 ModBase(65, a * (12 + num), hide: false);
776 ModBase(77, -a * (5 + num / 5), hide: false);
777 if (!hint && a > 0)
778 {
779 chara?.body.UnequipAll(31);
780 }
781 break;
782 case 1556:
783 ModBase(64, -a * (10 + num), hide: false);
784 ModBase(67, a * (5 + num / 2), hide: false);
785 break;
786 case 1557:
787 ModBase(71, -a * (5 + num / 3), hide: false);
788 ModBase(72, -a * (4 + num / 4), hide: false);
789 ModBase(74, a * (6 + num / 2), hide: false);
790 ModBase(75, a * (2 + num / 6), hide: false);
791 break;
792 case 1560:
793 ModBase(60, -a * 15, hide: false);
794 ModBase(70, -a * (4 + num / 3), hide: false);
795 break;
796 case 1561:
797 ModBase(61, -a * 15, hide: false);
798 ModBase(76, -a * (4 + num / 3), hide: false);
799 break;
800 case 1562:
801 ModBase(65, a * (15 + num / 2), hide: false);
802 ModBase(79, -a * (10 + num / 5), hide: false);
803 break;
804 case 1563:
805 ModBase(77, -a * (3 + num / 4), hide: false);
806 break;
807 case 1564:
808 ModBase(961, a * 5, hide: false);
809 break;
810 case 1565:
811 ModBase(955, a * 20, hide: false);
812 break;
813 }
814 if (hint)
815 {
816 string text = base.source.GetText("textExtra");
817 if (!text.IsEmpty())
818 {
819 string text2 = text.SplitNewline().TryGet(value - 1, 99);
820 if (!text2.IsEmpty())
821 {
822 int num3 = 0;
823 string[] array2 = text2.Split(',');
824 foreach (string obj in array2)
825 {
826 string text3 = featRef[num3];
827 string text4 = obj.Replace(";", ",");
828 if (text3.ToInt() < 0)
829 {
830 text4 = text4.Replace("+#1", text3);
831 }
832 text4 = text4.Replace("#1", text3);
833 hints.Add(text4);
834 num3++;
835 }
836 }
837 }
838 }
839 return hints;
840 void GodHint()
841 {
842 if (!hint)
843 {
844 return;
845 }
846 foreach (Element value2 in owner.Card.Chara.faithElements.dict.Values)
847 {
848 if (value2.source.id != id)
849 {
850 NoteElement(value2.id, value2.Value);
851 }
852 }
853 }
854 void ModAttribute(int ele)
855 {
856 _ = hint;
857 ModBase(ele, ((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert, hide: false);
858 ModPotential(ele, a * 10);
859 }
860 void ModBase(int ele, int _v, bool hide)
861 {
862 if (!hint)
863 {
864 owner.ModBase(ele, _v);
865 }
866 if (!hide && _v != 0)
867 {
868 NoteElement(ele, _v);
869 }
870 }
871 void ModPotential(int ele, int _v)
872 {
873 if (!hint)
874 {
875 owner.ModPotential(ele, _v);
876 }
877 Note("modPotential".lang(EClass.sources.elements.map[ele].GetName(), "+" + _v + "%"));
878 }
879 void Note(string s)
880 {
881 if (hint)
882 {
883 hints.Add(s);
884 }
885 }
886 void NoteElement(int ele, int a)
887 {
889 if (row.category == "ability")
890 {
891 Note("hintLearnAbility".lang(row.GetName().ToTitleCase()));
892 }
893 else if (row.tag.Contains("flag"))
894 {
895 Note(row.GetName());
896 }
897 else
898 {
899 string @ref = ((a < 0) ? "" : "+") + a;
900 if (row.category == "resist")
901 {
902 int num4 = 0;
903 @ref = ((a > 0) ? "+" : "-").Repeat(Mathf.Clamp(Mathf.Abs(a) / 5 + num4, 1, 5));
904 Note("modValueRes".lang(row.GetName(), @ref));
905 }
906 else
907 {
908 Note("modValue".lang(row.GetName(), @ref));
909 }
910 }
911 }
912 }
913}
@ ModPotential
@ hint
FontColor
Definition: FontColor.cs:2
static void PublishEvent(string eventId, object data=null)
virtual Chara Chara
Definition: Card.cs:2108
int LV
Definition: Card.cs:387
void UnequipAll(int idSlot)
Definition: CharaBody.cs:57
Definition: Chara.cs:10
CharaBody body
Definition: Chara.cs:94
override bool IsPC
Definition: Chara.cs:626
void AddRandomBodyPart(bool msg=false)
Definition: Chara.cs:2243
ElementContainer faithElements
Definition: Chara.cs:38
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:43
virtual void SetData(T newData)
Definition: EVENT.cs:11
Dictionary< int, Element > dict
Element ModPotential(int ele, int v)
virtual Card Card
int Value(int ele)
Element ModBase(int ele, int v)
virtual Chara Chara
Element GetElement(string alias)
int ValueWithoutLink
Definition: ELEMENT.cs:299
int id
Definition: ELEMENT.cs:255
SourceElement.Row source
Definition: ELEMENT.cs:278
int vPotential
Definition: ELEMENT.cs:261
ElementContainer owner
Definition: ELEMENT.cs:271
int Value
Definition: ELEMENT.cs:297
virtual string Name
Definition: ELEMENT.cs:309
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1115
Definition: FEAT.cs:5
const int featManaCost
Definition: FEAT.cs:80
const int featElite
Definition: FEAT.cs:44
const int featDemon
Definition: FEAT.cs:134
const int featLonelySoul
Definition: FEAT.cs:100
const int featUnderground
Definition: FEAT.cs:240
const int featMiscreation
Definition: FEAT.cs:152
const int featAdam
Definition: FEAT.cs:246
const int featWitch
Definition: FEAT.cs:160
const int featLuckyCat
Definition: FEAT.cs:260
const int featShiva
Definition: FEAT.cs:236
const int featCannibalism
Definition: FEAT.cs:198
const int featMartial
Definition: FEAT.cs:86
const int featFairysan
Definition: FEAT.cs:258
const int featBoost
Definition: FEAT.cs:266
const int featNirvana
Definition: FEAT.cs:184
const int featSPD
Definition: FEAT.cs:16
const int featSnail
Definition: FEAT.cs:210
const int featSwordsage
Definition: FEAT.cs:116
const int featEvade
Definition: FEAT.cs:22
const int featModelBeliever
Definition: FEAT.cs:84
const int featEternalYouth
Definition: FEAT.cs:142
const int featAcidBody
Definition: FEAT.cs:234
const int featBloom
Definition: FEAT.cs:168
const int featDisguise
Definition: FEAT.cs:38
const int featGeneSlot
Definition: FEAT.cs:140
const int featMelilithCurse
Definition: FEAT.cs:200
const int featTourist
Definition: FEAT.cs:274
const int featGod_element1
Definition: FEAT.cs:178
const int featFate
Definition: FEAT.cs:228
const int featServant
Definition: FEAT.cs:242
const int featAshborn
Definition: FEAT.cs:158
const int featDEX
Definition: FEAT.cs:54
const int featNorland
Definition: FEAT.cs:128
const int featGoodKarma
Definition: FEAT.cs:162
const int featFastEater
Definition: FEAT.cs:68
const int featFaith
Definition: FEAT.cs:60
const int featExecutioner
Definition: FEAT.cs:52
const int featArcher
Definition: FEAT.cs:278
const int featEND
Definition: FEAT.cs:26
const int featPaladin
Definition: FEAT.cs:270
const int featSuccubus
Definition: FEAT.cs:220
const int featBelovedOne
Definition: FEAT.cs:172
const int featPaladin2
Definition: FEAT.cs:268
const int featRoran
Definition: FEAT.cs:130
const int featLightEater
Definition: FEAT.cs:126
const int featHardy
Definition: FEAT.cs:18
const int featHeavyCasting
Definition: FEAT.cs:88
const int featGolem
Definition: FEAT.cs:222
const int featNeckHunter
Definition: FEAT.cs:40
const int featFisher
Definition: FEAT.cs:76
const int featMagicManner
Definition: FEAT.cs:92
const int featHealer
Definition: FEAT.cs:48
const int featElea
Definition: FEAT.cs:214
const int featDreamWaker
Definition: FEAT.cs:114
const int featMetal
Definition: FEAT.cs:224
const int featLoyal
Definition: FEAT.cs:238
const int featManaPrecision
Definition: FEAT.cs:216
const int featScavenger
Definition: FEAT.cs:82
const int featMassSummoner
Definition: FEAT.cs:136
const int featFastFucker
Definition: FEAT.cs:66
const int featLuck
Definition: FEAT.cs:14
const int featMimic
Definition: FEAT.cs:42
const int featFoxLearn
Definition: FEAT.cs:204
const int featAquatic
Definition: FEAT.cs:250
const int featBodyParts
Definition: FEAT.cs:104
const int featSTR
Definition: FEAT.cs:30
const int featDefense
Definition: FEAT.cs:12
const int featManaBond
Definition: FEAT.cs:190
const int featFastLearner
Definition: FEAT.cs:192
const int featGod_wind1
Definition: FEAT.cs:248
const int featPeaky
Definition: FEAT.cs:46
const int featSplit
Definition: FEAT.cs:232
const int featLER
Definition: FEAT.cs:6
const int featPER
Definition: FEAT.cs:20
const int featDwarf
Definition: FEAT.cs:218
const int featFairyWeak
Definition: FEAT.cs:196
const int featInquisitor
Definition: FEAT.cs:120
const int featGod_trickery1
Definition: FEAT.cs:118
const int featCosmicHorror
Definition: FEAT.cs:122
const int featSummoner
Definition: FEAT.cs:98
const int featEarthStrength
Definition: FEAT.cs:262
const int featSorter
Definition: FEAT.cs:106
const int featWhiteVixen
Definition: FEAT.cs:256
const int featManaMeat
Definition: FEAT.cs:28
const int featGod_healing1
Definition: FEAT.cs:252
const int featReboot
Definition: FEAT.cs:264
const int featMAG
Definition: FEAT.cs:8
const int featSevenSense
Definition: FEAT.cs:146
const int featBadKarma
Definition: FEAT.cs:164
const int featRapidMagic
Definition: FEAT.cs:96
const int featFluffyTail
Definition: FEAT.cs:206
const int featLibra
Definition: FEAT.cs:150
const int featGourmet
Definition: FEAT.cs:58
const int featResCurse
Definition: FEAT.cs:110
const int featMeatCushion
Definition: FEAT.cs:138
const int featBloodBond
Definition: FEAT.cs:154
const int featBaby
Definition: FEAT.cs:180
static readonly int[] IDS
Definition: FEAT.cs:300
const int featWIL
Definition: FEAT.cs:10
const int featFoxBless
Definition: FEAT.cs:202
const int featSpotting
Definition: FEAT.cs:50
const int featGod_moonshadow1
Definition: FEAT.cs:290
const int featSleeper
Definition: FEAT.cs:108
const int featStamina
Definition: FEAT.cs:32
const int featThief
Definition: FEAT.cs:284
const int featDismantler
Definition: FEAT.cs:72
const int featGoldenFinger
Definition: FEAT.cs:70
const int featVampire
Definition: FEAT.cs:156
const int featWarrior
Definition: FEAT.cs:286
const int featGod_strife1
Definition: FEAT.cs:288
const int featSlimeEvolution
Definition: FEAT.cs:170
const int featGod_harvest1
Definition: FEAT.cs:298
const int featAnimalLover
Definition: FEAT.cs:112
const int featSpike
Definition: FEAT.cs:230
const int featComat
Definition: FEAT.cs:64
const int featUndead
Definition: FEAT.cs:208
const int featCHA
Definition: FEAT.cs:24
const int featFairyResist
Definition: FEAT.cs:212
const int featHarem
Definition: FEAT.cs:174
const int featGod_earth1
Definition: FEAT.cs:182
const int featFoxMaid
Definition: FEAT.cs:254
const int featElderCrab
Definition: FEAT.cs:226
const int featGod_luck1
Definition: FEAT.cs:296
const int featPegasus
Definition: FEAT.cs:148
const int featHeavyEater
Definition: FEAT.cs:124
const int featCentaur
Definition: FEAT.cs:144
const int featGod_machine1
Definition: FEAT.cs:272
const int featMilitant
Definition: FEAT.cs:62
const int featRapidArrow
Definition: FEAT.cs:90
const int featLooter
Definition: FEAT.cs:74
const int featGrowParts
Definition: FEAT.cs:194
const int featDemigod
Definition: FEAT.cs:244
const int featParty
Definition: FEAT.cs:102
const int featPianist
Definition: FEAT.cs:276
const int featLittleOne
Definition: FEAT.cs:186
const int featChef
Definition: FEAT.cs:78
const int featDefender
Definition: FEAT.cs:94
const int featGoddess
Definition: FEAT.cs:176
const int featGod_harmony1
Definition: FEAT.cs:294
const int featElder
Definition: FEAT.cs:132
const int featPeacemaker
Definition: FEAT.cs:166
const int featMana
Definition: FEAT.cs:34
const int featWizard
Definition: FEAT.cs:282
const int featSlowFood
Definition: FEAT.cs:188
const int featLife
Definition: FEAT.cs:36
const int featGod_oblivion1
Definition: FEAT.cs:292
const int featFarmer
Definition: FEAT.cs:280
const int featNegotiate
Definition: FEAT.cs:56
Definition: FEAT.cs:320
List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:400
override bool ShowValue
Definition: FEAT.cs:340
override string FullName
Definition: FEAT.cs:330
override Sprite GetIcon(string suffix="")
Definition: FEAT.cs:349
override bool ShowXP
Definition: FEAT.cs:338
static List< string > hints
Definition: FEAT.cs:321
override bool CanLink(ElementContainer owner)
Definition: FEAT.cs:344
static string[] featRef
Definition: FEAT.cs:323
string GetHint(ElementContainer owner)
Definition: FEAT.cs:363
override void WritePurchaseReq(UINote n, int lv=-1)
Definition: FEAT.cs:387
override bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
Definition: FEAT.cs:374
override string Name
Definition: FEAT.cs:327
override void OnWriteNote(UINote n, ElementContainer owner)
Definition: FEAT.cs:354
override int CostLearn
Definition: FEAT.cs:342
override bool ShowBonuses
Definition: FEAT.cs:325
override string GetName()
SourceElement elements
static Sprite Get(string id)
Definition: SpriteSheet.cs:28
Definition: UINote.cs:6
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
static WidgetEquip Instance
Definition: WidgetEquip.cs:11
void Rebuild()
Definition: WidgetEquip.cs:53