Elin Decompiled Documentation EA 23.189 Nightly
Loading...
Searching...
No Matches
Party Class Reference
Inheritance diagram for Party:
EClass

Public Member Functions

List< CharaSetMembers ()
 
void AddMemeber (Chara c, bool showMsg=false)
 
Chara Find (string id)
 
void RemoveMember (Chara c)
 
void Replace (Chara c, int index)
 
void SetLeader (Chara c)
 
Element GetPartySkill (int ele)
 
void ModExpPartySkill (int ele, int a)
 
Element GetBestSkill (int ele)
 
bool IsCriticallyWounded (bool includePc=false)
 
int EValue (int ele)
 
bool HasElement (int ele)
 
int Count ()
 

Public Attributes

int uidLeader
 
List< int > uidMembers = new List<int>()
 
List< Chara_members
 
RefChara refLeader = new RefChara()
 

Properties

List< Charamembers [get]
 
Chara leader [get, set]
 
- 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 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)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 5 of file Party.cs.

Member Function Documentation

◆ AddMemeber()

void Party.AddMemeber ( Chara  c,
bool  showMsg = false 
)
inline

Definition at line 56 of file Party.cs.

57 {
58 if (c.party == this)
59 {
60 return;
61 }
62 if (!c.IsGlobal)
63 {
64 Debug.LogError("exception: " + c?.ToString() + " is not global chara");
65 }
66 members.Add(c);
67 uidMembers.Add(c.uid);
68 c.party = this;
69 c.isSale = false;
70 c.SetBool(18, enable: false);
71 if (c.homeBranch != null)
72 {
76 if (c.homeBranch.owner.map != null)
77 {
78 c.homeBranch.owner.map.props.sales.Remove(c);
79 }
80 }
81 if (showMsg)
82 {
83 Msg.Say("party_join", c.Name);
84 SE.Play("party_join");
85 }
87 }
void SetBool(int id, bool enable)
Definition: BaseCard.cs:20
string Name
Definition: Card.cs:2099
int uid
Definition: Card.cs:120
void RefreshWorkElements(ElementContainer parent=null)
Definition: Chara.cs:8583
override bool IsGlobal
Definition: Chara.cs:608
Party party
Definition: Chara.cs:43
FactionBranch homeBranch
Definition: Chara.cs:1052
void RefreshEfficiency()
PolicyManager policies
ElementContainerZone elements
PropsManager props
Definition: Map.cs:91
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< int > uidMembers
Definition: Party.cs:11
List< Chara > members
Definition: Party.cs:18
List< Card > sales
Definition: PropsManager.cs:14
static void SetDirty()
Map map
Definition: Zone.cs:60

References Debug, FactionBranch.elements, Chara.homeBranch, Chara.IsGlobal, Zone.map, members, Card.Name, FactionBranch.owner, Chara.party, FactionBranch.policies, Map.props, FactionBranch.RefreshEfficiency(), Chara.RefreshWorkElements(), PropsManager.sales, Msg.Say(), BaseCard.SetBool(), WidgetRoster.SetDirty(), Card.uid, uidMembers, and PolicyManager.Validate().

Referenced by PartyManager.Create(), FactionBranch.DailyOutcome(), Chara.GetRevived(), TraitFoodEggFertilized.Incubate(), Chara.MakeAlly(), Chara.MakePartyMemeber(), FactionBranch.OnAfterSimulate(), QuestDebt.OnStart(), CoreDebug.QuickStart(), and ActRide.Ride().

◆ Count()

int Party.Count ( )
inline

Definition at line 192 of file Party.cs.

193 {
194 int num = 0;
195 foreach (Chara member in members)
196 {
197 if (!member.isDead)
198 {
199 num++;
200 }
201 }
202 return num;
203 }
Definition: Chara.cs:10
bool isDead
Definition: Chara.cs:387

References Chara.isDead, and members.

◆ EValue()

int Party.EValue ( int  ele)
inline

Definition at line 167 of file Party.cs.

168 {
169 int num = 0;
170 foreach (Chara member in members)
171 {
172 if (member.Evalue(ele) > num)
173 {
174 num = member.Evalue(ele);
175 }
176 }
177 return num;
178 }
int Evalue(int ele)
Definition: Card.cs:2533

References Card.Evalue(), and members.

◆ Find()

Chara Party.Find ( string  id)
inline

Definition at line 89 of file Party.cs.

90 {
91 foreach (Chara member in members)
92 {
93 if (member.id == id)
94 {
95 return member;
96 }
97 }
98 return null;
99 }
string id
Definition: Card.cs:33

References Card.id, and members.

Referenced by Zone_DungeonFairy.OnGenerateMap(), and TraitStairsLocked.OnUse().

◆ GetBestSkill()

Element Party.GetBestSkill ( int  ele)
inline

Definition at line 142 of file Party.cs.

143 {
144 Element element = Element.Create(ele);
145 foreach (Chara member in members)
146 {
147 if (member.IsAliveInCurrentZone && member.Evalue(ele) > element.Value)
148 {
149 element = member.elements.GetElement(ele);
150 }
151 }
152 return element;
153 }
ElementContainerCard elements
Definition: Card.cs:39
override bool IsAliveInCurrentZone
Definition: Chara.cs:559
Element GetElement(string alias)
int Value
Definition: ELEMENT.cs:290
static Element Create(int id, int v=0)
Definition: ELEMENT.cs:1097

References Element.Create(), Card.elements, Card.Evalue(), ElementContainer.GetElement(), Chara.IsAliveInCurrentZone, and members.

Referenced by GetPartySkill().

◆ GetPartySkill()

Element Party.GetPartySkill ( int  ele)
inline

Definition at line 133 of file Party.cs.

134 {
135 return GetBestSkill(ele);
136 }
Element GetBestSkill(int ele)
Definition: Party.cs:142

References GetBestSkill().

◆ HasElement()

bool Party.HasElement ( int  ele)
inline

Definition at line 180 of file Party.cs.

181 {
182 foreach (Chara member in members)
183 {
184 if (member.HasElement(ele))
185 {
186 return true;
187 }
188 }
189 return false;
190 }
bool HasElement(int ele, int req=1)
Definition: Card.cs:5638

References Card.HasElement(), and members.

Referenced by Chara.Die(), and AI_Idle.Run().

◆ IsCriticallyWounded()

bool Party.IsCriticallyWounded ( bool  includePc = false)
inline

Definition at line 155 of file Party.cs.

156 {
157 foreach (Chara member in members)
158 {
159 if ((!includePc || !member.IsPC) && member.IsCriticallyWounded())
160 {
161 return true;
162 }
163 }
164 return false;
165 }
bool IsCriticallyWounded(bool includeRide=false)
Definition: Chara.cs:1159
override bool IsPC
Definition: Chara.cs:610

References Chara.IsCriticallyWounded(), Chara.IsPC, and members.

Referenced by AM_Adv._OnUpdateInput(), and GoalAutoCombat.GetActPlanColor().

◆ ModExpPartySkill()

void Party.ModExpPartySkill ( int  ele,
int  a 
)
inline

Definition at line 138 of file Party.cs.

139 {
140 }

◆ RemoveMember()

void Party.RemoveMember ( Chara  c)
inline

Definition at line 101 of file Party.cs.

102 {
103 if (c.host != null)
104 {
105 ActRide.Unride(c.host, c.host.parasite == c);
106 }
107 members.Remove(c);
108 uidMembers.Remove(c.uid);
109 c.party = null;
110 c.c_wasInPcParty = false;
111 c.SetDirtySpeed();
112 if (c.homeBranch != null)
113 {
116 }
118 }
static void Unride(Chara host, Chara mount, bool talk=true)
Definition: ActRide.cs:102
void SetDirtySpeed()
Definition: Chara.cs:1806
Chara host
Definition: Chara.cs:33
Chara parasite
Definition: Chara.cs:30

References FactionBranch.elements, Chara.homeBranch, Chara.host, members, Chara.parasite, FactionBranch.RefreshEfficiency(), Chara.RefreshWorkElements(), WidgetRoster.SetDirty(), Chara.SetDirtySpeed(), Card.uid, uidMembers, and ActRide.Unride().

Referenced by Faction.AddReserve(), Card.Destroy(), Chara.Die(), Chara.MoveHome(), TraitHitchingPost.OnActivateTrap(), TraitGeneMachine.OnUse(), AI_Slaughter.Run(), and CoreDebug.UpdateInput().

◆ Replace()

void Party.Replace ( Chara  c,
int  index 
)
inline

Definition at line 120 of file Party.cs.

121 {
122 members.Remove(c);
123 uidMembers.Remove(c.uid);
124 members.Insert(index, c);
125 uidMembers.Insert(index, c.uid);
126 }

References members, Card.uid, and uidMembers.

Referenced by WidgetRoster.OnSetContextMenu().

◆ SetLeader()

void Party.SetLeader ( Chara  c)
inline

Definition at line 128 of file Party.cs.

129 {
130 leader = c;
131 }
Chara leader
Definition: Party.cs:30

References leader.

Referenced by PartyManager.Create().

◆ SetMembers()

List< Chara > Party.SetMembers ( )
inline

Definition at line 41 of file Party.cs.

42 {
43 _members = new List<Chara>();
44 HashSet<int> hashSet = new HashSet<int>();
45 foreach (int uidMember in uidMembers)
46 {
47 if (!hashSet.Contains(uidMember))
48 {
49 hashSet.Add(uidMember);
50 members.Add(RefChara.Get(uidMember));
51 }
52 }
53 return _members;
54 }
List< Chara > _members
Definition: Party.cs:13
static Chara Get(int uid)
Definition: RefChara.cs:36

References _members, RefChara.Get(), members, and uidMembers.

Member Data Documentation

◆ _members

List<Chara> Party._members

Definition at line 13 of file Party.cs.

Referenced by SetMembers().

◆ refLeader

RefChara Party.refLeader = new RefChara()

Definition at line 15 of file Party.cs.

◆ uidLeader

int Party.uidLeader

Definition at line 8 of file Party.cs.

◆ uidMembers

List<int> Party.uidMembers = new List<int>()

Definition at line 11 of file Party.cs.

Referenced by AddMemeber(), RemoveMember(), Replace(), and SetMembers().

Property Documentation

◆ leader

Chara Party.leader
getset

Definition at line 29 of file Party.cs.

30 {
31 get
32 {
34 }
35 set
36 {
37 refLeader.Set(ref uidLeader, value);
38 }
39 }
int uidLeader
Definition: Party.cs:8
RefChara refLeader
Definition: Party.cs:15
Chara GetAndCache(int uid)
Definition: RefChara.cs:5
void Set(ref int val, Chara c)
Definition: RefChara.cs:30

Referenced by TileMapElona.DrawTile(), Chara.MoveZone(), AI_Idle.Run(), and SetLeader().

◆ members


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