1using System.Collections.Generic;
232 public static readonly
int[]
IDS =
new int[113]
234 1628, 1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1612,
235 1412, 1610, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414,
236 1413, 1629, 1611, 1630, 1645, 1632, 1411, 1657, 1656, 1655,
237 1654, 1653, 1652, 1651, 1650, 1649, 1631, 1648, 1646, 1644,
238 1643, 1642, 1641, 1640, 1636, 1635, 1634, 1633, 1647, 1410,
239 1658, 1408, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232,
240 1234, 1235, 1236, 1237, 1238, 1239, 1300, 1305, 1310, 1315,
241 1320, 1325, 1330, 1224, 1223, 1222, 1221, 1409, 1200, 1201,
242 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1335, 1209, 1211,
243 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1210,
244 1340, 1233, 1350, 1345, 1355, 1400, 1401, 1403, 1404, 1405,
250 public static List<string>
hints =
new List<string>();
252 public static string[]
featRef =
new string[5];
256 public override string Name => base.source.GetText().SplitNewline().TryGet(base.Value - 1);
262 string[] array = base.source.GetText().SplitNewline();
263 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (
" " + base.Value) :
"");
271 public override int CostLearn => base.source.cost.TryGet(base.Value - 1);
275 return !base.IsGlobalElement;
278 public override Sprite
GetIcon(
string suffix =
"")
280 return SpriteSheet.
Get(
"Media/Graphics/Icon/Element/icon_elements",
"ele_Feat");
288 n.AddText(
"_bullet".lang() +
hint);
298 text = text +
hint.StripLastPun() +
", ";
300 return text.TrimEnd(
' ').TrimEnd(
',');
305 if (base.source.req.Length != 0)
308 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()))
318 if (base.source.req.Length != 0)
320 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());
335 int value = base.Value;
336 int A = Mathf.Abs(a);
337 int invert = ((a >= 0) ? 1 : (-1));
340 featRef[0] = a.ToString() ??
"";
341 featRef[1] = a.ToString() ??
"";
345 if (!
hint && a > 0 && chara !=
null)
352 ModBase(78, -a * 10, hide:
false);
355 featRef[0] = ((a == 1) ? 10 : ((a == 2) ? 20 : 30)).ToString() ??
"";
358 featRef[0] = ((a == 1) ? 1 : ((a == 2) ? 3 : 5)).ToString() ??
"";
361 ModBase(60, a * 4, hide:
false);
364 ModBase(61, a * 4, hide:
false);
367 ModBase(62, a * 4, hide:
false);
394 ModBase(79, a * 5, hide:
false);
397 ModBase(65, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
400 ModBase(64, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide:
false);
403 ModBase(150, a * 2, hide:
false);
406 ModBase(210, a * 3, hide:
false);
407 ModBase(402, ((A == 3) ? 1 : 0) * invert, hide:
false);
410 ModBase(291, a * 4, hide:
false);
413 ModBase(100, a * 3, hide:
false);
416 ModBase(306, a * 4, hide:
false);
419 ModBase(78, a * 2, hide:
false);
422 ModBase(77, a * 2, hide:
false);
425 featRef[0] = (a * 10).ToString() ??
"";
428 featRef[0] = (a * 10).ToString() ??
"";
431 ModBase(78, a * 15, hide:
false);
434 featRef[0] = (a * 20).ToString() ??
"";
435 featRef[1] = (a * 5).ToString() ??
"";
438 featRef[0] = a.ToString() ??
"";
455 ModBase(60, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide:
false);
456 ModBase(79, (A > 5) ? ((A - 5) * -5 * invert) : 0, hide:
false);
457 ModBase(77, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide:
false);
460 ModBase(60, A * 2 * invert, hide:
false);
461 ModBase(79, A * 3 * invert, hide:
false);
464 ModBase(64, a * 50, hide:
true);
465 ModBase(401, a, hide:
false);
468 ModBase(403, a * 20, hide:
true);
471 ModBase(955, a * 5, hide:
false);
472 ModBase(953, a * 10, hide:
false);
473 ModBase(958, a * 5, hide:
false);
474 ModBase(956, a * 10, hide:
false);
475 ModBase(950, a * -5, hide:
false);
478 ModBase(956, a * 5, hide:
false);
479 ModBase(959, a * 5, hide:
false);
480 ModBase(423, a, hide:
false);
481 ModBase(424, a, hide:
false);
482 ModBase(421, a, hide:
false);
485 ModBase(954, a * 10, hide:
false);
486 ModBase(423, a, hide:
false);
487 ModBase(425, a, hide:
false);
488 ModBase(424, a, hide:
false);
489 ModBase(421, a, hide:
false);
492 ModBase(955, a * 5, hide:
false);
493 ModBase(953, a * 5, hide:
false);
496 ModBase(961, a * 5, hide:
false);
497 ModBase(953, a * 5, hide:
false);
498 ModBase(958, a * 5, hide:
false);
499 ModBase(956, a * 5, hide:
false);
500 ModBase(954, a * 5, hide:
false);
501 ModBase(957, a * 5, hide:
false);
502 ModBase(959, a * 5, hide:
false);
505 ModBase(962, a * 20, hide:
false);
508 ModBase(951, a * 15, hide:
false);
511 ModBase(952, a * -10, hide:
false);
512 ModBase(955, a * 20, hide:
false);
513 ModBase(964, a * 20, hide:
false);
516 ModBase(950, a / 40, hide:
false);
517 ModBase(952, a / 40, hide:
false);
518 ModBase(955, a / 40, hide:
false);
519 ModBase(953, a / 40, hide:
false);
520 ModBase(958, a / 40, hide:
false);
521 ModBase(956, a / 40, hide:
false);
522 ModBase(954, a / 40, hide:
false);
523 ModBase(959, a / 40, hide:
false);
524 ModBase(964, a / 40, hide:
false);
525 ModBase(961, a / 40, hide:
false);
528 ModBase(964, a * 20, hide:
false);
531 ModBase(963, a * 20, hide:
false);
534 ModBase(6020, a, hide:
false);
537 ModBase(60, a * 15, hide:
false);
538 ModBase(79, a * 5, hide:
false);
539 ModBase(953, a * 3, hide:
false);
540 ModBase(961, a, hide:
false);
541 ModBase(960, a, hide:
false);
553 ModBase(65, a * 3, hide:
false);
556 ModBase(65, -a * 3, hide:
false);
559 ModBase(73, a * 5, hide:
false);
562 ModBase(73, -a * 5, hide:
false);
565 ModBase(72, a * 3, hide:
false);
568 ModBase(72, -a * 3, hide:
false);
571 ModBase(300, a * 4, hide:
false);
574 ModBase(300, -a * 4, hide:
false);
577 ModBase(79, a * 5, hide:
false);
580 ModBase(79, -a * 5, hide:
false);
583 ModBase(70, a * 3, hide:
false);
586 ModBase(70, -a * 3, hide:
false);
589 ModBase(77, a * 5, hide:
false);
592 ModBase(77, -a * 5, hide:
false);
595 ModBase(307, a * 4, hide:
false);
598 ModBase(307, -a * 4, hide:
false);
601 ModBase(951, a * 5, hide:
false);
602 ModBase(950, -a * 5, hide:
false);
605 ModBase(951, -a * 5, hide:
false);
606 ModBase(950, a * 5, hide:
false);
609 ModBase(952, a * 5, hide:
false);
612 ModBase(952, -a * 5, hide:
false);
615 ModBase(960, a * 5, hide:
false);
616 ModBase(956, -a * 5, hide:
false);
619 ModBase(960, -a * 5, hide:
false);
620 ModBase(956, a * 5, hide:
false);
637 ModBase(404, -a * 10, hide:
false);
640 ModBase(77, -a * (4 + num / 5), hide:
false);
643 ModBase(79, a * Mathf.Min(30 + num / 5, 100), hide:
false);
650 ModBase(73, a * (5 + num / 3), hide:
false);
651 ModBase(77, -a * (5 + num / 3), hide:
false);
654 ModBase(404, a * 10, hide:
false);
655 ModBase(401, a, hide:
false);
656 ModBase(79, a * (10 + num / 5), hide:
false);
663 ModBase(65, a * (12 + num), hide:
false);
664 ModBase(77, -a * (5 + num / 5), hide:
false);
671 ModBase(64, -a * (10 + num), hide:
false);
672 ModBase(67, a * (5 + num / 2), hide:
false);
675 ModBase(71, -a * (5 + num / 3), hide:
false);
676 ModBase(72, -a * (4 + num / 4), hide:
false);
677 ModBase(74, a * (6 + num / 2), hide:
false);
678 ModBase(75, a * (2 + num / 6), hide:
false);
681 ModBase(60, -a * 15, hide:
false);
682 ModBase(70, -a * (4 + num / 3), hide:
false);
685 ModBase(61, -a * 15, hide:
false);
686 ModBase(76, -a * (4 + num / 3), hide:
false);
689 ModBase(65, a * (15 + num / 2), hide:
false);
690 ModBase(79, -a * (10 + num / 5), hide:
false);
693 ModBase(77, -a * (3 + num / 4), hide:
false);
696 ModBase(961, a * 5, hide:
false);
699 ModBase(955, a * 20, hide:
false);
704 string text = base.source.GetText(
"textExtra");
707 string text2 = text.SplitNewline().TryGet(value - 1, 99);
708 if (!text2.IsEmpty())
711 string[] array = text2.Split(
',');
712 for (
int i = 0; i < array.Length; i++)
714 string item = array[i].Replace(
"#1",
featRef[num2]);
730 if (value2.
source.id !=
id)
732 NoteElement(value2.
id, value2.
Value);
736 void ModAttribute(
int ele)
741 Debug.Log(((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert);
743 ModBase(ele, ((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert, hide:
false);
746 void ModBase(
int ele,
int _v,
bool hide)
752 if (!hide && _v != 0)
754 NoteElement(ele, _v);
772 void NoteElement(
int ele,
int a)
777 Note(
"hintLearnAbility".lang(row.
GetName().ToTitleCase()));
779 else if (row.
tag.Contains(
"flag"))
785 string @ref = ((a < 0) ?
"" :
"+") + a;
789 @ref = ((a > 0) ?
"+" :
"-").Repeat(Mathf.Clamp(Mathf.Abs(a) / 5 + num3, 1, 5));
790 Note(
"modValueRes".lang(row.
GetName(), @ref));
794 Note(
"modValue".lang(row.
GetName(), @ref));
void UnequipAll(int idSlot)
void AddRandomBodyPart(bool msg=false)
ElementContainer faithElements
static SourceManager sources
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 featCannibalism
const int featModelBeliever
const int featMelilithCurse
const int featGod_element1
const int featExecutioner
const int featHeavyCasting
const int featMagicManner
const int featManaPrecision
const int featFastLearner
const int featGod_trickery1
const int featCosmicHorror
const int featEarthStrength
const int featGod_healing1
static readonly int[] IDS
const int featGod_moonshadow1
const int featGod_strife1
const int featGod_harvest1
const int featAnimalLover
const int featFairyResist
const int featGod_machine1
const int featGod_harmony1
const int featGod_oblivion1
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)