1using System.Collections.Generic;
322 public static readonly
int[]
IDS =
new int[158]
324 1621, 1622, 1623, 1624, 1629, 1626, 1627, 1628, 1620, 1630,
325 1625, 1612, 1421, 1610, 1431, 1430, 1429, 1428, 1427, 1426,
326 1425, 1424, 1423, 1422, 1631, 1420, 1419, 1611, 1632, 1648,
327 1634, 1418, 1750, 1664, 1663, 1662, 1661, 1660, 1659, 1658,
328 1657, 1656, 1655, 1654, 1633, 1653, 1651, 1650, 1649, 1647,
329 1646, 1645, 1644, 1643, 1642, 1641, 1640, 1636, 1635, 1652,
330 1417, 1330, 1415, 1235, 1236, 1237, 1238, 1239, 1240, 1241,
331 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1234, 1249, 1251,
332 1252, 1253, 1254, 1416, 1271, 1272, 1273, 1274, 1275, 1276,
333 1277, 1290, 1291, 1250, 1233, 1232, 1231, 1200, 1201, 1202,
334 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210, 1211, 1212,
335 1213, 1214, 1215, 1216, 1230, 1229, 1228, 1227, 1226, 1225,
336 1292, 1224, 1222, 1221, 1220, 1219, 1218, 1217, 1223, 1293,
337 1270, 1300, 1412, 1411, 1410, 1409, 1408, 1407, 1406, 1405,
338 1404, 1403, 1402, 1413, 1401, 1400, 1355, 1350, 1345, 1340,
339 1335, 1325, 1320, 1315, 1310, 1305, 1294, 1414
344 public static List<string>
hints =
new List<string>();
346 public static string[]
featRef =
new string[5];
350 public override string Name => base.source.GetText().SplitNewline().TryGet(base.Value - 1);
356 string[] array = base.source.GetText().SplitNewline();
357 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (
" " + base.Value) :
"");
365 public override int CostLearn => base.source.cost.TryGet(base.Value - 1);
369 return !base.IsGlobalElement;
372 public override Sprite
GetIcon(
string suffix =
"")
374 return SpriteSheet.
Get(
"Media/Graphics/Icon/Element/icon_elements",
"ele_Feat");
382 n.AddText(
"_bullet".lang() +
hint);
392 text = text +
hint.StripLastPun() +
", ";
394 return text.TrimEnd(
' ').TrimEnd(
',');
399 if (base.source.req.Length != 0)
402 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()))
412 if (base.source.req.Length != 0)
414 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());
435 elinFeatApplyEventArgs.
SetData(a);
437 a = elinFeatApplyEventArgs.
data;
438 int value = base.Value;
439 int A = Mathf.Abs(a);
440 int invert = ((a >= 0) ? 1 : (-1));
443 featRef[0] = a.ToString() ??
"";
444 featRef[1] = a.ToString() ??
"";
448 if (!
hint && a > 0 && chara !=
null)
455 featRef[0] = (a * 25).ToString() ??
"";
458 ModBase(78, -a * 10, hide:
false);
461 featRef[0] = ((a == 1) ? 10 : ((a == 2) ? 20 : 30)).ToString() ??
"";
464 featRef[0] = ((a == 1) ? 1 : ((a == 2) ? 3 : 5)).ToString() ??
"";
467 ModBase(60, a * 4, hide:
false);
470 ModBase(61, a * 4, hide:
false);
473 ModBase(62, a * 4, hide:
false);
500 ModBase(79, a * 5, hide:
false);
503 ModBase(65, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
506 ModBase(64, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
509 ModBase(150, a * 2, hide:
false);
512 ModBase(210, a * 3, hide:
false);
513 ModBase(402, ((A == 3) ? 1 : 0) * invert, hide:
false);
516 ModBase(291, a * 4, hide:
false);
519 ModBase(100, a * 3, hide:
false);
522 ModBase(306, a * 4, hide:
false);
525 ModBase(78, a * 2, hide:
false);
528 ModBase(77, a * 2, hide:
false);
531 featRef[0] = (a * 10).ToString() ??
"";
534 featRef[0] = (a * 10).ToString() ??
"";
537 ModBase(78, a * 15, hide:
false);
540 featRef[0] = (a * 20).ToString() ??
"";
541 featRef[1] = (a * 5).ToString() ??
"";
544 featRef[0] = a.ToString() ??
"";
561 ModBase(60, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide:
false);
562 ModBase(79, (A > 5) ? ((A - 5) * -5 * invert) : 0, hide:
false);
563 ModBase(77, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide:
false);
566 ModBase(60, A * 2 * invert, hide:
false);
567 ModBase(79, A * 3 * invert, hide:
false);
570 ModBase(64, a * 50, hide:
true);
571 ModBase(401, a, hide:
false);
574 ModBase(403, a * 20, hide:
true);
577 ModBase(955, a * 5, hide:
false);
578 ModBase(953, a * 10, hide:
false);
579 ModBase(958, a * 5, hide:
false);
580 ModBase(956, a * 10, hide:
false);
581 ModBase(950, a * -5, hide:
false);
582 ModBase(960, a * -5, hide:
false);
583 ModBase(423, a, hide:
false);
587 ModBase(418, a * 100, hide:
false);
590 ModBase(956, a * 5, hide:
false);
591 ModBase(959, a * 5, hide:
false);
592 ModBase(423, a, hide:
false);
593 ModBase(424, a, hide:
false);
594 ModBase(421, a, hide:
false);
597 ModBase(954, a * 10, hide:
false);
598 ModBase(423, a, hide:
false);
599 ModBase(425, a, hide:
false);
600 ModBase(424, a, hide:
false);
601 ModBase(421, a, hide:
false);
604 ModBase(955, a * 5, hide:
false);
605 ModBase(953, a * 5, hide:
false);
608 ModBase(961, a * 5, hide:
false);
609 ModBase(953, a * 5, hide:
false);
610 ModBase(958, a * 5, hide:
false);
611 ModBase(956, a * 5, hide:
false);
612 ModBase(954, a * 5, hide:
false);
613 ModBase(957, a * 5, hide:
false);
614 ModBase(959, a * 5, hide:
false);
617 ModBase(962, a * 20, hide:
false);
620 ModBase(951, a * 15, hide:
false);
623 ModBase(952, a * -10, hide:
false);
624 ModBase(955, a * 20, hide:
false);
625 ModBase(964, a * 20, hide:
false);
628 ModBase(950, a / 40, hide:
false);
629 ModBase(952, a / 40, hide:
false);
630 ModBase(955, a / 40, hide:
false);
631 ModBase(953, a / 40, hide:
false);
632 ModBase(958, a / 40, hide:
false);
633 ModBase(956, a / 40, hide:
false);
634 ModBase(954, a / 40, hide:
false);
635 ModBase(959, a / 40, hide:
false);
636 ModBase(964, a / 40, hide:
false);
637 ModBase(961, a / 40, hide:
false);
640 ModBase(964, a * 20, hide:
false);
643 ModBase(963, a * 20, hide:
false);
646 ModBase(6020, a, hide:
false);
649 ModBase(950, a * -10, hide:
false);
650 ModBase(951, a * 5, hide:
false);
651 ModBase(961, a * 5, hide:
false);
652 ModBase(8793, a, hide:
false);
653 ModBase(6607, a, hide:
false);
656 ModBase(60, a * 15, hide:
false);
657 ModBase(79, a * 5, hide:
false);
658 ModBase(953, a * 3, hide:
false);
659 ModBase(961, a, hide:
false);
660 ModBase(960, a, hide:
false);
672 featRef[3] = (a - 7).ToString() ??
"";
678 array[0] = num2.ToString() ??
"";
679 featRef[1] = (a * 2).ToString() ??
"";
683 ModBase(73, -a * 5, hide:
false);
686 ModBase(73, a * 5, hide:
false);
689 ModBase(65, a * 3, hide:
false);
692 ModBase(65, -a * 3, hide:
false);
695 ModBase(73, a * 5, hide:
false);
698 ModBase(73, -a * 5, hide:
false);
701 ModBase(72, a * 3, hide:
false);
704 ModBase(72, -a * 3, hide:
false);
707 ModBase(300, a * 4, hide:
false);
710 ModBase(300, -a * 4, hide:
false);
713 ModBase(79, a * 5, hide:
false);
716 ModBase(79, -a * 5, hide:
false);
719 ModBase(70, a * 3, hide:
false);
722 ModBase(70, -a * 3, hide:
false);
725 ModBase(77, a * 5, hide:
false);
728 ModBase(77, -a * 5, hide:
false);
731 ModBase(307, a * 4, hide:
false);
734 ModBase(307, -a * 4, hide:
false);
737 ModBase(951, a * 5, hide:
false);
738 ModBase(950, -a * 5, hide:
false);
741 ModBase(951, -a * 5, hide:
false);
742 ModBase(950, a * 5, hide:
false);
745 ModBase(952, a * 5, hide:
false);
748 ModBase(952, -a * 5, hide:
false);
751 ModBase(960, a * 5, hide:
false);
752 ModBase(956, -a * 5, hide:
false);
755 ModBase(960, -a * 5, hide:
false);
756 ModBase(956, a * 5, hide:
false);
773 ModBase(404, -a * 10, hide:
false);
776 ModBase(77, -a * (4 + num / 5), hide:
false);
779 ModBase(79, a * Mathf.Min(30 + num / 5, 100), hide:
false);
786 ModBase(73, a * (5 + num / 3), hide:
false);
787 ModBase(77, -a * (5 + num / 3), hide:
false);
790 ModBase(404, a * 10, hide:
false);
791 ModBase(401, a, hide:
false);
792 ModBase(79, a * (10 + num / 5), hide:
false);
799 ModBase(65, a * (12 + num), hide:
false);
800 ModBase(77, -a * (5 + num / 5), hide:
false);
807 ModBase(64, -a * (10 + num), hide:
false);
808 ModBase(67, a * (5 + num / 2), hide:
false);
811 ModBase(71, -a * (5 + num / 3), hide:
false);
812 ModBase(72, -a * (4 + num / 4), hide:
false);
813 ModBase(74, a * (6 + num / 2), hide:
false);
814 ModBase(75, a * (2 + num / 6), hide:
false);
817 ModBase(60, -a * 15, hide:
false);
818 ModBase(70, -a * (4 + num / 3), hide:
false);
821 ModBase(61, -a * 15, hide:
false);
822 ModBase(76, -a * (4 + num / 3), hide:
false);
825 ModBase(65, a * (15 + num / 2), hide:
false);
826 ModBase(79, -a * (10 + num / 5), hide:
false);
829 ModBase(77, -a * (3 + num / 4), hide:
false);
832 ModBase(961, a * 5, hide:
false);
835 ModBase(955, a * 20, hide:
false);
840 string text = base.source.GetText(
"textExtra");
843 string text2 = text.SplitNewline().TryGet(value - 1, 99);
844 if (!text2.IsEmpty())
847 string[] array2 = text2.Split(
',');
848 foreach (
string obj
in array2)
851 string text4 = obj.Replace(
";",
",");
852 if (text3.ToInt() < 0)
854 text4 = text4.Replace(
"+#1", text3);
856 text4 = text4.Replace(
"#1", text3);
872 if (value2.
source.id !=
id)
874 NoteElement(value2.
id, value2.
Value);
878 void ModAttribute(
int ele)
881 ModBase(ele, ((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert, hide:
false);
884 void ModBase(
int ele,
int _v,
bool hide)
890 if (!hide && _v != 0)
892 NoteElement(ele, _v);
910 void NoteElement(
int ele,
int a)
915 Note(
"hintLearnAbility".lang(row.
GetName().ToTitleCase()));
917 else if (row.
tag.Contains(
"flag"))
923 string @ref = ((a < 0) ?
"" :
"+") + a;
927 @ref = ((a > 0) ?
"+" :
"-").Repeat(Mathf.Clamp(Mathf.Abs(a) / 5 + num4, 1, 5));
928 Note(
"modValueRes".lang(row.
GetName(), @ref));
932 Note(
"modValue".lang(row.
GetName(), @ref));
static void PublishEvent(string eventId, object data=null)
void UnequipAll(int idSlot)
void AddRandomBodyPart(bool msg=false)
ElementContainer faithElements
static SourceManager sources
virtual void SetData(T newData)
Dictionary< int, Element > dict
Element ModPotential(int ele, int v)
Element ModBase(int ele, int v)
Element GetElement(string alias)
static Element Create(int id, int v=0)
const int featUnderground
const int featMiscreation
const int featCannibalism
const int featModelBeliever
const int featEternalYouth
const int featMelilithCurse
const int featGod_element1
const int featExecutioner
const int featHeavyCasting
const int featMagicManner
const int featManaPrecision
const int featMassSummoner
const int featFastLearner
const int featGod_trickery1
const int featCosmicHorror
const int featEarthStrength
const int featColdHearted
const int featGod_healing1
const int featMeatCushion
static readonly int[] IDS
const int featSadCreature
const int featGod_moonshadow1
const int featGoldenFinger
const int featSevenPillars
const int featGod_strife1
const int featSlimeEvolution
const int featGod_harvest1
const int featAnimalLover
const int featFairyResist
const int featGod_machine1
const int featGod_harmony1
const int featGod_oblivion1
virtual List< string > Apply(int a, ElementContainer owner, bool hint=false)
override Sprite GetIcon(string suffix="")
static List< string > hints
override bool CanLink(ElementContainer owner)
string GetHint(ElementContainer owner)
override void WritePurchaseReq(UINote n, int lv=-1)
override bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
override void OnWriteNote(UINote n, ElementContainer owner)
override bool ShowBonuses
override string GetName()
static Sprite Get(string id)
UIItem AddHeader(string text, Sprite sprite=null)
UIItem AddText(string text, FontColor color=FontColor.DontChange)