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