Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
Element Class Reference
Inheritance diagram for Element:
EClass Act AttbMain AttbSpecial AttbWeapon Culture Feat Level Piety RaceBonus Resistance Skill

Classes

class  BonusInfo
 

Public Member Functions

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)
 
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 Member Functions

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 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

SourceElement.Row _source
 
int id
 
int vBase
 
int vExp
 
int vPotential
 
int vTempPotential
 
int vLink
 
int vSource
 
int vSourcePotential
 
ElementContainer owner
 

Static Public Attributes

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

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]
 

Detailed Description

Definition at line 78 of file ELEMENT.cs.

Member Function Documentation

◆ _WriteNote() [1/2]

void Element._WriteNote ( UINote  n,
Chara  c,
Act  act 
)
inline

Definition at line 596 of file ELEMENT.cs.

597 {
599 Act.Cost cost = e.GetCost(c);
600 int p = e.GetPower(c);
601 n.Space(6);
602 string text = source.GetText("textExtra");
603 if (!text.IsEmpty())
604 {
605 string[] array = text.Split(',');
606 foreach (string text2 in array)
607 {
608 if (text2.StartsWith("@"))
609 {
610 Condition condition = Condition.Create(text2.Replace("@", ""), p);
611 condition.owner = c;
612 if (!source.aliasRef.IsEmpty())
613 {
614 condition.SetElement(EClass.sources.elements.alias[source.aliasRef].id);
615 }
616 switch (act.id)
617 {
618 case 6902:
619 condition.SetRefVal(79, 267);
620 break;
621 case 8510:
622 case 8710:
623 condition.SetRefVal(79, (act.id == 8710) ? 222 : 221);
624 break;
625 }
626 n.AddText("_bullet".lang() + "hintCon".lang(condition.Name, condition.EvaluateTurn(p).ToString() ?? ""));
627 condition._WriteNote(n, asChild: true);
628 }
629 else
630 {
631 string text3 = text2.Replace("#calc", Calc());
632 if (!source.aliasRef.IsEmpty())
633 {
634 text3 = text3.Replace("#ele", EClass.sources.elements.alias[source.aliasRef].GetName().ToLower());
635 }
636 n.AddText("_bullet".lang() + text3);
637 }
638 }
639 }
640 if (source.tag.Contains("syncRide"))
641 {
642 n.AddText("_bullet".lang() + "hintSyncRide".lang());
643 }
645 {
646 int i = id;
647 if (i != 8230 && i != 8232)
648 {
649 n.AddText("_bullet".lang() + "hintPartyAbility".lang());
650 }
651 }
652 if (!act.LocalAct)
653 {
654 n.Space();
655 n.AddText("isGlobalAct".lang());
656 }
657 if (cost.type != 0 && cost.cost != 0)
658 {
659 n.Space(4);
660 UIItem uIItem = n.AddExtra<UIItem>("costPrice");
661 int num = cost.cost;
662 if (cost.type == Act.CostType.MP && c.Evalue(483) > 0)
663 {
664 num = cost.cost * 100 / (100 + (int)Mathf.Sqrt(c.Evalue(483) * 10) * 3);
665 }
666 string text4 = cost.cost.ToString() ?? "";
667 if (num != cost.cost)
668 {
669 text4 = num + " (" + text4 + ")";
670 }
671 uIItem.text1.SetText(text4, (((cost.type == Act.CostType.MP) ? c.mana.value : c.stamina.value) >= num) ? FontColor.Good : FontColor.Bad);
672 uIItem.image1.sprite = ((cost.type == Act.CostType.MP) ? EClass.core.refs.icons.mana : EClass.core.refs.icons.stamina);
673 uIItem.image1.SetNativeSize();
674 }
675 string Calc()
676 {
677 Dice dice = Dice.Create(e, c);
678 if (dice == null)
679 {
680 return p.ToString() ?? "";
681 }
682 return dice.ToString();
683 }
684 }
FontColor
Definition: FontColor.cs:2
Definition: ACT.cs:62
CostType
Definition: ACT.cs:64
virtual bool LocalAct
Definition: ACT.cs:169
virtual bool HaveLongPressAction
Definition: ACT.cs:131
void SetElement(int id)
virtual string Name
override void _WriteNote(UINote n, bool asChild=false)
virtual int EvaluateTurn(int p)
void SetRefVal(int a, int b)
ElementContainerCard elements
Definition: Card.cs:37
int Evalue(int ele)
Definition: Card.cs:2431
Stats stamina
Definition: Chara.cs:955
static Condition Create(string alias, int power=100, Action< Condition > onCreate=null)
Definition: Condition.cs:46
Sprite mana
Definition: CoreRef.cs:120
Sprite stamina
Definition: CoreRef.cs:122
Icons icons
Definition: CoreRef.cs:339
CoreRef refs
Definition: Core.cs:51
Definition: Dice.cs:4
override string ToString()
Definition: Dice.cs:91
static Dice Create(Element ele, Card c)
Definition: Dice.cs:96
Definition: EClass.cs:5
static Core core
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:42
Element GetOrCreateElement(Element ele)
int id
Definition: ELEMENT.cs:240
SourceElement.Row source
Definition: ELEMENT.cs:263
virtual int GetPower(Card c)
Definition: ELEMENT.cs:884
virtual Act.Cost GetCost(Chara c)
Definition: ELEMENT.cs:853
Act act
Definition: ELEMENT.cs:384
SourceElement elements
virtual int value
Definition: Stats.cs:56
Definition: UIItem.cs:5
Image image1
Definition: UIItem.cs:14
UIText text1
Definition: UIItem.cs:6
UIItem AddText(string text, FontColor color=FontColor.DontChange)
Definition: UINote.cs:113
void Space(int sizeY=0, int sizeX=1)
Definition: UINote.cs:62
void SetText(string s)
Definition: UIText.cs:159
Definition: ACT.cs:71
CostType type
Definition: ACT.cs:74
int cost
Definition: ACT.cs:72

References BaseCondition._WriteNote(), act, UINote.AddText(), EClass.core, Act.Cost.cost, Dice.Create(), Condition.Create(), Card.elements, SourceManager.elements, BaseCondition.EvaluateTurn(), Card.Evalue(), GetCost(), ElementContainer.GetOrCreateElement(), GetPower(), Act.HaveLongPressAction, CoreRef.icons, id, UIItem.image1, Act.LocalAct, CoreRef.Icons.mana, BaseCondition.Name, Core.refs, BaseCondition.SetElement(), BaseCondition.SetRefVal(), UIText.SetText(), source, EClass.sources, UINote.Space(), Chara.stamina, CoreRef.Icons.stamina, UIItem.text1, Dice.ToString(), Act.Cost.type, and Stats.value.

