Elin Decompiled Documentation EA 23.243 Nightly Patch 3
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)
 
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 (int _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 296 of file FEAT.cs.

Member Function Documentation

◆ Apply()

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

Definition at line 377 of file FEAT.cs.

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

322 {
323 return !base.IsGlobalElement;
324 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 340 of file FEAT.cs.

341 {
342 string text = "";
343 Apply(base.Value, owner, hint: true);
344 foreach (string hint in hints)
345 {
346 text = text + hint.StripLastPun() + ", ";
347 }
348 return text.TrimEnd(' ').TrimEnd(',');
349 }
List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:377

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 326 of file FEAT.cs.

327 {
328 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
329 }
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 351 of file FEAT.cs.

352 {
353 if (base.source.req.Length != 0)
354 {
355 Element element = owner.GetElement(base.source.req[0]);
356 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()))
357 {
358 return false;
359 }
360 }
361 return true;
362 }
int Value(int ele)
Element GetElement(string alias)
int ValueWithoutLink
Definition: ELEMENT.cs:294

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

332 {
333 Apply(base.Value, owner, hint: true);
334 foreach (string hint in hints)
335 {
336 n.AddText("_bullet".lang() + hint);
337 }
338 }
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 364 of file FEAT.cs.

365 {
366 if (base.source.req.Length != 0)
367 {
368 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());
369 if (element != null)
370 {
371 n.AddHeader("featReq");
372 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
373 }
374 }
375 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:304
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1098
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 300 of file FEAT.cs.

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

◆ hints

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

Definition at line 298 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 319 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 306 of file FEAT.cs.

307 {
308 get
309 {
310 string[] array = base.source.GetText().SplitNewline();
311 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
312 }
313 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 304 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 302 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 317 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 315 of file FEAT.cs.


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