Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
GrowSystemTree Class Reference
Inheritance diagram for GrowSystemTree:
GrowSystem EClass GrowSystemTreeFeywood GrowSystemTreeSingle GrowSystemTreeCoralwood

Public Member Functions

override bool BlockPass (Cell cell)
 
override bool BlockSight (Cell cell)
 
override int GetShadow (int index)
 
override void SetGenericFirstStageTile (Stage s)
 
override void SetStageTile (Stage s)
 
override void OnHitFail (Chara c)
 
override int GetHp ()
 
int GetPlantBonus (PlantData plant)
 
override void OnMineObj (Chara c=null)
 
- Public Member Functions inherited from GrowSystem
bool IsLastStage ()
 
virtual bool BlockSight (Cell cell)
 
virtual bool BlockPass (Cell cell)
 
virtual string GetSoundProgress ()
 
virtual Stage CreateStage ()
 
void Init (SourceObj.Row _row)
 
virtual void SetGenericFirstStageTile (Stage s)
 
virtual void SetStageTile (Stage s)
 
virtual int GetStageTile ()
 
virtual int GetShadow (int index)
 
virtual void OnRenderTileMap (RenderParam p)
 
void SetRandomStage ()
 
void SetDefaultStage ()
 
virtual void OnSetObj ()
 
bool CanGrow (VirtualDate date)
 
void TryGrow (VirtualDate date)
 
void EqualizePlants (Point pos)
 
void Grow (int mtp=1)
 
virtual void OnReachNextStage ()
 
virtual void OnExceedLastStage ()
 
void SetStage (int idx, bool renewHarvest=false)
 
virtual void OnSetStage (int idx)
 
bool HaltGrowth ()
 
void Perish ()
 
bool IsWithered ()
 
bool CanHarvest ()
 
virtual bool CanReapSeed ()
 
virtual void OnHit (Chara c)
 
virtual void OnHitFail (Chara c)
 
void OnProgressComplete (Chara c)
 
void PopMineObj (Chara c=null)
 
virtual void OnMineObj (Chara c=null)
 
void TryPick (Cell cell, Thing t, Chara c, bool applySeed=false)
 
void TryPick (Cell cell, string idThing, int idMat=-1, int num=1, bool applySeed=false)
 
Thing TryPopSeed (Chara c)
 
void Harvest (Chara c)
 
void PopHarvest (Chara c, string idThing, int num=-1)
 
void PopHarvest (Chara c, Thing t=null, int num=-1)
 
void ApplySeed (Thing t)
 
virtual int GetHp ()
 

Static Public Attributes

static int[] shadows = new int[8] { 31, 31, 32, 33, 34, 1, 1, 1 }
 
- Static Public Attributes inherited from GrowSystem
static SourceObj.Row[] sourceSnowTree
 
const int DivStage = 30
 
static Cell cell
 
static Stage currentStage
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

override RenderData RenderHarvest [get]
 
override int Step [get]
 
override int StageLength [get]
 
override float MtpProgress [get]
 
override int HarvestStage [get]
 
override bool DrawHarvestOnTop [get]
 
override bool IsMature [get]
 
override bool IsTree [get]
 
override int ShadowStage [get]
 
bool Bud [get]
 
bool Baby [get]
 
bool Young [get]
 
bool Grown [get]
 
bool Mature [get]
 
bool Withered [get]
 
bool IsPalulu [get]
 
bool IsBamboo [get]
 
override bool UseGenericFirstStageTile [get]
 
- Properties inherited from GrowSystem
virtual RenderData RenderHarvest [get]
 
virtual int Step [get]
 
virtual int StageLength [get]
 
virtual int DefaultStage [get]
 
virtual int HarvestStage [get]
 
virtual int AutoMineStage [get]
 
virtual int HaltStage [get]
 
virtual bool DrawHarvestOnTop [get]
 
virtual bool UseGenericFirstStageTile [get]
 
virtual bool WitherOnLastStage [get]
 
virtual bool CanRegrow [get]
 
virtual bool CanLevelSeed [get]
 
virtual int ShadowStage [get]
 
virtual bool IsTree [get]
 
virtual bool IsCrimeToHarvest [get]
 
virtual float MtpProgress [get]
 
virtual bool NeedSunlight [get]
 
virtual AnimeID AnimeProgress [get]
 
Stage stage [get]
 
virtual bool IsMature [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]
 

