Elin Decompiled Documentation EA 23.130 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 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)
 
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 (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 252 of file FEAT.cs.

Member Function Documentation

◆ Apply()

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

Definition at line 333 of file FEAT.cs.

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

278 {
279 return !base.IsGlobalElement;
280 }

◆ GetHint()

string Feat.GetHint ( ElementContainer  owner)
inline

Definition at line 296 of file FEAT.cs.

297 {
298 string text = "";
299 Apply(base.Value, owner, hint: true);
300 foreach (string hint in hints)
301 {
302 text = text + hint.StripLastPun() + ", ";
303 }
304 return text.TrimEnd(' ').TrimEnd(',');
305 }
List< string > Apply(int a, ElementContainer owner, bool hint=false)
Definition: FEAT.cs:333

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

◆ GetIcon()

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

Reimplemented from Element.

Definition at line 282 of file FEAT.cs.

283 {
284 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_Feat");
285 }
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 307 of file FEAT.cs.

308 {
309 if (base.source.req.Length != 0)
310 {
311 Element element = owner.GetElement(base.source.req[0]);
312 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()))
313 {
314 return false;
315 }
316 }
317 return true;
318 }
int Value(int ele)
Element GetElement(string alias)
int ValueWithoutLink
Definition: ELEMENT.cs:290

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

288 {
289 Apply(base.Value, owner, hint: true);
290 foreach (string hint in hints)
291 {
292 n.AddText("_bullet".lang() + hint);
293 }
294 }
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 320 of file FEAT.cs.

321 {
322 if (base.source.req.Length != 0)
323 {
324 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());
325 if (element != null)
326 {
327 n.AddHeader("featReq");
328 n.AddText(element.Name + ": " + element.Value, FontColor.Bad);
329 }
330 }
331 }
FontColor
Definition: FontColor.cs:2
virtual string Name
Definition: ELEMENT.cs:300
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1094
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 256 of file FEAT.cs.

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

◆ hints

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

Definition at line 254 of file FEAT.cs.

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

Property Documentation

◆ CostLearn

override int Feat.CostLearn
get

Definition at line 275 of file FEAT.cs.

◆ FullName

override string Feat.FullName
get

Definition at line 262 of file FEAT.cs.

263 {
264 get
265 {
266 string[] array = base.source.GetText().SplitNewline();
267 return array.TryGet(base.Value - 1) + ((base.source.max > 1 && array.Length == 1 && base.Value > 1) ? (" " + base.Value) : "");
268 }
269 }

Referenced by Chara.SetFeat().

◆ Name

override string Feat.Name
get

Definition at line 260 of file FEAT.cs.

◆ ShowBonuses

override bool Feat.ShowBonuses
get

Definition at line 258 of file FEAT.cs.

◆ ShowValue

override bool Feat.ShowValue
get

Definition at line 273 of file FEAT.cs.

◆ ShowXP

override bool Feat.ShowXP
get

Definition at line 271 of file FEAT.cs.


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