Referenced by Thing.WriteNote(), WriteNote(), and WriteNoteWithRef().

◆ _WriteNote() [2/2]

void Element._WriteNote ( UINote  n,
ElementContainer  owner,
Action< UINote onWriteNote,
bool  isRef,
bool  addHeader = true 
)
inline

Definition at line 693 of file ELEMENT.cs.

694 {
695 if (addHeader)
696 {
697 if (isRef)
698 {
699 UIText.globalSizeMod = -2;
700 n.AddHeader("prevElement".lang(FullName));
701 }
702 else if (this is Act)
703 {
705 n.Space(8);
706 }
707 else
708 {
709 n.AddHeader(FullName.ToTitleCase(wholeText: true));
710 }
711 }
712 string detail = GetDetail();
713 if (!detail.IsEmpty())
714 {
715 n.AddText("NoteText_flavor_element", detail);
716 n.Space(6);
717 }
718 int num = vLink;
719 if (owner.Chara != null && owner.Chara.IsPCFaction)
720 {
722 }
723 bool flag = ShowValue;
724 bool flag2 = ShowRelativeAttribute;
725 if (source.category == "landfeat")
726 {
727 flag = false;
728 flag2 = false;
729 }
730 if (this is Act)
731 {
732 Act act = ACT.Create(source.id);
733 UIItem uIItem = n.AddItem("ItemAbility");
734 uIItem.text1.text = "vValue".lang(DisplayValue.ToString() ?? "", ValueWithoutLink + ((num == 0) ? "" : ((num > 0) ? (" + " + num) : (" - " + -num))));
735 uIItem.text2.text = act.TargetType.ToString().lang();
736 uIItem.text3.text = ((this is Spell) ? (owner.Chara.CalcCastingChance(owner.GetOrCreateElement(act.source.id)) + "%") : "-") ?? "";
737 }
738 else if (flag)
739 {
740 n.AddTopic("TopicLeft", "vCurrent".lang(), "vValue".lang(DisplayValue.ToString() ?? "", ValueWithoutLink + ((num == 0) ? "" : ((num > 0) ? (" + " + num) : (" - " + -num)))));
741 if (ShowPotential)
742 {
743 num = vTempPotential;
744 n.AddTopic("TopicLeft", "vPotential".lang(), "vValue".lang(Potential.ToString() ?? "", vPotential + vSourcePotential + MinPotential + ((num == 0) ? "" : ((num > 0) ? (" + " + num) : (" - " + -num)))));
745 }
747 }
748 if (flag2 && !source.aliasParent.IsEmpty())
749 {
750 Element element = Create(source.aliasParent);
751 UIItem uIItem2 = n.AddItem("ItemRelativeAttribute");
752 uIItem2.text1.SetText(element.Name);
753 element.SetImage(uIItem2.image1);
754 bool flag3 = source.lvFactor > 0 && this is Act;
755 uIItem2.text2.SetActive(flag3);
756 uIItem2.text3.SetActive(flag3);
757 if (flag3)
758 {
759 uIItem2.text2.SetText(GetPower(EClass.pc).ToString() ?? "");
760 }
761 }
762 OnWriteNote(n, owner);
764 {
765 n.AddTopic("TopicLeft", "Class:", GetType()?.ToString() ?? "");
766 n.AddTopic("TopicLeft", "vExp".lang(), vExp.ToString() ?? "");
767 n.AddTopic("TopicLeft", "vSource", vSource.ToString() ?? "");
768 n.AddTopic("TopicLeft", "vSourcePotential", vSourcePotential.ToString() ?? "");
769 n.AddTopic("TopicLeft", "vPotential", vPotential.ToString() ?? "");
770 n.AddTopic("TopicLeft", "Potential", Potential.ToString() ?? "");
771 }
773 onWriteNote?.Invoke(n);
774 if (ShowBonuses && owner.Chara != null)
775 {
776 BonusInfo bonusInfo = new BonusInfo();
777 bonusInfo.ele = this;
778 bonusInfo.n = n;
779 bonusInfo.c = owner.Chara;
780 bonusInfo.WriteNote();
781 }
782 UIText.globalSizeMod = 0;
783 }
Definition: ACT.cs:6
static Act Create(int id)
Definition: ACT.cs:36
virtual TargetType TargetType
Definition: ACT.cs:140
Faction faction
Definition: Chara.cs:412
override void WriteNote(UINote n, Action< UINote > onWriteNote=null, IInspect.NoteMode mode=IInspect.NoteMode.Default, Recipe recipe=null)
Definition: Chara.cs:6583
int CalcCastingChance(Element e, int num=1)
Definition: Chara.cs:5535
override bool IsPCFaction
Definition: Chara.cs:656
bool showExtra
Definition: CoreDebug.cs:167
static Chara pc
Definition: EClass.cs:14
static CoreDebug debug
Definition: EClass.cs:48
int Value(int ele)
virtual Chara Chara
virtual bool ShowPotential
Definition: ELEMENT.cs:322
virtual int DisplayValue
Definition: ELEMENT.cs:278
int ValueWithoutLink
Definition: ELEMENT.cs:284
int Potential
Definition: ELEMENT.cs:288
int vExp
Definition: ELEMENT.cs:244
int vPotential
Definition: ELEMENT.cs:246
ElementContainer owner
Definition: ELEMENT.cs:256
int vTempPotential
Definition: ELEMENT.cs:248
virtual string FullName
Definition: ELEMENT.cs:296
void AddHeaderAbility(UINote n)
Definition: ELEMENT.cs:686
void SetImage(Image i)
Definition: ELEMENT.cs:468
void CheckLevelBonus(ElementContainer owner, UINote n=null)
Definition: ELEMENT.cs:793
virtual bool ShowRelativeAttribute
Definition: ELEMENT.cs:328
virtual string Name
Definition: ELEMENT.cs:294
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:913
int vLink
Definition: ELEMENT.cs:250
virtual bool ShowBonuses
Definition: ELEMENT.cs:330
virtual bool PotentialAsStock
Definition: ELEMENT.cs:326
int vSource
Definition: ELEMENT.cs:252
int vSourcePotential
Definition: ELEMENT.cs:254
virtual void OnWriteNote(UINote n, ElementContainer owner)
Definition: ELEMENT.cs:785
virtual string GetDetail()
Definition: ELEMENT.cs:478
virtual int MinPotential
Definition: ELEMENT.cs:286
virtual bool ShowValue
Definition: ELEMENT.cs:320
ElementContainerFaction charaElements
Definition: FACTION.cs:144
Definition: SPELL.cs:468
UIText text3
Definition: UIItem.cs:10
UIText text2
Definition: UIItem.cs:8
UIItem AddItem(string id)
Definition: UINote.cs:139
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddTopic(string id, string text, string value=null)
Definition: UINote.cs:144

