Elin Decompiled Documentation EA 23.200 Stable
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 int GetSourceValue (int 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 273 of file FEAT.cs.

Member Function Documentation

◆ Apply()

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

Definition at line 354 of file FEAT.cs.

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

299 {
300 return !base.IsGlobalElement;
301 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 317 of file FEAT.cs.

318 {
319 string text = "";
320 Apply(base.Value, owner, hint: true);
321 foreach (string hint in hints)
322 {
323 text = text + hint.StripLastPun() + ", ";
324 }
325 return text.TrimEnd(' ').TrimEnd(',');
326 }
List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:354

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 303 of file FEAT.cs.

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

329 {
330 if (base.source.req.Length != 0)
331 {
332 Element element = owner.GetElement(base.source.req[0]);
333 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()))
334 {
335 return false;
336 }
337 }
338 return true;
339 }
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 308 of file FEAT.cs.

309 {
310 Apply(base.Value, owner, hint: true);
311 foreach (string hint in hints)
312 {
313 n.AddText("_bullet".lang() + hint);
314 }
315 }
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 341 of file FEAT.cs.

342 {
343 if (base.source.req.Length != 0)
344 {
345 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());
346 if (element != null)
347 {
348 n.AddHeader("featReq");
349 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
350 }
351 }
352 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:304
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1100
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 277 of file FEAT.cs.

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

◆ hints

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

Definition at line 275 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 296 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 283 of file FEAT.cs.

284 {
285 get
286 {
287 string[] array = base.source.GetText().SplitNewline();
288 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
289 }
290 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 281 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 279 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 294 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 292 of file FEAT.cs.


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