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