Elin Decompiled Documentation EA 23.276 Nightly Patch 2
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)
 
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 int GetResistDamage (int 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 313 of file FEAT.cs.

Member Function Documentation

◆ Apply()

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

Definition at line 394 of file FEAT.cs.

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

References Chara.AddRandomBodyPart(), Chara.body, ElementContainer.Card, SourceElement.Row.category, Card.Chara, ElementContainer.Chara, ElementContainer.dict, SourceManager.elements, Chara.faithElements, featRef, SourceElement.Row.GetName(), hint, hints, Element.id, WidgetEquip.Instance, Chara.IsPC, Card.LV, ElementContainer.ModBase(), ModPotential, ElementContainer.ModPotential(), Element.owner, WidgetEquip.Rebuild(), 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 338 of file FEAT.cs.

339 {
340 return !base.IsGlobalElement;
341 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 357 of file FEAT.cs.

358 {
359 string text = "";
360 Apply(base.Value, owner, hint: true);
361 foreach (string hint in hints)
362 {
363 text = text + hint.StripLastPun() + ", ";
364 }
365 return text.TrimEnd(' ').TrimEnd(',');
366 }
List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:394

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 343 of file FEAT.cs.

344 {
345 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
346 }
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 368 of file FEAT.cs.

369 {
370 if (base.source.req.Length != 0)
371 {
372 Element element = owner.GetElement(base.source.req[0]);
373 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()))
374 {
375 return false;
376 }
377 }
378 return true;
379 }
int Value(int ele)
Element GetElement(string alias)
int ValueWithoutLink
Definition: ELEMENT.cs:299

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

349 {
350 Apply(base.Value, owner, hint: true);
351 foreach (string hint in hints)
352 {
353 n.AddText("_bullet".lang() + hint);
354 }
355 }
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 381 of file FEAT.cs.

382 {
383 if (base.source.req.Length != 0)
384 {
385 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());
386 if (element != null)
387 {
388 n.AddHeader("featReq");
389 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
390 }
391 }
392 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:309
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1111
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 317 of file FEAT.cs.

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

◆ hints

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

Definition at line 315 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 336 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 323 of file FEAT.cs.

324 {
325 get
326 {
327 string[] array = base.source.GetText().SplitNewline();
328 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
329 }
330 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 321 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 319 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 334 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 332 of file FEAT.cs.


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