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

Member Function Documentation

◆ Apply()

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

Definition at line 375 of file FEAT.cs.

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

320 {
321 return !base.IsGlobalElement;
322 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 338 of file FEAT.cs.

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

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 324 of file FEAT.cs.

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

350 {
351 if (base.source.req.Length != 0)
352 {
353 Element element = owner.GetElement(base.source.req[0]);
354 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()))
355 {
356 return false;
357 }
358 }
359 return true;
360 }
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 329 of file FEAT.cs.

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

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

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

◆ hints

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

Definition at line 296 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 317 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 304 of file FEAT.cs.

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

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 302 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 300 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 315 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 313 of file FEAT.cs.


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