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

Member Function Documentation

◆ Apply()

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

Definition at line 413 of file FEAT.cs.

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

358 {
359 return !base.IsGlobalElement;
360 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 376 of file FEAT.cs.

377 {
378 string text = "";
379 Apply(base.Value, owner, hint: true);
380 foreach (string hint in hints)
381 {
382 text = text + hint.StripLastPun() + ", ";
383 }
384 return text.TrimEnd(' ').TrimEnd(',');
385 }
virtual List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:413

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 362 of file FEAT.cs.

363 {
364 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
365 }
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 387 of file FEAT.cs.

388 {
389 if (base.source.req.Length != 0)
390 {
391 Element element = owner.GetElement(base.source.req[0]);
392 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()))
393 {
394 return false;
395 }
396 }
397 return true;
398 }
int Value(int ele)
Element GetElement(string alias)
int ValueWithoutLink
Definition: ELEMENT.cs:301

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 367 of file FEAT.cs.

368 {
369 Apply(base.Value, owner, hint: true);
370 foreach (string hint in hints)
371 {
372 n.AddText("_bullet".lang() + hint);
373 }
374 }
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 400 of file FEAT.cs.

401 {
402 if (base.source.req.Length != 0)
403 {
404 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());
405 if (element != null)
406 {
407 n.AddHeader("featReq");
408 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
409 }
410 }
411 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:311
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1121
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 336 of file FEAT.cs.

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

◆ hints

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

Definition at line 334 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 355 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 342 of file FEAT.cs.

343 {
344 get
345 {
346 string[] array = base.source.GetText().SplitNewline();
347 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
348 }
349 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 340 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 338 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 353 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 351 of file FEAT.cs.


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