14 return EClass.core.refs.renderers.objL_harvest;
20 public override int Step
30 public override int StageLength
39 public override bool BlockPass(
Cell cell)
41 return cell.objVal / 30 > 1;
45 public override bool BlockSight(
Cell cell)
47 return cell.objVal / 30 > 2;
52 public override float MtpProgress
56 if (this.Bud || this.Baby)
74 public override int HarvestStage
84 protected override bool DrawHarvestOnTop
94 public override bool IsMature
98 return this.Grown || this.Mature;
104 public override bool IsTree
114 public override int ShadowStage
128 return base.stage.idx == 0;
138 return base.stage.idx == 1;
148 return base.stage.idx == 2;
158 return base.stage.idx == 3;
168 return base.stage.idx == 4;
178 return base.stage.idx == 5;
188 return this.source.id == 17;
198 return this.source.id == 103;
204 protected override bool UseGenericFirstStageTile
213 public override int GetShadow(
int index)
215 if (this.source.id == 103)
217 return this.source.pref.shadow;
225 s.renderData =
EClass.core.refs.renderers.objS_flat;
226 s.SetTile(0,
new int[]
235 s.renderData = this.source.renderData;
236 s.SetTile(s.idx + ((s.idx != 0) ? -1 : 0),
this.baseTiles);
240 public override void OnHitFail(
Chara c)
246 if (this.Young || this.Grown || this.Mature || this.Withered)
249 EClass._zone.AddCard(chara,
GrowSystem.cell.GetPoint().GetNearestPoint(
false,
false,
true,
false));
250 chara.renderer.PlayAnime(AnimeID.Fall,
true);
251 c.Say(
"mobFromTree", chara,
null,
null);
256 public override int GetHp()
258 if (base.stage.idx >
this.HarvestStage)
260 return (
int)((float)base.GetHp() * 1.5f);
262 return (
int)((float)base.GetHp() * 0.5f);
266 public int GetPlantBonus(
PlantData plant)
268 if (plant ==
null || plant.seed ==
null)
272 int num = plant.seed.encLV / 10;
273 if (
EClass.rnd(10) > plant.seed.encLV % 10)
277 return Mathf.Min(
EClass.rnd(num + 1), 4);
281 public override void OnMineObj(
Chara c =
null)
284 CS$<>8__locals1.<>4__this =
this;
288 if (this.Bud || this.Baby)
290 if (
EClass.rnd(2) == 0 ||
this.IsPalulu)
292 base.TryPick(
GrowSystem.cell,
this.IsPalulu ?
"leaf_palulu" :
"leaf", -1, 1,
false);
296 base.PopHarvest(c,
"bamboo_shoot", -1);
298 base.TryPick(
GrowSystem.cell,
"branch",
id, 1 +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1),
false);
305 base.PopHarvest(c,
"bamboo_shoot", -1);
307 base.TryPick(
GrowSystem.cell,
"branch",
id, 2 +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1),
false);
310 base.TryPick(
GrowSystem.cell,
"leaf_palulu", -1, 1,
false);
312 base.TryPick(
GrowSystem.cell,
"log",
id,
EClass.rnd(2) +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1) / 2,
true);
315 if (this.Grown || this.Mature)
317 base.TryPick(
GrowSystem.cell,
this.IsPalulu ?
"leaf_palulu" :
"bark", -1, 1 +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1) / 2,
false);
318 base.TryPick(
GrowSystem.cell,
"log",
id, 1 +
EClass.rnd(3) +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1),
true);
319 base.TryPick(
GrowSystem.cell,
"resin", -1, 1 +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1) / 2,
false);
320 if (!
EClass.player.isAutoFarming)
324 base.TryPick(
GrowSystem.cell,
"throw_putit", -1, 1,
false);
326 if (point.IsFarmField)
328 base.TryPick(
GrowSystem.cell,
TraitSeed.MakeSeed(point.sourceObj, CS$<>8__locals1.plant), c,
false);
335 base.TryPick(
GrowSystem.cell,
"bark", -1,
EClass.rnd(3) +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1),
false);
336 base.TryPick(
GrowSystem.cell,
"resin", -1, 1 +
this.<OnMineObj>g__PlantBonus|45_0(ref CS$<>8__locals1) / 2,
false);
337 if (!
EClass.player.isAutoFarming)
342 base.TryPick(
GrowSystem.cell,
"throw_putit", -1, 1,
false);
350 private int <OnMineObj>g__PlantBonus|45_0(ref
GrowSystemTree.<>c__DisplayClass45_0 A_1)
352 return this.GetPlantBonus(A_1.plant);
356 public static int[] shadows =
new int[]