1using System.Collections.Generic;
324 public static readonly
int[]
IDS =
new int[159]
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
346 public static List<string>
hints =
new List<string>();
348 public static string[]
featRef =
new string[5];
352 public override string Name => base.source.GetText().SplitNewline().TryGet(base.Value - 1);
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) :
"");
367 public override int CostLearn => base.source.cost.TryGet(base.Value - 1);
371 return !base.IsGlobalElement;
374 public override Sprite
GetIcon(
string suffix =
"")
376 return SpriteSheet.
Get(
"Media/Graphics/Icon/Element/icon_elements",
"ele_Feat");
384 n.AddText(
"_bullet".lang() +
hint);
394 text = text +
hint.StripLastPun() +
", ";
396 return text.TrimEnd(
' ').TrimEnd(
',');
401 if (base.source.req.Length != 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()))
414 if (base.source.req.Length != 0)
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());
440 int value = base.Value;
441 int A = Mathf.Abs(a);
442 int invert = ((a >= 0) ? 1 : (-1));
445 featRef[0] = a.ToString() ??
"";
446 featRef[1] = a.ToString() ??
"";
450 if (!
hint && a > 0 && chara !=
null)
457 featRef[0] = (a * 25).ToString() ??
"";
460 ModBase(78, -a * 10, hide:
false);
463 featRef[0] = ((a == 1) ? 10 : ((a == 2) ? 20 : 30)).ToString() ??
"";
466 featRef[0] = ((a == 1) ? 1 : ((a == 2) ? 3 : 5)).ToString() ??
"";
469 ModBase(60, a * 4, hide:
false);
472 ModBase(61, a * 4, hide:
false);
475 ModBase(62, a * 4, hide:
false);
502 ModBase(79, a * 5, hide:
false);
505 ModBase(65, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
508 ModBase(64, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
511 ModBase(150, a * 2, hide:
false);
514 ModBase(210, a * 3, hide:
false);
515 ModBase(402, ((A == 3) ? 1 : 0) * invert, hide:
false);
518 ModBase(291, a * 4, hide:
false);
521 ModBase(100, a * 3, hide:
false);
524 ModBase(306, a * 4, hide:
false);
527 ModBase(78, a * 2, hide:
false);
530 ModBase(77, a * 2, hide:
false);
533 featRef[0] = (a * 10).ToString() ??
"";
536 featRef[0] = (a * 10).ToString() ??
"";
539 ModBase(78, a * 15, hide:
false);
542 featRef[0] = (a * 20).ToString() ??
"";
543 featRef[1] = (a * 5).ToString() ??
"";
546 featRef[0] = a.ToString() ??
"";
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);
568 ModBase(60, A * 2 * invert, hide:
false);
569 ModBase(79, A * 3 * invert, hide:
false);
572 ModBase(64, a * 50, hide:
true);
573 ModBase(401, a, hide:
false);
576 ModBase(403, a * 20, hide:
true);
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);
589 ModBase(418, a * 100, hide:
false);
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);
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);
606 ModBase(955, a * 5, hide:
false);
607 ModBase(953, a * 5, hide:
false);
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);
619 ModBase(962, a * 20, hide:
false);
622 ModBase(951, a * 15, hide:
false);
625 ModBase(952, a * -10, hide:
false);
626 ModBase(955, a * 20, hide:
false);
627 ModBase(964, a * 20, hide:
false);
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);
642 ModBase(964, a * 20, hide:
false);
645 ModBase(963, a * 20, hide:
false);
648 ModBase(6020, a, hide:
false);
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);
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);
674 featRef[3] = (a - 7).ToString() ??
"";
680 array[0] = num2.ToString() ??
"";
681 featRef[1] = (a * 2).ToString() ??
"";
685 ModBase(73, -a * 5, hide:
false);
688 ModBase(73, a * 5, hide:
false);
691 ModBase(65, a * 3, hide:
false);
694 ModBase(65, -a * 3, hide:
false);
697 ModBase(73, a * 5, hide:
false);
700 ModBase(73, -a * 5, hide:
false);
703 ModBase(72, a * 3, hide:
false);
706 ModBase(72, -a * 3, hide:
false);
709 ModBase(300, a * 4, hide:
false);
712 ModBase(300, -a * 4, hide:
false);
715 ModBase(79, a * 5, hide:
false);
718 ModBase(79, -a * 5, hide:
false);
721 ModBase(70, a * 3, hide:
false);
724 ModBase(70, -a * 3, hide:
false);
727 ModBase(77, a * 5, hide:
false);
730 ModBase(77, -a * 5, hide:
false);
733 ModBase(307, a * 4, hide:
false);
736 ModBase(307, -a * 4, hide:
false);
739 ModBase(951, a * 5, hide:
false);
740 ModBase(950, -a * 5, hide:
false);
743 ModBase(951, -a * 5, hide:
false);
744 ModBase(950, a * 5, hide:
false);
747 ModBase(952, a * 5, hide:
false);
750 ModBase(952, -a * 5, hide:
false);
753 ModBase(960, a * 5, hide:
false);
754 ModBase(956, -a * 5, hide:
false);
757 ModBase(960, -a * 5, hide:
false);
758 ModBase(956, a * 5, hide:
false);
775 ModBase(404, -a * 10, hide:
false);
778 ModBase(77, -a * (4 + num / 5), hide:
false);
781 ModBase(79, a * Mathf.Min(30 + num / 5, 100), hide:
false);
788 ModBase(73, a * (5 + num / 3), hide:
false);
789 ModBase(77, -a * (5 + num / 3), hide:
false);
792 ModBase(404, a * 10, hide:
false);
793 ModBase(401, a, hide:
false);
794 ModBase(79, a * (10 + num / 5), hide:
false);
801 ModBase(65, a * (12 + num), hide:
false);
802 ModBase(77, -a * (5 + num / 5), hide:
false);
809 ModBase(64, -a * (10 + num), hide:
false);
810 ModBase(67, a * (5 + num / 2), hide:
false);
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);
819 ModBase(60, -a * 15, hide:
false);
820 ModBase(70, -a * (4 + num / 3), hide:
false);
823 ModBase(61, -a * 15, hide:
false);
824 ModBase(76, -a * (4 + num / 3), hide:
false);
827 ModBase(65, a * (15 + num / 2), hide:
false);
828 ModBase(79, -a * (10 + num / 5), hide:
false);
831 ModBase(77, -a * (3 + num / 4), hide:
false);
834 ModBase(961, a * 5, hide:
false);
837 ModBase(955, a * 20, hide:
false);
842 string text = base.source.GetText(
"textExtra");
845 string text2 = text.SplitNewline().TryGet(value - 1, 99);
846 if (!text2.IsEmpty())
849 string[] array2 = text2.Split(
',');
850 foreach (
string obj
in array2)
853 string text4 = obj.Replace(
";",
",");
854 if (text3.ToInt() < 0)
856 text4 = text4.Replace(
"+#1", text3);
858 text4 = text4.Replace(
"#1", text3);
874 if (value2.
source.id !=
id)
876 NoteElement(value2.
id, value2.
Value);
880 void ModAttribute(
int ele)
883 ModBase(ele, ((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert, hide:
false);
886 void ModBase(
int ele,
int _v,
bool hide)
892 if (!hide && _v != 0)
894 NoteElement(ele, _v);
912 void NoteElement(
int ele,
int num4)
917 Note(
"hintLearnAbility".lang(row.
GetName().ToTitleCase()));
919 else if (row.
tag.Contains(
"flag"))
925 string @ref = ((num4 < 0) ?
"" :
"+") + num4;
929 @ref = ((num4 > 0) ?
"+" :
"-").Repeat(Mathf.Clamp(Mathf.Abs(num4) / 5 + num5, 1, 5));
930 Note(
"modValueRes".lang(row.
GetName(), @ref));
934 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)