References act, UINote.AddHeader(), AddHeaderAbility(), UINote.AddItem(), UINote.AddText(), UINote.AddTopic(), Chara.CalcCastingChance(), ElementContainer.Chara, Faction.charaElements, CheckLevelBonus(), ACT.Create(), Create(), EClass.debug, DisplayValue, Chara.faction, FullName, GetDetail(), ElementContainer.GetOrCreateElement(), GetPower(), UIItem.image1, Chara.IsPCFaction, MinPotential, Name, OnWriteNote(), owner, EClass.pc, Potential, PotentialAsStock, SetImage(), UIText.SetText(), ShowBonuses, CoreDebug.showExtra, ShowPotential, ShowRelativeAttribute, ShowValue, source, UINote.Space(), Act.TargetType, UIItem.text1, UIItem.text2, UIItem.text3, ElementContainer.Value(), ValueWithoutLink, vExp, vLink, vPotential, vSource, vSourcePotential, vTempPotential, and Element.BonusInfo.WriteNote().

◆ AddHeaderAbility()

void Element.AddHeaderAbility ( UINote  n)
inline

Definition at line 686 of file ELEMENT.cs.

687 {
688 UIItem uIItem = n.AddHeader("HeaderAbility", FullName.ToTitleCase(wholeText: true), GetSprite());
689 uIItem.text2.text = ((this is Spell) ? (vPotential.ToString() ?? "") : "-");
690 (this as Act)?.SetImage(uIItem.image1);
691 }
virtual Sprite GetSprite()
Definition: ELEMENT.cs:406

References UINote.AddHeader(), FullName, GetSprite(), UIItem.image1, SetImage(), and vPotential.

Referenced by _WriteNote().

◆ CanLink()

virtual bool Element.CanLink ( ElementContainer  owner)
inlinevirtual

◆ CheckLevelBonus()

void Element.CheckLevelBonus ( ElementContainer  owner,
UINote  n = null 
)
inline

Definition at line 793 of file ELEMENT.cs.

794 {
795 if (owner == null || source.levelBonus.IsEmpty())
796 {
797 return;
798 }
799 bool flag = n == null;
800 string[] array = (source.GetText("levelBonus", returnNull: true) ?? source.levelBonus).Split(Environment.NewLine.ToCharArray());
801 if (!flag)
802 {
803 n.Space(10);
804 }
805 string[] array2 = array;
806 foreach (string obj in array2)
807 {
808 string[] array3 = obj.Split(',');
809 int lv = array3[0].ToInt();
810 SourceElement.Row row = (EClass.sources.elements.alias.ContainsKey(array3[1]) ? EClass.sources.elements.alias[array3[1]] : null);
811 if (flag)
812 {
813 if (lv > ValueWithoutLink)
814 {
815 break;
816 }
817 if (row != null && !owner.Has(row.id) && owner is ElementContainerZone)
818 {
819 owner.Learn(row.id);
820 }
821 }
822 else
823 {
824 string s = ((row != null) ? row.GetName() : array3[1]);
825 n.AddText((" Lv " + lv).TagColor(FontColor.Topic) + " " + s.TagColorGoodBad(() => (row != null) ? owner.Has(row.id) : (lv <= ValueWithoutLink), () => false));
826 }
827 }
828 if (!flag)
829 {
830 n.Space(4);
831 }
832 }
void Learn(int ele, int v=1)
bool Has(int ele)
override string GetName()

References SourceManager.elements, SourceElement.Row.GetName(), ElementContainer.Has(), SourceElement.Row.id, ElementContainer.Learn(), owner, source, EClass.sources, and ValueWithoutLink.

Referenced by _WriteNote(), and ElementContainer.ModBase().

◆ Create() [1/2]

◆ Create() [2/2]

static Element Element.Create ( string  id,
int  v = 1 
)
inlinestatic

Definition at line 927 of file ELEMENT.cs.

928 {
929 return Create(EClass.sources.elements.alias[id].id, v);
930 }

References Create(), SourceManager.elements, and EClass.sources.

◆ Get()

static SourceElement.Row Element.Get ( int  id)
inlinestatic

◆ GetCost()

virtual Act.Cost Element.GetCost ( Chara  c)
inlinevirtual

Definition at line 853 of file ELEMENT.cs.

854 {
855 if (source.cost[0] == 0)
856 {
857 Act.Cost result = default(Act.Cost);
858 result.type = Act.CostType.None;
859 return result;
860 }
861 Act.Cost result2 = default(Act.Cost);
862 if (this is Spell)
863 {
864 result2.type = Act.CostType.MP;
865 int num = EClass.curve(Value, 50, 10);
866 result2.cost = source.cost[0] * (100 + ((!source.tag.Contains("noCostInc")) ? (num * 3) : 0)) / 100;
867 }
868 else
869 {
870 result2.type = Act.CostType.SP;
871 result2.cost = source.cost[0];
872 if (source.id == 6020)
873 {
874 result2.cost = c.stamina.max / 3 + 10;
875 }
876 }
877 if (!c.IsPC && result2.cost > 2)
878 {
879 result2.cost /= 2;
880 }
881 return result2;
882 }
override bool IsPC
Definition: Chara.cs:597
static int curve(int a, int start, int step, int rate=75)
Definition: EClass.cs:55
int Value
Definition: ELEMENT.cs:282

References Act.Cost.cost, EClass.curve(), Chara.IsPC, source, and Value.

Referenced by _WriteNote(), ElementContainer.GetSpellExp(), GoalCombat.TryUseAbility(), and Chara.UseAbility().

◆ GetDetail()

virtual string Element.GetDetail ( )
inlinevirtual

Definition at line 478 of file ELEMENT.cs.

479 {
480 return source.GetDetail();
481 }

References source.

Referenced by _WriteNote(), and ButtonElement.Refresh().

◆ GetElementMap() [1/2]

