Elin Decompiled Documentation EA 23.335 Nightly
Loading...
Searching...
No Matches
Feat Class Reference
Inheritance diagram for Feat:
Element EClass Mutation

Public Member Functions

override bool CanLink (ElementContainer owner)
 
override Sprite GetIcon (string suffix="")
 
override void OnWriteNote (UINote n, ElementContainer owner)
 
string GetHint (ElementContainer owner)
 
override bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
override void WritePurchaseReq (UINote n, int lv=-1)
 
virtual List< string > Apply (int a, ElementContainer owner, bool hint=false)
 
- Public Member Functions inherited from Element
virtual SourceElement.Row GetSource ()
 
virtual int GetSourcePotential (int v)
 
virtual Sprite GetSprite ()
 
int GetMaterialSourceValue (Thing t, int v)
 
virtual long GetSourceValue (long v, int lv, SourceValueType type)
 
virtual Sprite GetIcon (string suffix="")
 
bool IsActive (Card c)
 
int SortVal (bool charaSheet=false)
 
virtual bool CanLink (ElementContainer owner)
 
bool HasTag (string tag)
 
void SetImage (Image i)
 
virtual string GetDetail ()
 
bool IsFactionElement (Chara c)
 
Element GetParent (Card c)
 
void WriteNote (UINote n, ElementContainer owner=null, Action< UINote > onWriteNote=null)
 
void WriteNoteWithRef (UINote n, ElementContainer owner, Action< UINote > onWriteNote, Element refEle)
 
void _WriteNote (UINote n, Chara c, Act act)
 
void AddHeaderAbility (UINote n)
 
void _WriteNote (UINote n, ElementContainer owner, Action< UINote > onWriteNote, bool isRef, bool addHeader=true)
 
void AddEncNote (UINote n, Card Card, ElementContainer.NoteMode mode=ElementContainer.NoteMode.Default, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
 
virtual void OnWriteNote (UINote n, ElementContainer owner)
 
virtual void OnChangeValue ()
 
void CheckLevelBonus (ElementContainer owner, UINote n=null)
 
int GetSortVal (UIList.SortMode m)
 
virtual Act.Cost GetCost (Chara c)
 
virtual int GetPower (Card c)
 
virtual void SetTextValue (UIText text, bool shorten=false)
 
virtual bool IsPurchaseFeatReqMet (ElementContainer owner, int lv=-1)
 
virtual void WritePurchaseReq (UINote n, int lv=1)
 

Static Public Attributes

static List< string > hints = new List<string>()
 
static string[] featRef = new string[5]
 
- Static Public Attributes inherited from Element
const int Div = 5
 
static Element Void = new Element()
 
static int[] List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 }
 
static int[] List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 }
 
static int[] List_Body = new int[4] { 70, 72, 71, 77 }
 
static int[] List_Mind = new int[4] { 74, 75, 76, 73 }
 
static List< SourceElement.RowListElements = new List<SourceElement.Row>()
 
static List< SourceElement.RowListAttackElements = new List<SourceElement.Row>()
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

override bool ShowBonuses [get]
 
override string Name [get]
 
override string FullName [get]
 
override bool ShowXP [get]
 
override bool ShowValue [get]
 
override int CostLearn [get]
 
- Properties inherited from Element
SourceElement.Row source [get]
 
virtual int DisplayValue [get]
 
virtual int MinValue [get]
 
int Value [get]
 
int ValueWithoutLink [get]
 
virtual int MinPotential [get]
 
int Potential [get]
 
virtual bool CanGainExp [get]
 
bool IsFlag [get]
 
virtual string Name [get]
 
virtual string FullName [get]
 
virtual int ExpToNext [get]
 
virtual bool UseExpMod [get]
 
virtual int CostTrain [get]
 
virtual int CostLearn [get]
 
virtual bool ShowXP [get]
 
virtual bool ShowMsgOnValueChanged [get]
 
