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

Public Member Functions

Trait GetRandom ()
 
Trait GetRandom (Chara accessChara)
 
Trait GetRandom (Func< Card, bool > func)
 

Detailed Description

Definition at line 5 of file TraitSet.cs.

Member Function Documentation

◆ GetRandom() [1/3]

Trait TraitSet.GetRandom ( )
inline

Definition at line 7 of file TraitSet.cs.

8 {
9 return this.RandomItem()?.trait;
10 }

Referenced by AIAct.DoGoto< T >(), and GetRandom().

◆ GetRandom() [2/3]

Trait TraitSet.GetRandom ( Chara  accessChara)
inline

Definition at line 12 of file TraitSet.cs.

13 {
14 return GetRandom((Card t) => accessChara == null || accessChara.HasAccess(t));
15 }
Definition: Card.cs:11
bool HasAccess(Card c)
Definition: Chara.cs:1089
Trait GetRandom()
Definition: TraitSet.cs:7

References GetRandom(), and Chara.HasAccess().

◆ GetRandom() [3/3]

Trait TraitSet.GetRandom ( Func< Card, bool >  func)
inline

Definition at line 17 of file TraitSet.cs.

18 {
19 if (func == null)
20 {
21 return GetRandom();
22 }
23 return this.Where(func).RandomItem()?.trait;
24 }

References GetRandom().


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