static Dictionary< int, int > Element.GetElementMap ( int[]  list)
inlinestatic

Definition at line 521 of file ELEMENT.cs.

522 {
523 Dictionary<int, int> dictionary = new Dictionary<int, int>();
524 if (list != null)
525 {
526 for (int i = 0; i < list.Length / 2; i++)
527 {
528 dictionary[list[i * 2]] = list[i * 2 + 1];
529 }
530 }
531 return dictionary;
532 }

Referenced by SourceCard.AddRow(), SourceJob.OnInit(), SourceMaterial.OnInit(), and SourceRace.OnInit().

◆ GetElementMap() [2/2]

static Dictionary< int, int > Element.GetElementMap ( int[]  list,
Dictionary< int, int >  map 
)
inlinestatic

Definition at line 534 of file ELEMENT.cs.

535 {
536 if (list != null)
537 {
538 for (int i = 0; i < list.Length / 2; i++)
539 {
540 map[list[i * 2]] = list[i * 2 + 1];
541 }
542 }
543 return map;
544 }

◆ GetIcon()

virtual Sprite Element.GetIcon ( string  suffix = "")
inlinevirtual

Reimplemented in Feat, LandFeat, RaceBonus, and Resistance.

Definition at line 438 of file ELEMENT.cs.

439 {
440 return SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_" + source.alias + suffix) ?? SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "ele_" + source.aliasParent + suffix) ?? SpriteSheet.Get("Media/Graphics/Icon/Element/icon_elements", "cat_" + source.category);
441 }
static Sprite Get(string id)
Definition: SpriteSheet.cs:28

References SpriteSheet.Get(), and source.

Referenced by WidgetStatsBar.Add(), ButtonElement.SetGrid(), and SetImage().

◆ GetId()

static int Element.GetId ( string  alias)
inlinestatic

Definition at line 932 of file ELEMENT.cs.

933 {
934 return EClass.sources.elements.alias[alias].id;
935 }

References SourceManager.elements, and EClass.sources.

◆ GetMaterialSourceValue()

int Element.GetMaterialSourceValue ( Thing  t,
int  v 
)
inline

Definition at line 411 of file ELEMENT.cs.

412 {
413 if (id == 2 || v < 0)
414 {
415 return v;
416 }
417 if (IsTrait)
418 {
419 if (t.IsFurniture)
420 {
421 return v;
422 }
423 return Mathf.Min(v + t.encLV * 10, 60);
424 }
425 return v * (100 + t.encLV * 10) / 100;
426 }
bool IsFurniture
Definition: Card.cs:2111
int encLV
Definition: Card.cs:310
bool IsTrait
Definition: ELEMENT.cs:352

References Card.encLV, Card.IsFurniture, and IsTrait.

Referenced by ElementContainer.ApplyMaterialElementMap().

◆ GetName()

static string Element.GetName ( string  alias)
inlinestatic

Definition at line 386 of file ELEMENT.cs.

387 {
388 return EClass.sources.elements.alias[alias].GetName();
389 }

References SourceManager.elements, and EClass.sources.

Referenced by TaskChopWood.OnCreateProgress().

◆ GetParent()

Element Element.GetParent ( Card  c)
inline

Definition at line 512 of file ELEMENT.cs.

513 {
514 if (!source.aliasParent.IsEmpty())
515 {
516 return c.elements.GetOrCreateElement(source.aliasParent);
517 }
518 return null;
519 }

References Card.elements, ElementContainer.GetOrCreateElement(), and source.

Referenced by ElementContainer.ModExp(), and AttackProcess.Prepare().

◆ GetPower()

virtual int Element.GetPower ( Card  c)
inlinevirtual

Reimplemented in Ability.

Definition at line 884 of file ELEMENT.cs.

885 {
886 return 100;
887 }

Referenced by _WriteNote(), Dice.Create(), Act.Perform(), and Chara.UseAbility().

◆ GetRandomElement()

static SourceElement.Row Element.GetRandomElement ( int  lv = 1)
inlinestatic

Definition at line 546 of file ELEMENT.cs.

547 {
548 if (lv > 100)
549 {
550 lv = 100;
551 }
552 if (ListElements.Count == 0)
553 {
554 foreach (SourceElement.Row row in EClass.sources.elements.rows)
555 {
556 if (row.categorySub == "eleAttack" && row.chance > 0)
557 {
558 ListElements.Add(row);
559 }
560 }
561 }
562 List<Tuple<SourceElement.Row, int>> list = new List<Tuple<SourceElement.Row, int>>();
563 foreach (SourceElement.Row listElement in ListElements)
564 {
565 int num = 40 * (listElement.eleP - 100) / 100;
566 if (list.Count == 0 || num < lv)
567 {
568 list.Add(new Tuple<SourceElement.Row, int>(listElement, num));
569 }
570 }
571 return list.RandomItemWeighted((Tuple<SourceElement.Row, int> a) => 10000 / (100 + (lv - a.Item2) * 25)).Item1;
572 }
static List< SourceElement.Row > ListElements
Definition: ELEMENT.cs:258

References SourceManager.elements, ListElements, and EClass.sources.

Referenced by TraitToolRangeCane.OnCreate().

◆ GetResistDamage()

static int Element.GetResistDamage ( int  dmg,
int  v,
int  power = 0 
)
inlinestatic

Definition at line 951 of file ELEMENT.cs.

952 {
953 int resistLv = GetResistLv(v);
954 resistLv -= power;
955 if (resistLv >= 4)
956 {
957 return 0;
958 }
959 return resistLv switch
960 {
961 3 => dmg / 4,
962 2 => dmg / 3,
963 1 => dmg / 2,
964 0 => dmg,
965 -1 => dmg * 3 / 2,
966 -2 => dmg * 2,
967 _ => dmg * 2,
968 };
969 }
static int GetResistLv(int v)
Definition: ELEMENT.cs:937

References GetResistLv().

Referenced by Card.DamageHP().

◆ GetResistLv()

static int Element.GetResistLv ( int  v)
inlinestatic

Definition at line 937 of file ELEMENT.cs.

938 {
939 int num = v / 5;
940 if (num < -2)
941 {
942 num = -2;
943 }
944 if (num > 4)
945 {
946 num = 4;
947 }
948 return num;
949 }

Referenced by GetResistDamage(), Card.ResistLv(), and ButtonElement.SetGrid().

◆ GetSortVal()

int Element.GetSortVal ( UIList::SortMode  m)
inline

Definition at line 834 of file ELEMENT.cs.

835 {
836 switch (m)
837 {
838 case UIList.SortMode.ByCategory:
839 return source.id + ((!source.aliasParent.IsEmpty()) ? (EClass.sources.elements.alias[source.aliasParent].id * 10000) : 0);
840 case UIList.SortMode.ByNumber:
841 return -vPotential * 10000 + source.id;
842 case UIList.SortMode.ByElementParent:
843 if (!source.aliasParent.IsEmpty())
844 {
845 return EClass.sources.elements.alias[source.aliasParent].sort;
846 }
847 return id;
848 default:
849 return source.id;
850 }
851 }
Definition: UIList.cs:9
SortMode
Definition: UIList.cs:27

References SourceManager.elements, id, source, EClass.sources, and vPotential.

Referenced by ElementContainer.AddNote(), WindowCharaMini.Refresh(), LayerHome.RefreshFeat(), WindowChara.RefreshSkill(), and LayerAbility.SelectGroup().

◆ GetSource()

virtual SourceElement.Row Element.GetSource ( )
inlinevirtual

Definition at line 396 of file ELEMENT.cs.

397 {
398 return EClass.sources.elements.alias.TryGetValue(GetType().ToString());
399 }

References SourceManager.elements, and EClass.sources.

◆ GetSourcePotential()

virtual int Element.GetSourcePotential ( int  v)
inlinevirtual

Reimplemented in Skill.

Definition at line 401 of file ELEMENT.cs.

402 {
403 return 0;
404 }

Referenced by ElementContainer.ApplyElementMap().

◆ GetSourceValue()

virtual int Element.GetSourceValue ( int  v,
int  lv,
SourceValueType  type 
)
inlinevirtual

Reimplemented in Ability.

Definition at line 428 of file ELEMENT.cs.

429 {
430 return type switch
431 {
432 SourceValueType.Chara => v * (100 + (lv - 1 + EClass.rnd(lv / 2 + 1)) * source.lvFactor / 10) / 100 + EClass.rnd(lv / 3) * source.lvFactor / 100,
433 SourceValueType.Fixed => v,
434 _ => v * ((source.encFactor == 0) ? 100 : (50 + EClass.rnd(100) + EClass.rnd((int)Mathf.Sqrt(lv * 100)) * source.encFactor / 100)) / 100,
435 };
436 }
static int rnd(int a)
Definition: EClass.cs:50

References EClass.rnd(), and source.

Referenced by ElementContainer.ApplyElementMap().

◆ GetSprite()

virtual Sprite Element.GetSprite ( )
inlinevirtual

Reimplemented in Act.

Definition at line 406 of file ELEMENT.cs.

407 {
408 return null;
409 }

Referenced by AddHeaderAbility().

◆ HasTag()

◆ IsActive()

bool Element.IsActive ( Card  c)
inline

Definition at line 443 of file ELEMENT.cs.

444 {
445 if (IsGlobalElement && c != null && !c.c_idDeity.IsEmpty() && c.c_idDeity != EClass.pc.idFaith)
446 {
447 return false;
448 }
449 return Value != 0;
450 }
string c_idDeity
Definition: Card.cs:1481
string idFaith
Definition: Chara.cs:216
bool IsGlobalElement
Definition: ELEMENT.cs:335

References Card.c_idDeity, Chara.idFaith, IsGlobalElement, EClass.pc, and Value.

Referenced by ElementContainer.AddNote().

◆ IsFactionElement()

bool Element.IsFactionElement ( Chara  c)
inline

Definition at line 483 of file ELEMENT.cs.

484 {
485 if (c == null)
486 {
487 return false;
488 }
489 if (c.IsPCFaction)
490 {
491 foreach (Element value in EClass.pc.faction.charaElements.dict.Values)
492 {
493 if (value.id == id && value.Value > 0)
494 {
495 return true;
496 }
497 }
498 }
499 if (c.faithElements != null)
500 {
501 foreach (Element value2 in c.faithElements.dict.Values)
502 {
503 if (value2.id == id && value2.Value > 0)
504 {
505 return true;
506 }
507 }
508 }
509 return false;
510 }
ElementContainer faithElements
Definition: Chara.cs:38
Dictionary< int, Element > dict

References Faction.charaElements, ElementContainer.dict, Chara.faction, Chara.faithElements, id, Chara.IsPCFaction, EClass.pc, and Value.

Referenced by ButtonElement.Refresh(), WindowChara.RefreshSkill(), and ButtonElement.SetGrid().

◆ IsPurchaseFeatReqMet()

virtual bool Element.IsPurchaseFeatReqMet ( ElementContainer  owner,
int  lv = -1 
)
inlinevirtual

Reimplemented in Feat.

Definition at line 904 of file ELEMENT.cs.

905 {
906 return false;
907 }

Referenced by ButtonElement.Refresh(), and WriteNoteWithRef().

◆ OnChangeValue()

virtual void Element.OnChangeValue ( )
inlinevirtual

Reimplemented in Ability, AttbMain, and Skill.

Definition at line 789 of file ELEMENT.cs.

790 {
791 }

Referenced by ElementContainer.ModBase(), ElementContainer.ModLink(), and ElementContainer.SetBase().

◆ OnWriteNote()

virtual void Element.OnWriteNote ( UINote  n,
ElementContainer  owner 
)
inlinevirtual

Reimplemented in Feat, and RaceBonus.

Definition at line 785 of file ELEMENT.cs.

786 {
787 }

Referenced by _WriteNote().

◆ SetImage()

void Element.SetImage ( Image  i)
inline

Definition at line 468 of file ELEMENT.cs.

469 {
470 Sprite icon = GetIcon();
471 if ((bool)icon)
472 {
473 i.sprite = icon;
474 i.SetNativeSize();
475 }
476 }
virtual Sprite GetIcon(string suffix="")
Definition: ELEMENT.cs:438

References GetIcon().

Referenced by _WriteNote(), AddHeaderAbility(), ElementContainer.AddNote(), and ButtonElement.Refresh().

◆ SetTextValue()

virtual void Element.SetTextValue ( UIText  text)
inlinevirtual

Reimplemented in Resistance.

Definition at line 889 of file ELEMENT.cs.