Additional Inherited Members

- 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 inherited from GrowSystem
SourceObj.Row source
 
Stage[] stages
 
int[] baseTiles
 
int harvestTile
 
int afterHarvestTile
 
string idHarvestThing
 
- Protected Member Functions inherited from GrowSystem
virtual bool IsHarvestStage (int idx)
 

Detailed Description

Definition at line 3 of file GrowSystemTree.cs.

Member Function Documentation

◆ BlockPass()

override bool GrowSystemTree.BlockPass ( Cell  cell)
inlinevirtual

Reimplemented from GrowSystem.

Reimplemented in GrowSystemTreeCoralwood.

Definition at line 71 of file GrowSystemTree.cs.

72 {
73 return cell.objVal / 30 > 1;
74 }

◆ BlockSight()

override bool GrowSystemTree.BlockSight ( Cell  cell)
inlinevirtual

Reimplemented from GrowSystem.

Reimplemented in GrowSystemTreeCoralwood.

Definition at line 76 of file GrowSystemTree.cs.

77 {
78 return cell.objVal / 30 > 2;
79 }

◆ GetHp()

override int GrowSystemTree.GetHp ( )
inlinevirtual

Reimplemented from GrowSystem.

Definition at line 113 of file GrowSystemTree.cs.

114 {
115 if (base.stage.idx > HarvestStage)
116 {
117 return (int)((float)base.GetHp() * 1.5f);
118 }
119 return (int)((float)base.GetHp() * 0.5f);
120 }
override int HarvestStage

References HarvestStage.

◆ GetPlantBonus()

int GrowSystemTree.GetPlantBonus ( PlantData  plant)
inline

Definition at line 122 of file GrowSystemTree.cs.

123 {
124 if (plant == null || plant.seed == null || EClass._zone.IsUserZone)
125 {
126 return 0;
127 }
128 int num = plant.seed.encLV / 10;
129 if (EClass.rnd(10) > plant.seed.encLV % 10)
130 {
131 num++;
132 }
133 return Mathf.Min(EClass.rnd(num + 1), 4);
134 }
int encLV
Definition: Card.cs:310
Definition: EClass.cs:5
static int rnd(int a)
Definition: EClass.cs:50
static Zone _zone
Definition: EClass.cs:20
Thing seed
Definition: PlantData.cs:6
virtual bool IsUserZone
Definition: Zone.cs:264

References EClass._zone, Card.encLV, Zone.IsUserZone, EClass.rnd(), and PlantData.seed.

Referenced by OnMineObj().

◆ GetShadow()

override int GrowSystemTree.GetShadow ( int  index)
inlinevirtual

Reimplemented from GrowSystem.

Reimplemented in GrowSystemTreeCoralwood, and GrowSystemTreeSingle.

Definition at line 81 of file GrowSystemTree.cs.

82 {
83 if (source.id == 103)
84 {
85 return source.pref.shadow;
86 }
87 return shadows[index];
88 }
static int[] shadows
SourceObj.Row source
Definition: GrowSystem.cs:49

References shadows, and GrowSystem.source.

◆ OnHitFail()

override void GrowSystemTree.OnHitFail ( Chara  c)
inlinevirtual

Reimplemented from GrowSystem.

Definition at line 102 of file GrowSystemTree.cs.

103 {
104 if (c != null && (Young || Grown || Mature || Withered))
105 {
106 Chara chara = CharaGen.Create("putty");
107 EClass._zone.AddCard(chara, GrowSystem.cell.GetPoint().GetNearestPoint(allowBlock: false, allowChara: false));
108 chara.renderer.PlayAnime(AnimeID.Fall, force: true);
109 c.Say("mobFromTree", chara);
110 }
111 }
AnimeID
Definition: AnimeID.cs:2
void PlayAnime(AnimeID id, bool force)
CardRenderer renderer
Definition: Card.cs:57
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:6046
Point GetPoint()
Definition: Cell.cs:1101
static Chara Create(string id, int lv=-1)
Definition: CharaGen.cs:17
Definition: Chara.cs:10
static Cell cell
Definition: GrowSystem.cs:45
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false)
Definition: Point.cs:595
Card AddCard(Card t, Point point)
Definition: Zone.cs:1893

References EClass._zone, Zone.AddCard(), GrowSystem.cell, CharaGen.Create(), Point.GetNearestPoint(), Cell.GetPoint(), Grown, Mature, CardRenderer.PlayAnime(), Card.renderer, Card.Say(), Withered, and Young.

