Elin Decompiled Documentation EA 23.327 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 340 of file FEAT.cs.

Member Function Documentation

◆ Apply()

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

Definition at line 421 of file FEAT.cs.

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

366 {
367 return !base.IsGlobalElement;
368 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 384 of file FEAT.cs.

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

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 370 of file FEAT.cs.

371 {
372 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
373 }
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 395 of file FEAT.cs.

396 {
397 if (base.source.req.Length != 0)
398 {
399 Element element = owner.GetElement(base.source.req[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()))
401 {
402 return false;
403 }
404 }
405 return true;
406 }
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 375 of file FEAT.cs.

376 {
377 Apply(base.Value, owner, hint: true);
378 foreach (string hint in hints)
379 {
380 n.AddText("_bullet".lang() + hint);
381 }
382 }
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 408 of file FEAT.cs.

409 {
410 if (base.source.req.Length != 0)
411 {
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());
413 if (element != null)
414 {
415 n.AddHeader("featReq");
416 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
417 }
418 }
419 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:313
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1123
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 344 of file FEAT.cs.

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

◆ hints

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

Definition at line 342 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 363 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 350 of file FEAT.cs.

351 {
352 get
353 {
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) : "");
356 }
357 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 348 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 346 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 361 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 359 of file FEAT.cs.


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