diff --git a/packages/farm/src/traits/plant.js b/packages/farm/src/traits/plant.js index ae021ee..b3c01df 100644 --- a/packages/farm/src/traits/plant.js +++ b/packages/farm/src/traits/plant.js @@ -10,8 +10,6 @@ const decorate = compose( export default (latus) => class Plant extends decorate(Trait) { - static STIM_P = 10 / (latus.get('%humus.tps', 60) * 60); - constructor() { super(); this.growthElapsed = 0; @@ -114,15 +112,15 @@ export default (latus) => class Plant extends decorate(Trait) { : []; } - tick() { + tick(elapsed) { if ('client' === process.env.SIDE) { return; } if (this.growthCondition(this.growthConditionContext)) { const {growthStage} = this.entity; const stageSpec = this.params.stageSpecs[growthStage]; - if (Math.random() < this.constructor.STIM_P) { - this.growthElapsed += 0.1; + if (Math.random() < (4 / (60 / elapsed))) { + this.growthElapsed += 0.25; } if ('growAt' in stageSpec) { if (this.growthElapsed >= stageSpec.growAt) {