◆ OnMineObj()

override void GrowSystemTree.OnMineObj ( Chara  c = null)
inlinevirtual

Reimplemented from GrowSystem.

Definition at line 136 of file GrowSystemTree.cs.

137 {
138 Point point = GrowSystem.cell.GetPoint();
139 int id = GrowSystem.cell.matObj_fixed.id;
141 if (Bud || Baby)
142 {
143 if (EClass.rnd(2) == 0 || IsPalulu)
144 {
145 TryPick(GrowSystem.cell, IsPalulu ? "leaf_palulu" : "leaf");
146 }
147 if (IsBamboo)
148 {
149 PopHarvest(c, "bamboo_shoot");
150 }
151 TryPick(GrowSystem.cell, "branch", id, 1 + PlantBonus());
152 return;
153 }
154 if (Young)
155 {
156 if (IsBamboo)
157 {
158 PopHarvest(c, "bamboo_shoot");
159 }
160 TryPick(GrowSystem.cell, "branch", id, 2 + PlantBonus());
161 if (IsPalulu)
162 {
163 TryPick(GrowSystem.cell, "leaf_palulu");
164 }
165 TryPick(GrowSystem.cell, "log", id, EClass.rnd(2) + PlantBonus() / 2, applySeed: true);
166 return;
167 }
168 if (Grown || Mature)
169 {
170 TryPick(GrowSystem.cell, IsPalulu ? "leaf_palulu" : "bark", -1, 1 + PlantBonus() / 2);
171 TryPick(GrowSystem.cell, "log", id, 1 + EClass.rnd(3) + PlantBonus(), applySeed: true);
172 TryPick(GrowSystem.cell, "resin", -1, 1 + PlantBonus() / 2);
174 {
175 if (EClass.rnd(500) == 0)
176 {
177 TryPick(GrowSystem.cell, "throw_putit");
178 }
179 if (point.IsFarmField)
180 {
182 }
183 }
184 return;
185 }
186 TryPick(GrowSystem.cell, "bark", -1, EClass.rnd(3) + PlantBonus());
187 TryPick(GrowSystem.cell, "resin", -1, 1 + PlantBonus() / 2);
189 {
191 if (EClass.rnd(100) == 0)
192 {
193 TryPick(GrowSystem.cell, "throw_putit");
194 }
195 }
196 int PlantBonus()
197 {
198 return GetPlantBonus(plant);
199 }
200 }
Thing SetNum(int a)
Definition: Card.cs:3242
SourceObj.Row sourceObj
Definition: Cell.cs:1072
SourceMaterial.Row matObj_fixed
Definition: Cell.cs:1039
static Map _map
Definition: EClass.cs:18
static Player player
Definition: EClass.cs:12
int GetPlantBonus(PlantData plant)
void TryPick(Cell cell, Thing t, Chara c, bool applySeed=false)
Definition: GrowSystem.cs:528
void PopHarvest(Chara c, string idThing, int num=-1)
Definition: GrowSystem.cs:606
PlantData TryGetPlant(Point p)
Definition: Map.cs:1920
bool isAutoFarming
Definition: Player.cs:982
Definition: Point.cs:9
bool IsFarmField
Definition: Point.cs:127
SourceObj.Row sourceObj
Definition: Point.cs:69
static Thing MakeSeed(SourceObj.Row obj, PlantData plant=null)
Definition: TraitSeed.cs:77

References EClass._map, Baby, Bud, GrowSystem.cell, GetPlantBonus(), Cell.GetPoint(), Grown, Player.isAutoFarming, IsBamboo, Point.IsFarmField, IsPalulu, TraitSeed.MakeSeed(), Cell.matObj_fixed, Mature, EClass.player, GrowSystem.PopHarvest(), EClass.rnd(), Card.SetNum(), Cell.sourceObj, Point.sourceObj, Map.TryGetPlant(), GrowSystem.TryPick(), and Young.

◆ SetGenericFirstStageTile()

override void GrowSystemTree.SetGenericFirstStageTile ( Stage  s)
inlinevirtual

Reimplemented from GrowSystem.

Definition at line 90 of file GrowSystemTree.cs.