virtual bool ShowValue [get]
 
virtual bool ShowPotential [get]
 
virtual bool UsePotential [get]
 
virtual bool PotentialAsStock [get]
 
virtual bool ShowRelativeAttribute [get]
 
virtual bool ShowBonuses [get]
 
virtual string ShortName [get]
 
bool IsGlobalElement [get]
 
bool IsFactionWideElement [get]
 
bool IsPartyWideElement [get]
 
virtual bool ShowEncNumber [get]
 
bool IsTrait [get]
 
bool IsFoodTrait [get]
 
bool IsFoodTraitMain [get]
 
bool IsMainAttribute [get]
 
Act act [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from Element
static string GetName (string alias)
 
static SourceElement.Row Get (int id)
 
static Dictionary< int, int > GetElementMap (int[] list)
 
static Dictionary< int, int > GetElementMap (int[] list, Dictionary< int, int > map)
 
static SourceElement.Row GetRandomElement (int lv=1, bool useWeight=true)
 
static Element Create (int id, int v=0)
 
static Element Create (string id, int v=1)
 
static int GetId (string alias)
 
static int GetResistLv (int v)
 
static long GetResistDamage (long dmg, int v, int power=0)
 
- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Public Attributes inherited from Element
SourceElement.Row _source
 
int id
 
int vBase
 
int vExp
 
int vPotential
 
int vTempPotential
 
int vLink
 
int vSource
 
int vSourcePotential
 
ElementContainer owner
 

Detailed Description

Definition at line 342 of file FEAT.cs.

Member Function Documentation

◆ Apply()

virtual List< string > Feat.Apply ( int  a,
ElementContainer  owner,
bool  hint = false 
)
inlinevirtual

Definition at line 423 of file FEAT.cs.

424 {
425 if (hint)
426 {
427 hints.Clear();
428 }
430 {
431 feat = this,
432 owner = owner,
433 hint = hint
434 };
435 elinFeatApplyEventArgs.SetData(a);
436 BaseModManager.PublishEvent("elin.feat.apply", elinFeatApplyEventArgs);
437 a = elinFeatApplyEventArgs.data;
438 int value = base.Value;
439 int A = Mathf.Abs(a);
440 int invert = ((a >= 0) ? 1 : (-1));
441 if (hint)
442 {
443 featRef[0] = a.ToString() ?? "";
444 featRef[1] = a.ToString() ?? "";
445 }
446 Chara chara = owner.Chara;
447 int num = vPotential;
448 if (!hint && a > 0 && chara != null)
449 {
450 num = (vPotential = chara.LV);
451 }
452 switch (id)
453 {
454 case 1660:
455 featRef[0] = (a * 25).ToString() ?? "";
456 break;
457 case 1206:
458 ModBase(78, -a * 10, hide: false);
459 break;
460 case 1642:
461 featRef[0] = ((a == 1) ? 10 : ((a == 2) ? 20 : 30)).ToString() ?? "";
462 break;
463 case 1643:
464 featRef[0] = ((a == 1) ? 1 : ((a == 2) ? 3 : 5)).ToString() ?? "";
465 break;
466 case 1610:
467 ModBase(60, a * 4, hide: false);
468 break;
469 case 1611:
470 ModBase(61, a * 4, hide: false);
471 break;
472 case 1612:
473 ModBase(62, a * 4, hide: false);
474 break;
475 case 1620:
476 ModAttribute(70);
477 break;
478 case 1621:
479 ModAttribute(72);
480 break;
481 case 1622:
482 ModAttribute(71);
483 break;
484 case 1623:
485 ModAttribute(73);
486 break;
487 case 1626:
488 ModAttribute(75);
489 break;
490 case 1625:
491 ModAttribute(76);
492 break;
493 case 1627:
494 ModAttribute(77);
495 break;
496 case 1624:
497 ModAttribute(74);
498 break;
499 case 1629:
500 ModBase(79, a * 5, hide: false);
501 break;
502 case 1630:
503 ModBase(65, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide: false);
504 break;
505 case 1631:
506 ModBase(64, ((A == 1) ? 2 : ((A == 2) ? 5 : 10)) * invert, hide: false);
507 break;
508 case 1632:
509 ModBase(150, a * 2, hide: false);
510 break;
511 case 1633:
512 ModBase(210, a * 3, hide: false);
513 ModBase(402, ((A == 3) ? 1 : 0) * invert, hide: false);
514 break;
515 case 1634:
516 ModBase(291, a * 4, hide: false);
517 break;
518 case 1635:
519 ModBase(100, a * 3, hide: false);
520 break;
521 case 1636:
522 ModBase(306, a * 4, hide: false);
523 break;
524 case 1628:
525 ModBase(78, a * 2, hide: false);
526 break;
527 case 1640:
528 ModBase(77, a * 2, hide: false);
529 break;
530 case 1400:
531 featRef[0] = (a * 10).ToString() ?? "";
532 break;
533 case 1404:
534 featRef[0] = (a * 10).ToString() ?? "";
535 break;
536 case 1401:
537 ModBase(78, a * 15, hide: false);
538 break;
539 case 1406:
540 featRef[0] = (a * 20).ToString() ?? "";
541 featRef[1] = (a * 5).ToString() ?? "";
542 break;
543 case 1644:
544 featRef[0] = a.ToString() ?? "";
545 if (!hint)
546 {
547 if (a > 0)
548 {
550 }
551 else
552 {
553 _ = a;
554 _ = 0;
555 }
556 if (owner.Chara.IsPC)
557 {
559 }
560 }
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);
564 break;
565 case 1230:
566 ModBase(60, A * 2 * invert, hide: false);
567 ModBase(79, A * 3 * invert, hide: false);
568 break;
569 case 1204:
570 ModBase(64, a * 50, hide: true);
571 ModBase(401, a, hide: false);
572 break;
573 case 1202:
574 ModBase(403, a * 20, hide: true);
575 break;
576 case 1210:
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);
584 break;
585 case 1290:
586 case 1292:
587 ModBase(418, a * 100, hide: false);
588 break;
589 case 1239:
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);
595 break;
596 case 1233:
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);
602 break;
603 case 1226:
604 ModBase(955, a * 5, hide: false);
605 ModBase(953, a * 5, hide: false);
606 break;
607 case 1212:
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);
615 break;
616 case 1213:
617 ModBase(962, a * 20, hide: false);
618 break;
619 case 1224:
620 ModBase(951, a * 15, hide: false);
621 break;
622 case 1217:
623 ModBase(952, a * -10, hide: false);
624 ModBase(955, a * 20, hide: false);
625 ModBase(964, a * 20, hide: false);
626 break;
627 case 1218:
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);
638 break;
639 case 1221:
640 ModBase(964, a * 20, hide: false);
641 break;
642 case 1223:
643 ModBase(963, a * 20, hide: false);
644 break;
645 case 1216:
646 ModBase(6020, a, hide: false);
647 break;
648 case 1250:
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);
654 break;
655 case 1415:
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);
661 break;
662 case 1419:
663 ModPotential(101, a * 50);
664 ModPotential(111, a * 50);
665 ModPotential(103, a * 50);
666 ModPotential(106, a * 50);
667 ModPotential(122, a * 50);
668 ModPotential(120, a * 50);
669 ModPotential(123, a * 50);
670 break;
671 case 1274:
672 featRef[3] = (a - 7).ToString() ?? "";
673 break;
674 case 1750:
675 {
676 string[] array = featRef;
677 int num2 = a;
678 array[0] = num2.ToString() ?? "";
679 featRef[1] = (a * 2).ToString() ?? "";
680 break;
681 }
682 case 1532:
683 ModBase(73, -a * 5, hide: false);
684 break;
685 case 1533:
686 ModBase(73, a * 5, hide: false);
687 break;
688 case 1510:
689 ModBase(65, a * 3, hide: false);
690 break;
691 case 1511:
692 ModBase(65, -a * 3, hide: false);
693 break;
694 case 1512:
695 ModBase(73, a * 5, hide: false);
696 break;
697 case 1513:
698 ModBase(73, -a * 5, hide: false);
699 break;
700 case 1514:
701 ModBase(72, a * 3, hide: false);
702 break;
703 case 1515:
704 ModBase(72, -a * 3, hide: false);
705 break;
706 case 1516:
707 ModBase(300, a * 4, hide: false);
708 break;
709 case 1517:
710 ModBase(300, -a * 4, hide: false);
711 break;
712 case 1518:
713 ModBase(79, a * 5, hide: false);
714 break;
715 case 1519:
716 ModBase(79, -a * 5, hide: false);
717 break;
718 case 1520:
719 ModBase(70, a * 3, hide: false);
720 break;
721 case 1521:
722 ModBase(70, -a * 3, hide: false);
723 break;
724 case 1522:
725 ModBase(77, a * 5, hide: false);
726 break;
727 case 1523:
728 ModBase(77, -a * 5, hide: false);
729 break;
730 case 1524:
731 ModBase(307, a * 4, hide: false);
732 break;
733 case 1525:
734 ModBase(307, -a * 4, hide: false);
735 break;
736 case 1526:
737 ModBase(951, a * 5, hide: false);
738 ModBase(950, -a * 5, hide: false);
739 break;
740 case 1527:
741 ModBase(951, -a * 5, hide: false);
742 ModBase(950, a * 5, hide: false);
743 break;
744 case 1528:
745 ModBase(952, a * 5, hide: false);
746 break;
747 case 1529:
748 ModBase(952, -a * 5, hide: false);
749 break;
750 case 1530:
751 ModBase(960, a * 5, hide: false);
752 ModBase(956, -a * 5, hide: false);
753 break;
754 case 1531:
755 ModBase(960, -a * 5, hide: false);
756 ModBase(956, a * 5, hide: false);
757 break;
758 case 1300:
759 case 1305:
760 case 1310:
761 case 1315:
762 case 1320:
763 case 1325:
764 case 1330:
765 case 1335:
766 case 1340:
767 case 1345:
768 case 1350:
769 case 1355:
770 GodHint();
771 break;
772 case 1550:
773 ModBase(404, -a * 10, hide: false);
774 break;
775 case 1551:
776 ModBase(77, -a * (4 + num / 5), hide: false);
777 break;
778 case 1552:
779 ModBase(79, a * Mathf.Min(30 + num / 5, 100), hide: false);
780 if (!hint && a > 0)
781 {
782 chara?.body.UnequipAll(39);
783 }
784 break;
785 case 1553:
786 ModBase(73, a * (5 + num / 3), hide: false);
787 ModBase(77, -a * (5 + num / 3), hide: false);
788 break;
789 case 1554:
790 ModBase(404, a * 10, hide: false);
791 ModBase(401, a, hide: false);
792 ModBase(79, a * (10 + num / 5), hide: false);
793 if (!hint && a > 0)
794 {
795 chara?.body.UnequipAll(33);
796 }
797 break;
798 case 1555:
799 ModBase(65, a * (12 + num), hide: false);
800 ModBase(77, -a * (5 + num / 5), hide: false);
801 if (!hint && a > 0)
802 {
803 chara?.body.UnequipAll(31);
804 }
805 break;
806 case 1556:
807 ModBase(64, -a * (10 + num), hide: false);
808 ModBase(67, a * (5 + num / 2), hide: false);
809 break;
810 case 1557:
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);
815 break;
816 case 1560:
817 ModBase(60, -a * 15, hide: false);
818 ModBase(70, -a * (4 + num / 3), hide: false);
819 break;
820 case 1561:
821 ModBase(61, -a * 15, hide: false);
822 ModBase(76, -a * (4 + num / 3), hide: false);
823 break;
824 case 1562:
825 ModBase(65, a * (15 + num / 2), hide: false);
826 ModBase(79, -a * (10 + num / 5), hide: false);
827 break;
828 case 1563:
829 ModBase(77, -a * (3 + num / 4), hide: false);
830 break;
831 case 1564:
832 ModBase(961, a * 5, hide: false);
833 break;
834 case 1565:
835 ModBase(955, a * 20, hide: false);
836 break;
837 }
838 if (hint)
839 {
840 string text = base.source.GetText("textExtra");
841 if (!text.IsEmpty())
842 {
843 string text2 = text.SplitNewline().TryGet(value - 1, 99);
844 if (!text2.IsEmpty())
845 {
846 int num3 = 0;
847 string[] array2 = text2.Split(',');
848 foreach (string obj in array2)
849 {
850 string text3 = featRef[num3];
851 string text4 = obj.Replace(";", ",");
852 if (text3.ToInt() < 0)
853 {
854 text4 = text4.Replace("+#1", text3);
855 }
856 text4 = text4.Replace("#1", text3);
857 hints.Add(text4);
858 num3++;
859 }
860 }
861 }
862 }
863 return hints;
864 void GodHint()
865 {
866 if (!hint)
867 {
868 return;
869 }
870 foreach (Element value2 in owner.Card.Chara.faithElements.dict.Values)
871 {
872 if (value2.source.id != id)
873 {
874 NoteElement(value2.id, value2.Value);
875 }
876 }
877 }
878 void ModAttribute(int ele)
879 {
880 _ = hint;
881 ModBase(ele, ((A == 1) ? 2 : ((A == 2) ? 4 : 5)) * invert, hide: false);
882 ModPotential(ele, a * 10);
883 }
884 void ModBase(int ele, int _v, bool hide)
885 {
886 if (!hint)
887 {
888 owner.ModBase(ele, _v);
889 }
890 if (!hide && _v != 0)
891 {
892 NoteElement(ele, _v);
893 }
894 }
895 void ModPotential(int ele, int _v)
896 {
897 if (!hint)
898 {
899 owner.ModPotential(ele, _v);
900 }
901 Note("modPotential".lang(EClass.sources.elements.map[ele].GetName(), "+" + _v + "%"));
902 }
903 void Note(string s)
904 {
905 if (hint)
906 {
907 hints.Add(s);
908 }
909 }
910 void NoteElement(int ele, int a)
911 {
913 if (row.category == "ability")
914 {
915 Note("hintLearnAbility".lang(row.GetName().ToTitleCase()));
916 }
917 else if (row.tag.Contains("flag"))
918 {
919 Note(row.GetName());
920 }
921 else
922 {
923 string @ref = ((a < 0) ? "" : "+") + a;
924 if (row.category == "resist")
925 {
926 int num4 = 0;
927 @ref = ((a > 0) ? "+" : "-").Repeat(Mathf.Clamp(Mathf.Abs(a) / 5 + num4, 1, 5));
928 Note("modValueRes".lang(row.GetName(), @ref));
929 }
930 else
931 {
932 Note("modValue".lang(row.GetName(), @ref));
933 }
934 }
935 }
936 }
@ ModPotential
@ hint
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:2387
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
Element ModBase(int ele, int v)
virtual Chara Chara
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
static List< string > hints
Definition: FEAT.cs:344
static string[] featRef
Definition: FEAT.cs:346
override string GetName()
SourceElement elements
static void OnChangeBodyPart()
Definition: WidgetEquip.cs:53

