Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
ElementContainerFaction Class Reference
Inheritance diagram for ElementContainerFaction:
ElementContainer EClass

Public Member Functions

bool IsEffective (Thing t)
 
void OnEquip (Chara c, Thing t)
 
void OnUnequip (Chara c, Thing t)
 
void OnEquip (Thing t)
 
void OnUnequip (Thing t)
 
void CheckDirty ()
 
void OnLeaveFaith ()
 
void OnJoinFaith ()
 
void OnAddMemeber (Chara c)
 
void OnRemoveMember (Chara c)
 
- Public Member Functions inherited from ElementContainer
void ApplyElementMap (int uid, SourceValueType type, Dictionary< int, int > map, int lv, bool invert=false, bool applyFeat=false)
 
void ApplyMaterialElementMap (Thing t, bool invert=false)
 
void ImportElementMap (Dictionary< int, int > map)
 
ElementContainer ImportElementMap (int[] ints)
 
void ApplyPotential (int mode=0)
 
int Value (int ele)
 
virtual int ValueBonus (Element e)
 
int ValueWithoutLink (int ele)
 
int ValueWithoutLink (string alias)
 
int GetFeatRef (int ele, int idx=0)
 
int Exp (int ele)
 
bool Has (int ele)
 
bool Has (SourceElement.Row row)
 
bool Has (string alias)
 
bool HasBase (int ele)
 
int Base (int ele)
 
void Learn (int ele, int v=1)
 
void Train (int ele, int a=10)
 
void ModExp (int ele, int a, bool chain=false)
 
virtual void OnLearn (int ele)
 
virtual void OnTrain (int ele)
 
virtual void OnLevelUp (Element e, int lastValue)
 
virtual void OnLevelDown (Element e, int lastValue)
 
Element SetBase (string alias, int v, int potential=0)
 
Element SetBase (int id, int v, int potential=0)
 
void SetTo (int id, int v)
 
void Remove (int id)
 
Element ModBase (int ele, int v)
 
virtual void OnChangeValue ()
 
Element ModPotential (int ele, int v)
 
Element ModTempPotential (int ele, int v, int threshMsg=0)
 
virtual void OnModTempPotential (Element e, int v, int threshMsg)
 
int GetSpellExp (Chara c, Element e, int costMod=100)
 
Element GetElement (string alias)
 
Element GetElement (int id)
 
Element CreateElement (int id)
 
Element GetOrCreateElement (Element ele)
 
Element GetOrCreateElement (string alias)
 
Element GetOrCreateElement (int id)
 
void SetParent (Card c)
 
void SetParent (ElementContainer newParent=null)
 
List< ElementListElements (Func< Element, bool > shoudList=null, Comparison< Element > comparison=null)
 
List< ElementListBestAttributes ()
 
List< ElementListBestSkills ()
 
List< ElementListGeneFeats ()
 
List< ElementListLearnable (Chara c)
 
List< ElementListRune ()
 
void CopyTo (ElementContainer container)
 
void AddNote (UINote n, Func< Element, bool > isValid=null, Action onAdd=null, NoteMode mode=NoteMode.Default, bool addRaceFeat=false, Func< Element, string, string > funcText=null, Action< UINote, Element > onAddNote=null)
 
void AddNoteAll (UINote n)
 

Public Attributes

bool isDirty
 
- Public Attributes inherited from ElementContainer
Dictionary< int, Elementdict = new Dictionary<int, Element>()
 
ElementContainer parent
 
List< int > list
 

Additional Inherited Members

- Public Types inherited from ElementContainer
enum  NoteMode {
  Default , CharaMake , CharaMakeAttributes , Domain ,
  Trait
}
 
- Static Public Member Functions inherited from ElementContainer
static int GetSortVal (Element a)
 
- 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)
 
- Static Public Attributes inherited from ElementContainer
const int sizeElement = 5
 
- Static Public Attributes inherited from EClass
static Core core
 
- Properties inherited from ElementContainer
virtual Card Card [get]
 
virtual Chara Chara [get]
 
