Elin Decompiled Documentation EA 23.282 Stable Patch 3
Loading...
Searching...
No Matches
CharaGenes Class Reference
Inheritance diagram for CharaGenes:
EClass

Public Member Functions

int GetTotalCost ()
 
int GetGeneSlot (Chara c)
 
DNA GetDNA (int idEle)
 

Static Public Member Functions

static void Remove (Chara c, DNA item)
 
- 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 (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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

List< DNAitems = new List<DNA>()
 
int inferior
 

Additional Inherited Members

- Static Public Attributes inherited from EClass
static Core core
 
- 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 4 of file CharaGenes.cs.

Member Function Documentation

◆ GetDNA()

DNA CharaGenes.GetDNA ( int  idEle)
inline

Definition at line 50 of file CharaGenes.cs.

51 {
52 foreach (DNA item in items)
53 {
54 for (int i = 0; i < item.vals.Count; i += 2)
55 {
56 if (item.vals[i] == idEle)
57 {
58 return item;
59 }
60 }
61 }
62 return null;
63 }
List< DNA > items
Definition: CharaGenes.cs:7
Definition: DNA.cs:8

References item, and items.

◆ GetGeneSlot()

int CharaGenes.GetGeneSlot ( Chara  c)
inline

Definition at line 35 of file CharaGenes.cs.

36 {
37 int num = 0;
38 foreach (DNA item in items)
39 {
40 int num2 = item.slot;
41 if (num2 > 1 && c.HasElement(1237))
42 {
43 num2--;
44 }
45 num += num2;
46 }
47 return num;
48 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6090

References item, and items.

◆ GetTotalCost()

int CharaGenes.GetTotalCost ( )
inline

Definition at line 25 of file CharaGenes.cs.

26 {
27 int num = 0;
28 foreach (DNA item in items)
29 {
30 num += item.cost;
31 }
32 return num;
33 }

References item, and items.

Referenced by WindowCharaMini.Refresh().

◆ Remove()

static void CharaGenes.Remove ( Chara  c,
DNA  item 
)
inlinestatic

Definition at line 12 of file CharaGenes.cs.

13 {
14 if (c.c_genes != null)
15 {
16 c.c_genes.items.Remove(item);
17 c.feat += item.cost * c.GeneCostMTP / 100;
18 item.Apply(c, reverse: true);
19 c.Refresh();
21 Msg.Say("dna_loss", c, item.GetText());
22 }
23 }
CharaGenes c_genes
Definition: Card.cs:1871
void Refresh(bool calledRecursive=false)
Definition: Chara.cs:1759
void RemoveAllStances()
Definition: Chara.cs:9797
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58

References Card.c_genes, item, items, Chara.Refresh(), Chara.RemoveAllStances(), and Msg.Say().

Referenced by FoodEffect.Proc().

Member Data Documentation

◆ inferior

int CharaGenes.inferior

Definition at line 10 of file CharaGenes.cs.

Referenced by DNA.Apply(), and WindowCharaMini.Refresh().

◆ items


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