91 {
92 s.renderData = EClass.core.refs.renderers.objS_flat;
93 s.SetTile(0, 103);
94 }
RenderData objS_flat
Definition: CoreRef.cs:298
Renderers renderers
Definition: CoreRef.cs:341
CoreRef refs
Definition: Core.cs:51
static Core core
Definition: EClass.cs:6

References EClass.core, CoreRef.Renderers.objS_flat, Core.refs, CoreRef.renderers, and GrowSystem.Stage.SetTile().

◆ SetStageTile()

override void GrowSystemTree.SetStageTile ( Stage  s)
inlinevirtual

Reimplemented from GrowSystem.

Reimplemented in GrowSystemTreeSingle.

Definition at line 96 of file GrowSystemTree.cs.

97 {
98 s.renderData = source.renderData;
99 s.SetTile(s.idx + ((s.idx != 0) ? (-1) : 0), baseTiles);
100 }
int[] baseTiles
Definition: GrowSystem.cs:53

References GrowSystem.baseTiles, GrowSystem.Stage.idx, GrowSystem.Stage.SetTile(), and GrowSystem.source.

Member Data Documentation

◆ shadows

int [] GrowSystemTree.shadows = new int[8] { 31, 31, 32, 33, 34, 1, 1, 1 }
static

Definition at line 5 of file GrowSystemTree.cs.

Referenced by GetShadow().

Property Documentation

◆ Baby

bool GrowSystemTree.Baby
get

Definition at line 55 of file GrowSystemTree.cs.

Referenced by OnMineObj().

◆ Bud

bool GrowSystemTree.Bud
get

Definition at line 53 of file GrowSystemTree.cs.

Referenced by OnMineObj().

◆ DrawHarvestOnTop

override bool GrowSystemTree.DrawHarvestOnTop
getprotected

Definition at line 35 of file GrowSystemTree.cs.

◆ Grown

bool GrowSystemTree.Grown
get

Definition at line 59 of file GrowSystemTree.cs.

Referenced by OnHitFail(), and OnMineObj().

◆ HarvestStage

override int GrowSystemTree.HarvestStage
get

Definition at line 33 of file GrowSystemTree.cs.

Referenced by GetHp().

◆ IsBamboo

bool GrowSystemTree.IsBamboo
get

Definition at line 67 of file GrowSystemTree.cs.

Referenced by OnMineObj().

◆ IsMature

override bool GrowSystemTree.IsMature
get

Definition at line 37 of file GrowSystemTree.cs.

38 {
39 get
40 {
41 if (!Grown)
42 {
43 return Mature;
44 }
45 return true;
46 }
47 }

◆ IsPalulu

bool GrowSystemTree.IsPalulu
get

Definition at line 65 of file GrowSystemTree.cs.

Referenced by OnMineObj().

◆ IsTree

override bool GrowSystemTree.IsTree
get

Definition at line 49 of file GrowSystemTree.cs.

◆ Mature

bool GrowSystemTree.Mature
get

Definition at line 61 of file GrowSystemTree.cs.

Referenced by OnHitFail(), and OnMineObj().

◆ MtpProgress

override float GrowSystemTree.MtpProgress
get

Definition at line 13 of file GrowSystemTree.cs.

14 {
15 get
16 {
17 if (!Bud && !Baby)
18 {
19 if (!Grown)
20 {
21 if (!Mature)
22 {
23 return 1f;
24 }
25 return 3f;
26 }
27 return 2f;
28 }
29 return 0.5f;
30 }
31 }

◆ RenderHarvest

override RenderData GrowSystemTree.RenderHarvest
get

Definition at line 7 of file GrowSystemTree.cs.

◆ ShadowStage

override int GrowSystemTree.ShadowStage
get

Definition at line 51 of file GrowSystemTree.cs.

◆ StageLength

override int GrowSystemTree.StageLength
get

Definition at line 11 of file GrowSystemTree.cs.

◆ Step

override int GrowSystemTree.Step
get

Definition at line 9 of file GrowSystemTree.cs.

◆ UseGenericFirstStageTile

override bool GrowSystemTree.UseGenericFirstStageTile
getprotected

Definition at line 69 of file GrowSystemTree.cs.

◆ Withered

bool GrowSystemTree.Withered
get

Definition at line 63 of file GrowSystemTree.cs.

Referenced by OnHitFail().

◆ Young

bool GrowSystemTree.Young
get

Definition at line 57 of file GrowSystemTree.cs.

Referenced by OnHitFail(), and OnMineObj().


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