virtual bool IsMeleeWeapon [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 1 of file ElementContainerFaction.cs.

Member Function Documentation

◆ CheckDirty()

void ElementContainerFaction.CheckDirty ( )
inline

Definition at line 64 of file ElementContainerFaction.cs.

65 {
66 if (!isDirty)
67 {
68 return;
69 }
70 foreach (Chara value in EClass.game.cards.globalCharas.Values)
71 {
72 if (value.IsPCFaction)
73 {
74 value.Refresh();
75 }
76 }
78 {
79 foreach (Chara chara in EClass._map.charas)
80 {
81 if (chara.IsPCFactionMinion)
82 {
83 chara.Refresh();
84 }
85 }
86 }
87 isDirty = false;
88 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
Definition: Chara.cs:10
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1504
override bool IsPCFaction
Definition: Chara.cs:656
override bool IsPCFactionMinion
Definition: Chara.cs:640
bool IsGameStarted
Definition: Core.cs:84
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Core core
Definition: EClass.cs:6
static Map _map
Definition: EClass.cs:18
CardManager cards
Definition: Game.cs:155
List< Chara > charas
Definition: Map.cs:81

References EClass._map, Game.cards, Map.charas, EClass.core, EClass.game, CardManager.globalCharas, isDirty, Core.IsGameStarted, Chara.IsPCFaction, Chara.IsPCFactionMinion, and Chara.Refresh().

Referenced by OnEquip(), and OnUnequip().

◆ IsEffective()

bool ElementContainerFaction.IsEffective ( Thing  t)
inline

Definition at line 5 of file ElementContainerFaction.cs.

6 {
7 if (t.c_idDeity.IsEmpty())
8 {
9 return true;
10 }
11 return t.c_idDeity == EClass.pc.idFaith;
12 }
string c_idDeity
Definition: Card.cs:1481
string idFaith
Definition: Chara.cs:216
static Chara pc
Definition: EClass.cs:14

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

Referenced by OnEquip(), and OnUnequip().

◆ OnAddMemeber()

void ElementContainerFaction.OnAddMemeber ( Chara  c)
inline

Definition at line 112 of file ElementContainerFaction.cs.

113 {
114 foreach (BodySlot slot in c.body.slots)
115 {
116 if (slot.thing != null)
117 {
118 OnEquip(slot.thing);
119 }
120 }
121 }
Thing thing
Definition: BodySlot.cs:8
List< BodySlot > slots
Definition: CharaBody.cs:8
CharaBody body
Definition: Chara.cs:91
void OnEquip(Chara c, Thing t)

References OnEquip(), and BodySlot.thing.

Referenced by FactionBranch.AddMemeber(), OnJoinFaith(), and FactionBranch.SetOwner().

◆ OnEquip() [1/2]

void ElementContainerFaction.OnEquip ( Chara  c,
Thing  t 
)
inline

Definition at line 14 of file ElementContainerFaction.cs.

15 {
16 if (c.IsPCFaction)
17 {
18 OnEquip(t);
19 }
20 }

References Chara.IsPCFaction, and OnEquip().

Referenced by CharaBody.Equip(), OnAddMemeber(), and OnEquip().

◆ OnEquip() [2/2]

void ElementContainerFaction.OnEquip ( Thing  t)
inline

Definition at line 30 of file ElementContainerFaction.cs.

31 {
32 if (!IsEffective(t))
33 {
34 return;
35 }
36 foreach (Element value in t.elements.dict.Values)
37 {
38 if (value.IsGlobalElement)
39 {
40 ModBase(value.id, value.Value).vExp = value.vExp;
41 isDirty = true;
42 }
43 }
44 CheckDirty();
45 }
ElementContainerCard elements
Definition: Card.cs:37
Dictionary< int, Element > dict
Element ModBase(int ele, int v)
int id
Definition: ELEMENT.cs:240
int vExp
Definition: ELEMENT.cs:244
int Value
Definition: ELEMENT.cs:282
bool IsGlobalElement
Definition: ELEMENT.cs:335

References CheckDirty(), Element.id, isDirty, IsEffective(), Element.IsGlobalElement, ElementContainer.ModBase(), Element.Value, and Element.vExp.

◆ OnJoinFaith()

void ElementContainerFaction.OnJoinFaith ( )
inline

Definition at line 101 of file ElementContainerFaction.cs.

102 {
103 foreach (Chara value in EClass.game.cards.globalCharas.Values)
104 {
105 if (value.IsPCFaction)
106 {
107 OnAddMemeber(value);
108 }
109 }
110 }

References Game.cards, EClass.game, CardManager.globalCharas, Chara.IsPCFaction, and OnAddMemeber().

Referenced by Religion.JoinFaith().

◆ OnLeaveFaith()

void ElementContainerFaction.OnLeaveFaith ( )
inline

Definition at line 90 of file ElementContainerFaction.cs.

91 {
92 foreach (Chara value in EClass.game.cards.globalCharas.Values)
93 {
94 if (value.IsPCFaction)
95 {
96 OnRemoveMember(value);
97 }
98 }
99 }

References Game.cards, EClass.game, CardManager.globalCharas, Chara.IsPCFaction, and OnRemoveMember().

Referenced by Religion.LeaveFaith().

◆ OnRemoveMember()

void ElementContainerFaction.OnRemoveMember ( Chara  c)
inline

Definition at line 123 of file ElementContainerFaction.cs.

124 {
125 foreach (BodySlot slot in c.body.slots)
126 {
127 if (slot.thing != null)
128 {
129 OnUnequip(slot.thing);
130 }
131 }
132 }
void OnUnequip(Chara c, Thing t)

References OnUnequip(), and BodySlot.thing.

Referenced by OnLeaveFaith(), and FactionBranch.RemoveMemeber().

◆ OnUnequip() [1/2]

void ElementContainerFaction.OnUnequip ( Chara  c,
Thing  t 
)
inline

Definition at line 22 of file ElementContainerFaction.cs.

23 {
24 if (c.IsPCFaction)
25 {
26 OnUnequip(t);
27 }
28 }

References Chara.IsPCFaction, and OnUnequip().

Referenced by OnRemoveMember(), OnUnequip(), and CharaBody.Unequip().

◆ OnUnequip() [2/2]

void ElementContainerFaction.OnUnequip ( Thing  t)
inline

Definition at line 47 of file ElementContainerFaction.cs.

48 {
49 if (!IsEffective(t))
50 {
51 return;
52 }
53 foreach (Element value in t.elements.dict.Values)
54 {
55 if (value.IsGlobalElement)
56 {
57 ModBase(value.id, -value.Value);
58 isDirty = true;
59 }
60 }
61 CheckDirty();
62 }

References CheckDirty(), Element.id, isDirty, IsEffective(), Element.IsGlobalElement, ElementContainer.ModBase(), and Element.Value.

Member Data Documentation

◆ isDirty

bool ElementContainerFaction.isDirty

Definition at line 3 of file ElementContainerFaction.cs.

Referenced by CheckDirty(), OnEquip(), and OnUnequip().


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