890 {
891 string text2 = DisplayValue.ToString() ?? "";
892 if (ShowXP)
893 {
894 text2 += ".".TagSize((vExp / 10).ToString("D2") ?? "", 11);
895 }
896 if (vLink != 0)
897 {
898 string text3 = ((vLink > 0) ? "+" : "") + vLink;
899 text2 = "<color=" + ((DisplayValue > ValueWithoutLink) ? SkinManager.CurrentColors.textGood : SkinManager.CurrentColors.textBad).ToHex() + ">" + text2 + (" (" + text3 + ")").TagSize(13) + "</color>";
900 }
901 text.text = text2;
902 }
virtual bool ShowXP
Definition: ELEMENT.cs:307
static SkinColorProfile CurrentColors
Definition: SkinManager.cs:84

References SkinManager.CurrentColors, DisplayValue, ShowXP, SkinColorProfile.textBad, SkinColorProfile.textGood, ValueWithoutLink, vExp, and vLink.

Referenced by ButtonElement.Refresh().

◆ SortVal()

int Element.SortVal ( bool  charaSheet = false)
inline

Definition at line 452 of file ELEMENT.cs.

453 {
454 int num = ((source.sort != 0) ? source.sort : id);
455 return (IsFlag ? 100000 : 0) + ((!charaSheet && IsGlobalElement) ? (-1000000) : 0) + num;
456 }
bool IsFlag
Definition: ELEMENT.cs:292

References IsFlag, IsGlobalElement, and source.

Referenced by ElementContainer.AddNote(), AI_Torture.CreateProgress(), and TaskDump.Run().

◆ WriteNote()

void Element.WriteNote ( UINote  n,
ElementContainer  owner = null,
Action< UINote onWriteNote = null 
)
inline

Definition at line 574 of file ELEMENT.cs.

575 {
576 n.Clear();
577 _WriteNote(n, owner, onWriteNote, isRef: false);
578 n.Build();
579 }
void _WriteNote(UINote n, Chara c, Act act)
Definition: ELEMENT.cs:596
void Clear()
Definition: UINote.cs:35
void Build()
Definition: UINote.cs:49

References _WriteNote(), UINote.Build(), UINote.Clear(), and owner.

Referenced by ElementContainer.AddNote(), ButtonElement.Refresh(), ItemCulture.Refresh(), ButtonAbility.SetAct(), ItemGachaResult.SetChara(), UICardInfo.SetElement(), ButtonElement.SetGrid(), and Policy.WriteNote().

◆ WriteNoteWithRef()

void Element.WriteNoteWithRef ( UINote  n,
ElementContainer  owner,
Action< UINote onWriteNote,
Element  refEle 
)
inline

Definition at line 581 of file ELEMENT.cs.

582 {
583 n.Clear();
584 _WriteNote(n, owner, onWriteNote, isRef: false);
585 if (refEle.Value > 0)
586 {
587 refEle._WriteNote(n, owner, onWriteNote, isRef: true);
588 }
590 {
592 }
593 n.Build();
594 }
virtual void WritePurchaseReq(UINote n, int lv=1)
Definition: ELEMENT.cs:909
virtual bool IsPurchaseFeatReqMet(ElementContainer owner, int lv=-1)
Definition: ELEMENT.cs:904

References _WriteNote(), UINote.Build(), UINote.Clear(), IsPurchaseFeatReqMet(), owner, Value, ElementContainer.Value(), and WritePurchaseReq().

Referenced by ButtonElement.Refresh().

◆ WritePurchaseReq()

virtual void Element.WritePurchaseReq ( UINote  n,
int  lv = 1 
)
inlinevirtual

Reimplemented in Feat.

Definition at line 909 of file ELEMENT.cs.

910 {
911 }

Referenced by WriteNoteWithRef().

Member Data Documentation

◆ _source

SourceElement.Row Element._source

Definition at line 238 of file ELEMENT.cs.

◆ Div

const int Element.Div = 5
static

Definition at line 226 of file ELEMENT.cs.

◆ id

int Element.id

Definition at line 240 of file ELEMENT.cs.

Referenced by TraitAltar._OnOffer(), BaseCondition._WriteNote(), _WriteNote(), ElementContainer.AddNote(), Feat.Apply(), Chara.ApplyDeathPenalty(), ElementContainer.ApplyMaterialElementMap(), GrowSystem.ApplySeed(), ActMelee.Attack(), Thing.CanAutoFire(), RecipeManager.CanCeomUpWithRecipe(), Thing.CanStackTo(), TraitAmmo.CanStackTo(), RecipeManager.ComeUpWithRecipe(), TraitCrafter.Craft(), RecipeCard.Craft(), Dice.Create(), Create(), Card.DamageHP(), CoreDebug.Fix_EtherDisease(), Chara.GainAbility(), DNA.Generate(), Get(), GoalAutoCombat.GetAbilities(), Card.GetBestAttribute(), DNA.GetInvalidAction(), DNA.GetInvalidFeat(), ElementContainer.GetOrCreateElement(), Recipe.GetQualityBonus(), ElementContainer.GetSortVal(), GetSortVal(), RecipeSource.GetSPCost(), Act.GetText(), Chara.GiveGift(), IsFactionElement(), Chara.ListAvailabeFeats(), ElementContainer.ListBestAttributes(), ElementContainer.ListBestSkills(), ElementContainer.ListElements(), Card.MakeFoodFrom(), TraitSeed.MakeSeed(), CraftUtil.MixIngredients(), ElementContainer.ModBase(), ElementContainer.ModExp(), CraftUtil.ModRandomFoodEnc(), Chara.ModTempElement(), FactionBranch.OnClaimZone(), TaskDrawWater.OnCreateProgress(), TaskPourWater.OnCreateProgress(), TraitDrinkMilkMother.OnDrink(), ElementContainerFaction.OnEquip(), ElementContainerCard.OnLevelUp(), TaskCraft.OnProgress(), TaskCraft.OnProgressComplete(), ElementContainer.OnSerializing(), ElementContainerFaction.OnUnequip(), ResearchPlan.ParseReward(), Act.Perform(), AttackProcess.Perform(), FoodEffect.Proc(), ActEffect.Proc(), ActEffect.ProcAt(), FoodEffect.ProcTrait(), Religion.Reforge(), ButtonElement.Refresh(), UICharaMaker.Refresh(), WidgetStatsBar.Refresh(), WindowCharaMini.Refresh(), WindowChara.RefreshSkill(), AI_Idle.Run(), LayerAbility.SelectGroup(), ElementContainer.SetBase(), ButtonElement.SetGrid(), Card.SetLv(), ElementContainer.SetParent(), ElementContainer.SetTo(), ButtonAbility.SpecialHoldAction(), WidgetTracker.Toggle(), CalcPlat.Train(), Thing.TryLickEnchant(), HotItemAct.TrySetAct(), Chara.TryUpgrade(), GoalCombat.TryUseAbility(), FactionBranch.Upgrade(), Chara.UseAbility(), ElementContainerCard.ValueBonus(), Element.BonusInfo.WriteNote(), and Thing.WriteNote().