References Chara.AddRandomBodyPart(), Chara.body, ElementContainer.Card, SourceElement.Row.category, Card.Chara, ElementContainer.Chara, EVENT.ElinEventArgs< T >.data, ElementContainer.dict, SourceManager.elements, Chara.faithElements, featRef, SourceElement.Row.GetName(), hint, hints, Element.id, Chara.IsPC, Card.LV, ElementContainer.ModBase(), ModPotential, ElementContainer.ModPotential(), WidgetEquip.OnChangeBodyPart(), Element.owner, BaseModManager.PublishEvent(), EVENT.ElinEventArgs< T >.SetData(), Element.source, EClass.sources, SourceElement.Row.tag, CharaBody.UnequipAll(), Element.Value, and Element.vPotential.

Referenced by GetHint(), OnWriteNote(), and Chara.SetFeat().

◆ CanLink()

override bool Feat.CanLink ( ElementContainer  owner)
inlinevirtual

Reimplemented from Element.

Definition at line 367 of file FEAT.cs.

368 {
369 return !base.IsGlobalElement;
370 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 386 of file FEAT.cs.

387 {
388 string text = "";
389 Apply(base.Value, owner, hint: true);
390 foreach (string hint in hints)
391 {
392 text = text + hint.StripLastPun() + ", ";
393 }
394 return text.TrimEnd(' ').TrimEnd(',');
395 }
virtual List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:423

References Apply(), hint, hints, and Element.owner.

◆ GetIcon()

override Sprite Feat.GetIcon ( string  suffix = "")
inlinevirtual

Reimplemented from Element.

Definition at line 372 of file FEAT.cs.

373 {
374 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
375 }
static Sprite Get(string id)
Definition: SpriteSheet.cs:28

References SpriteSheet.Get().

◆ IsPurchaseFeatReqMet()

override bool Feat.IsPurchaseFeatReqMet ( ElementContainer  owner,
int  lv = -1 
)
inlinevirtual

Reimplemented from Element.

Definition at line 397 of file FEAT.cs.

398 {
399 if (base.source.req.Length != 0)
400 {
401 Element element = owner.GetElement(base.source.req[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()))
403 {
404 return false;
405 }
406 }
407 return true;
408 }
int Value(int ele)
Element GetElement(string alias)
int ValueWithoutLink
Definition: ELEMENT.cs:303

References ElementContainer.GetElement(), Element.owner, ElementContainer.Value(), and Element.ValueWithoutLink.

Referenced by Chara.ListAvailabeFeats().

◆ OnWriteNote()

override void Feat.OnWriteNote ( UINote  n,
ElementContainer  owner 
)
inlinevirtual

Reimplemented from Element.

Definition at line 377 of file FEAT.cs.

378 {
379 Apply(base.Value, owner, hint: true);
380 foreach (string hint in hints)
381 {
382 n.AddText("_bullet".lang() + hint);
383 }
384 }
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113

References Apply(), hint, hints, and Element.owner.

◆ WritePurchaseReq()

override void Feat.WritePurchaseReq ( UINote  n,
int  lv = -1 
)
inlinevirtual

Reimplemented from Element.

Definition at line 410 of file FEAT.cs.

411 {
412 if (base.source.req.Length != 0)
413 {
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());
415 if (element != null)
416 {
417 n.AddHeader("featReq");
418 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
419 }
420 }
421 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:313
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1130
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79

References UINote.AddHeader(), UINote.AddText(), Element.Create(), Element.Name, Element.owner, Element.Value, and ElementContainer.Value().

Member Data Documentation

◆ featRef

string [] Feat.featRef = new string[5]
static

Definition at line 346 of file FEAT.cs.

Referenced by Apply(), and ElementContainer.GetFeatRef().

◆ hints

List<string> Feat.hints = new List<string>()
static

Definition at line 344 of file FEAT.cs.

Referenced by Apply(), GetHint(), and OnWriteNote().

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 365 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 352 of file FEAT.cs.

353 {
354 get
355 {
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) : "");
358 }
359 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 350 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 348 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 363 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 361 of file FEAT.cs.


The documentation for this class was generated from the following file: