1using System.Collections.Generic;
320 public static readonly
int[]
IDS =
new int[157]
322 1234, 1642, 1643, 1644, 1645, 1646, 1647, 1648, 1641, 1649,
323 1651, 1652, 1653, 1654, 1655, 1656, 1657, 1650, 1658, 1640,
324 1635, 1612, 1620, 1621, 1622, 1623, 1624, 1625, 1636, 1626,
325 1628, 1629, 1630, 1631, 1632, 1633, 1634, 1627, 1659, 1660,
326 1661, 1214, 1213, 1212, 1211, 1210, 1209, 1208, 1215, 1207,
327 1205, 1204, 1203, 1202, 1201, 1200, 1233, 1206, 1216, 1217,
328 1218, 1662, 1663, 1664, 1750, 1232, 1230, 1229, 1228, 1227,
329 1226, 1225, 1224, 1223, 1222, 1221, 1220, 1219, 1611, 1610,
330 1231, 1401, 1404, 1405, 1406, 1407, 1408, 1409, 1410, 1411,
331 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421,
332 1422, 1403, 1423, 1402, 1400, 1276, 1277, 1290, 1291, 1292,
333 1293, 1235, 1300, 1305, 1310, 1315, 1320, 1325, 1330, 1335,
334 1340, 1345, 1350, 1355, 1274, 1424, 1425, 1426, 1239, 1238,
335 1237, 1236, 1242, 1275, 1243, 1244, 1245, 1246, 1247, 1248,
336 1249, 1250, 1251, 1252, 1253, 1254, 1270, 1271, 1272, 1273,
337 1431, 1430, 1429, 1428, 1427, 1240, 1241
342 public static List<string>
hints =
new List<string>();
344 public static string[]
featRef =
new string[5];
348 public override string Name => base.source.GetText().SplitNewline().TryGet(base.Value - 1);
354 string[] array = base.source.GetText().SplitNewline();
355 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (
" " + base.Value) :
"");
363 public override int CostLearn => base.source.cost.TryGet(base.Value - 1);
367 return !base.IsGlobalElement;
370 public override Sprite
GetIcon(
string suffix =
"")
372 return SpriteSheet.
Get(
"Media/Graphics/Icon/Element/icon_elements",
"ele_Feat");
380 n.AddText(
"_bullet".lang() +
hint);
390 text = text +
hint.StripLastPun() +
", ";
392 return text.TrimEnd(
' ').TrimEnd(
',');
397 if (base.source.req.Length != 0)
400 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()))
410 if (base.source.req.Length != 0)
412 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());
433 elinFeatApplyEventArgs.
SetData(a);
435 a = elinFeatApplyEventArgs.
data;
436 int value = base.Value;
437 int A = Mathf.Abs(a);
438 int invert = ((a >= 0) ? 1 : (-1));
441 featRef[0] = a.ToString() ??
"";
442 featRef[1] = a.ToString() ??
"";
446 if (!
hint && a > 0 && chara !=
null)
453 featRef[0] = (a * 25).ToString() ??
"";
456 ModBase(78, -a * 10, hide:
false);
459 featRef[0] = ((a == 1) ? 10 : ((a == 2) ? 20 : 30)).ToString() ??
"";
462 featRef[0] = ((a == 1) ? 1 : ((a == 2) ? 3 : 5)).ToString() ??
"";
465 ModBase(60, a * 4, hide:
false);
468 ModBase(61, a * 4, hide:
false);
471 ModBase(62, a * 4, hide:
false);
498 ModBase(79, a * 5, hide:
false);
501 ModBase(65, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
504 ModBase(64, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
507 ModBase(150, a * 2, hide:
false);
510 ModBase(210, a * 3, hide:
false);
511 ModBase(402, ((A == 3) ? 1 : 0) * invert, hide:
false);
514 ModBase(291, a * 4, hide:
false);
517 ModBase(100, a * 3, hide:
false);
520 ModBase(306, a * 4, hide:
false);
523 ModBase(78, a * 2, hide:
false);
526 ModBase(77, a * 2, hide:
false);
529 featRef[0] = (a * 10).ToString() ??
"";
532 featRef[0] = (a * 10).ToString() ??
"";
535 ModBase(78, a * 15, hide:
false);
538 featRef[0] = (a * 20).ToString() ??
"";
539 featRef[1] = (a * 5).ToString() ??
"";
542 featRef[0] = a.ToString() ??
"";
559 ModBase(60, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide:
false);
560 ModBase(79, (A > 5) ? ((A - 5) * -5 * invert) : 0, hide:
false);
561 ModBase(77, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide:
false);
564 ModBase(60, A * 2 * invert, hide:
false);
565 ModBase(79, A * 3 * invert, hide:
false);
568 ModBase(64, a * 50, hide:
true);
569 ModBase(401, a, hide:
false);
572 ModBase(403, a * 20, hide:
true);
575 ModBase(955, a * 5, hide:
false);
576 ModBase(953, a * 10, hide:
false);
577 ModBase(958, a * 5, hide:
false);
578 ModBase(956, a * 10, hide:
false);
579 ModBase(950, a * -5, hide:
false);
580 ModBase(960, a * -5, hide:
false);
581 ModBase(423, a, hide:
false);
585 ModBase(418, a * 100, hide:
false);
588 ModBase(956, a * 5, hide:
false);
589 ModBase(959, a * 5, hide:
false);
590 ModBase(423, a, hide:
false);
591 ModBase(424, a, hide:
false);
592 ModBase(421, a, hide:
false);
595 ModBase(954, a * 10, hide:
false);
596 ModBase(423, a, hide:
false);
597 ModBase(425, a, hide:
false);
598 ModBase(424, a, hide:
false);
599 ModBase(421, a, hide:
false);
602 ModBase(955, a * 5, hide:
false);
603 ModBase(953, a * 5, hide:
false);
606 ModBase(961, a * 5, hide:
false);
607 ModBase(953, a * 5, hide:
false);
608 ModBase(958, a * 5, hide:
false);
609 ModBase(956, a * 5, hide:
false);
610 ModBase(954, a * 5, hide:
false);
611 ModBase(957, a * 5, hide:
false);
612 ModBase(959, a * 5, hide:
false);
615 ModBase(962, a * 20, hide:
false);
618 ModBase(951, a * 15, hide:
false);
621 ModBase(952, a * -10, hide:
false);
622 ModBase(955, a * 20, hide:
false);
623 ModBase(964, a * 20, hide:
false);
626 ModBase(950, a / 40, hide:
false);
627 ModBase(952, a / 40, hide:
false);
628 ModBase(955, a / 40, hide:
false);
629 ModBase(953, a / 40, hide:
false);
630 ModBase(958, a / 40, hide:
false);
631 ModBase(956, a / 40, hide:
false);
632 ModBase(954, a / 40, hide:
false);
633 ModBase(959, a / 40, hide:
false);
634 ModBase(964, a / 40, hide:
false);
635 ModBase(961, a / 40, hide:
false);
638 ModBase(964, a * 20, hide:
false);
641 ModBase(963, a * 20, hide:
false);
644 ModBase(6020, a, hide:
false);
647 ModBase(950, a * -10, hide:
false);
648 ModBase(951, a * 5, hide:
false);
649 ModBase(961, a * 5, hide:
false);
650 ModBase(8793, a, hide:
false);
651 ModBase(6607, a, hide:
false);
654 ModBase(60, a * 15, hide:
false);
655 ModBase(79, a * 5, hide:
false);
656 ModBase(953, a * 3, hide:
false);
657 ModBase(961, a, hide:
false);
658 ModBase(960, a, hide:
false);
670 featRef[3] = (a - 7).ToString() ??
"";
676 array[0] = num2.ToString() ??
"";
677 featRef[1] = (a * 2).ToString() ??
"";
681 ModBase(73, -a * 5, hide:
false);
684 ModBase(73, a * 5, hide:
false);
687 ModBase(65, a * 3, hide:
false);
690 ModBase(65, -a * 3, hide:
false);
693 ModBase(73, a * 5, hide:
false);
696 ModBase(73, -a * 5, hide:
false);
699 ModBase(72, a * 3, hide:
false);
702 ModBase(72, -a * 3, hide:
false);
705 ModBase(300, a * 4, hide:
false);
708 ModBase(300, -a * 4, hide:
false);
711 ModBase(79, a * 5, hide:
false);
714 ModBase(79, -a * 5, hide:
false);
717 ModBase(70, a * 3, hide:
false);
720 ModBase(70, -a * 3, hide:
false);
723 ModBase(77, a * 5, hide:
false);
726 ModBase(77, -a * 5, hide:
false);
729 ModBase(307, a * 4, hide:
false);
732 ModBase(307, -a * 4, hide:
false);
735 ModBase(951, a * 5, hide:
false);
736 ModBase(950, -a * 5, hide:
false);
739 ModBase(951, -a * 5, hide:
false);
740 ModBase(950, a * 5, hide:
false);
743 ModBase(952, a * 5, hide:
false);
746 ModBase(952, -a * 5, hide:
false);
749 ModBase(960, a * 5, hide:
false);
750 ModBase(956, -a * 5, hide:
false);
753 ModBase(960, -a * 5, hide:
false);
754 ModBase(956, a * 5, hide:
false);
771 ModBase(404, -a * 10, hide:
false);
774 ModBase(77, -a * (4 + num / 5), hide:
false);
777 ModBase(79, a * Mathf.Min(30 + num / 5, 100), hide:
false);
784 ModBase(73, a * (5 + num / 3), hide:
false);
785 ModBase(77, -a * (5 + num / 3), hide:
false);
788 ModBase(404, a * 10, hide:
false);
789 ModBase(401, a, hide:
false);
790 ModBase(79, a * (10 + num / 5), hide:
false);
797 ModBase(65, a * (12 + num), hide:
false);
798 ModBase(77, -a * (5 + num / 5), hide:
false);
805 ModBase(64, -a * (10 + num), hide:
false);
806 ModBase(67, a * (5 + num / 2), hide:
false);
809 ModBase(71, -a * (5 + num / 3), hide:
false);
810 ModBase(72, -a * (4 + num / 4), hide:
false);
811 ModBase(74, a * (6 + num / 2), hide:
false);
812 ModBase(75, a * (2 + num / 6), hide:
false);
815 ModBase(60, -a * 15, hide:
false);
816 ModBase(70, -a * (4 + num / 3), hide:
false);
819 ModBase(61, -a * 15, hide:
false);
820 ModBase(76, -a * (4 + num / 3), hide:
false);
823 ModBase(65, a * (15 + num / 2), hide:
false);
824 ModBase(79, -a * (10 + num / 5), hide:
false);
827 ModBase(77, -a * (3 + num / 4), hide:
false);
830 ModBase(961, a * 5, hide:
false);
833 ModBase(955, a * 20, hide:
false);
838 string text = base.source.GetText(
"textExtra");
841 string text2 = text.SplitNewline().TryGet(value - 1, 99);
842 if (!text2.IsEmpty())
845 string[] array2 = text2.Split(
',');
846 foreach (
string obj
in array2)
849 string text4 = obj.Replace(
";",
",");
850 if (text3.ToInt() < 0)
852 text4 = text4.Replace(
"+#1", text3);
854 text4 = text4.Replace(
"#1", text3);
870 if (value2.
source.id !=
id)
872 NoteElement(value2.
id, value2.
Value);
876 void ModAttribute(
int ele)
879 ModBase(ele, ((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert, hide:
false);
882 void ModBase(
int ele,
int _v,
bool hide)
888 if (!hide && _v != 0)
890 NoteElement(ele, _v);
908 void NoteElement(
int ele,
int a)
913 Note(
"hintLearnAbility".lang(row.
GetName().ToTitleCase()));
915 else if (row.
tag.Contains(
"flag"))
921 string @ref = ((a < 0) ?
"" :
"+") + a;
925 @ref = ((a > 0) ?
"+" :
"-").Repeat(Mathf.Clamp(Mathf.Abs(a) / 5 + num4, 1, 5));
926 Note(
"modValueRes".lang(row.
GetName(), @ref));
930 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)