◆ List_Body

int [] Element.List_Body = new int[4] { 70, 72, 71, 77 }
static

◆ List_MainAttributes

int [] Element.List_MainAttributes = new int[9] { 70, 72, 71, 77, 74, 75, 76, 73, 79 }
static

Definition at line 230 of file ELEMENT.cs.

◆ List_MainAttributesMajor

int [] Element.List_MainAttributesMajor = new int[8] { 70, 72, 71, 77, 74, 75, 76, 73 }
static

Definition at line 232 of file ELEMENT.cs.

Referenced by Card.GetBestAttribute(), WindowCharaMini.Refresh(), and Chara.TryUpgrade().

◆ List_Mind

int [] Element.List_Mind = new int[4] { 74, 75, 76, 73 }
static

◆ ListAttackElements

List<SourceElement.Row> Element.ListAttackElements = new List<SourceElement.Row>()
static

Definition at line 260 of file ELEMENT.cs.

Referenced by SourceManager.Init().

◆ ListElements

List<SourceElement.Row> Element.ListElements = new List<SourceElement.Row>()
static

Definition at line 258 of file ELEMENT.cs.

Referenced by Chara.GetFavWeaponSkill(), and GetRandomElement().

◆ owner

◆ vBase

◆ vExp

◆ vLink

◆ Void

◆ vPotential

◆ vSource

◆ vSourcePotential

int Element.vSourcePotential

Definition at line 254 of file ELEMENT.cs.

Referenced by _WriteNote().

◆ vTempPotential

Property Documentation

◆ act

◆ CanGainExp

virtual bool Element.CanGainExp
get

Definition at line 290 of file ELEMENT.cs.

Referenced by ElementContainer.ModExp().

◆ CostLearn

virtual int Element.CostLearn
get

◆ CostTrain

virtual int Element.CostTrain
get

Definition at line 302 of file ELEMENT.cs.

Referenced by CalcPlat.Train().

◆ DisplayValue

virtual int Element.DisplayValue
get

◆ ExpToNext

virtual int Element.ExpToNext
get

Definition at line 298 of file ELEMENT.cs.

Referenced by ElementContainer.ModExp(), and Thing.WriteNote().

◆ FullName

virtual string Element.FullName
get

Definition at line 296 of file ELEMENT.cs.

Referenced by _WriteNote(), AddHeaderAbility(), and ButtonElement.Refresh().

◆ IsFactionWideElement

bool Element.IsFactionWideElement
get

Definition at line 346 of file ELEMENT.cs.

◆ IsFlag

bool Element.IsFlag
get

Definition at line 292 of file ELEMENT.cs.

Referenced by WindowChara.RefreshSkill(), and SortVal().

◆ IsFoodTrait

◆ IsFoodTraitMain

bool Element.IsFoodTraitMain
get

Definition at line 356 of file ELEMENT.cs.

357 {
358 get
359 {
360 if (IsFoodTrait)
361 {
362 if (!source.tag.Contains("primary"))
363 {
364 return source.tag.Contains("foodpot");
365 }
366 return true;
367 }
368 return false;
369 }
370 }
bool IsFoodTrait
Definition: ELEMENT.cs:354

Referenced by ElementContainer.AddNote(), ElementContainer.GetSortVal(), Thing.ListLimitedValidTraits(), Thing.ListValidTraits(), CraftUtil.MixIngredients(), and Thing.WriteNote().

◆ IsGlobalElement

bool Element.IsGlobalElement
get

Definition at line 334 of file ELEMENT.cs.

335 {
336 get
337 {
338 if (vExp != -1)
339 {
340 return vExp == -2;
341 }
342 return true;
343 }
344 }

Referenced by ElementContainer.AddNote(), Card.HasGlobalElement(), IsActive(), ElementContainerFaction.OnEquip(), ElementContainerFaction.OnUnequip(), ButtonElement.SetGrid(), SortVal(), and Element.BonusInfo.WriteNote().

◆ IsMainAttribute

bool Element.IsMainAttribute
get

Definition at line 372 of file ELEMENT.cs.

373 {
374 get
375 {
376 if (source.category == "attribute")
377 {
378 return source.tag.Contains("primary");
379 }
380 return false;
381 }
382 }

Referenced by Chara.ApplyDeathPenalty(), and FoodEffect.Proc().

◆ IsPartyWideElement

bool Element.IsPartyWideElement
get

Definition at line 348 of file ELEMENT.cs.

◆ IsTrait

◆ MinPotential

virtual int Element.MinPotential
get

Definition at line 286 of file ELEMENT.cs.

Referenced by _WriteNote().

◆ MinValue

virtual int Element.MinValue
get

Definition at line 280 of file ELEMENT.cs.

◆ Name

◆ Potential

int Element.Potential
get

Definition at line 288 of file ELEMENT.cs.

Referenced by _WriteNote(), and ButtonElement.Refresh().

◆ PotentialAsStock

virtual bool Element.PotentialAsStock
get

Definition at line 326 of file ELEMENT.cs.

Referenced by _WriteNote(), and LayerAbility.SelectGroup().

◆ ShortName

virtual string Element.ShortName
get

Definition at line 332 of file ELEMENT.cs.

Referenced by ButtonElement.SetGrid().

◆ ShowBonuses

virtual bool Element.ShowBonuses
get

Definition at line 330 of file ELEMENT.cs.

Referenced by _WriteNote().

◆ ShowEncNumber

virtual bool Element.ShowEncNumber
get

Definition at line 350 of file ELEMENT.cs.

◆ ShowMsgOnValueChanged

virtual bool Element.ShowMsgOnValueChanged
get

Definition at line 318 of file ELEMENT.cs.

Referenced by ElementContainerCard.OnLevelDown(), and ElementContainerCard.OnLevelUp().

◆ ShowPotential

virtual bool Element.ShowPotential
get

Definition at line 322 of file ELEMENT.cs.

Referenced by _WriteNote().

◆ ShowRelativeAttribute

virtual bool Element.ShowRelativeAttribute
get

Definition at line 328 of file ELEMENT.cs.

Referenced by _WriteNote().

