Elin Decompiled Documentation EA 23.258 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)
 
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 302 of file FEAT.cs.

Member Function Documentation

◆ Apply()

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

Definition at line 383 of file FEAT.cs.

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

328 {
329 return !base.IsGlobalElement;
330 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 346 of file FEAT.cs.

347 {
348 string text = "";
349 Apply(base.Value, owner, hint: true);
350 foreach (string hint in hints)
351 {
352 text = text + hint.StripLastPun() + ", ";
353 }
354 return text.TrimEnd(' ').TrimEnd(',');
355 }
List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:383

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 332 of file FEAT.cs.

333 {
334 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
335 }
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 357 of file FEAT.cs.

358 {
359 if (base.source.req.Length != 0)
360 {
361 Element element = owner.GetElement(base.source.req[0]);
362 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()))
363 {
364 return false;
365 }
366 }
367 return true;
368 }
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 337 of file FEAT.cs.

338 {
339 Apply(base.Value, owner, hint: true);
340 foreach (string hint in hints)
341 {
342 n.AddText("_bullet".lang() + hint);
343 }
344 }
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 370 of file FEAT.cs.

371 {
372 if (base.source.req.Length != 0)
373 {
374 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());
375 if (element != null)
376 {
377 n.AddHeader("featReq");
378 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
379 }
380 }
381 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:304
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1102
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 306 of file FEAT.cs.

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

◆ hints

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

Definition at line 304 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 325 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 312 of file FEAT.cs.

313 {
314 get
315 {
316 string[] array = base.source.GetText().SplitNewline();
317 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
318 }
319 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 310 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 308 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 323 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 321 of file FEAT.cs.


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