◆ ShowValue

virtual bool Element.ShowValue
get

Definition at line 320 of file ELEMENT.cs.

Referenced by _WriteNote().

◆ ShowXP

virtual bool Element.ShowXP
get

Definition at line 306 of file ELEMENT.cs.

307 {
308 get
309 {
311 {
312 return source.category != "attribute";
313 }
314 return true;
315 }
316 }

Referenced by WidgetTracker.Refresh(), and SetTextValue().

◆ source

SourceElement.Row Element.source
get

Definition at line 262 of file ELEMENT.cs.

263 {
264 get
265 {
267 if (row == null)
268 {
269 SourceElement.Row obj = ((id == 0) ? GetSource() : Get(id)) ?? EClass.sources.elements.rows[0];
270 SourceElement.Row row2 = obj;
271 _source = obj;
272 row = row2;
273 }
274 return row;
275 }
276 }
virtual SourceElement.Row GetSource()
Definition: ELEMENT.cs:396
static SourceElement.Row Get(int id)
Definition: ELEMENT.cs:391
SourceElement.Row _source
Definition: ELEMENT.cs:238

Referenced by _WriteNote(), ElementContainer.AddNote(), ElementContainer.AddNoteAll(), Feat.Apply(), ElementContainer.ApplyElementMap(), ElementContainer.ApplyMaterialElementMap(), GoalAutoCombat.BuildAbilityList(), Chara.CalcCastingChance(), DNA.CalcSlot(), Chara.CalculateMaxStamina(), CheckLevelBonus(), RecipeCard.Craft(), Dice.Create(), Player.CreateEquip(), ActEffect.DamageEle(), Card.DamageHP(), Player.DreamSpell(), ZonePreEnterEncounter.Execute(), CoreDebug.Fix_EtherDisease(), Chara.GainAbility(), DNA.Generate(), GetCost(), AIAct.GetCurrentActionText(), Check.GetDC(), GetDetail(), Chara.GetFavWeaponSkill(), Check.GetFinalDC(), FactionBranch.GetHearthIncome(), GetIcon(), DNA.GetInvalidAction(), DNA.GetInvalidFeat(), CardRow.GetName(), Chara.GetName(), GetParent(), ElementContainer.GetSortVal(), GetSortVal(), GetSourceValue(), ElementContainer.GetSpellExp(), FactionBranch.GetTechUpgradeCost(), Card.GetValue(), HasTag(), TraitFoodEggFertilized.Incubate(), CalcPlat.Learn(), Chara.ListAvailabeFeats(), ElementContainer.ListBestSkills(), ElementContainer.ListGeneFeats(), ElementContainer.ListRune(), Card.MakeFoodFrom(), Thing.MatchEncSearch(), Chara.ModCorruption(), ElementContainer.ModExp(), Chara.MutateRandom(), TraitDrinkMilkMother.OnDrink(), ElementContainerCard.OnLevelDown(), ElementContainerCard.OnLevelUp(), Act.Perform(), AttackProcess.Perform(), AttackProcess.PlayRangedAnime(), FoodEffect.Proc(), ActEffect.ProcAt(), ButtonElement.Refresh(), CharaAbility.Refresh(), UICharaMaker.Refresh(), WindowCharaMini.Refresh(), Card.RefreshColor(), LayerHome.RefreshFeat(), WindowChara.RefreshSkill(), WindowChara.RefreshStatic(), AI_Eat.Run(), AI_Idle.Run(), LayerAbility.SelectGroup(), ButtonAbility.SetAct(), Chara.SetFeat(), Chara.SetMainElement(), UIFactionInfo.SetZone(), SortVal(), ButtonAbility.SpecialHoldAction(), CalcPlat.Train(), HotItemAct.TrySetAct(), TraitCatalyst.TrySetHeldAct(), ButtonAbility.TryUse(), GoalCombat.TryUseAbility(), FactionBranch.Upgrade(), Chara.UseAbility(), ElementContainerCard.ValueBonus(), Element.BonusInfo.WriteNote(), DNA.WriteNote(), and Thing.WriteNote().

◆ UseExpMod

virtual bool Element.UseExpMod
get

Definition at line 300 of file ELEMENT.cs.

Referenced by ElementContainer.ModExp().

◆ UsePotential

virtual bool Element.UsePotential
get

Definition at line 324 of file ELEMENT.cs.

◆ Value

int Element.Value
get

Definition at line 282 of file ELEMENT.cs.

Referenced by TraitAltar._OnOffer(), BaseCondition._WriteNote(), Chara.AddCondition(), ElementContainer.AddNote(), Feat.Apply(), GrowSystem.ApplySeed(), Chara.CalcCastingChance(), GetCost(), Check.GetDC(), Chara.GetFavWeaponSkill(), Check.GetFinalDC(), Recipe.GetSortVal(), ElementContainer.GetSortVal(), RecipeSource.GetSPCost(), IsActive(), IsFactionElement(), ElementContainer.ListElements(), ElementContainer.ListGeneFeats(), Thing.ListLimitedValidTraits(), Thing.ListValidTraits(), Card.MakeFoodFrom(), TraitSeed.MakeSeed(), Thing.MatchEncSearch(), CraftUtil.MixIngredients(), Chara.ModCorruption(), CraftUtil.ModRandomFoodEnc(), Chara.MutateRandom(), ElementContainerFaction.OnEquip(), ElementContainerFaction.OnUnequip(), ResearchPlan.ParseReward(), AttackProcess.Perform(), AttackProcess.Prepare(), FoodEffect.Proc(), ActEffect.ProcAt(), FoodEffect.ProcTrait(), ButtonElement.Refresh(), WidgetTracker.Refresh(), WindowCharaMini.Refresh(), LayerHome.RefreshFeat(), UIRecipeInfo.RefreshList(), WindowChara.RefreshSkill(), ElementContainer.Remove(), LayerAbility.SelectGroup(), ItemGachaResult.SetChara(), Chara.SetFeat(), ButtonElement.SetGrid(), Recipe.SetTextDifficulty(), Recipe.TryGetFirstTimeBonus(), GoalCombat.TryUseAbility(), Chara.UseAbility(), ElementContainer.Value(), ElementContainerCard.ValueBonus(), Element.BonusInfo.WriteNote(), DNA.WriteNote(), Thing.WriteNote(), WriteNoteWithRef(), Feat.WritePurchaseReq(), and Recipe.WriteReqSkill().

◆ ValueWithoutLink


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