diff --git a/src/uncategorized/saDrugs.tw b/src/uncategorized/saDrugs.tw index 5bedf8dfaa7e35ee4750bd9da854c32d47a1931e..79a82c7ea6cc29e69ec0e0591d239089c83f1595 100644 --- a/src/uncategorized/saDrugs.tw +++ b/src/uncategorized/saDrugs.tw @@ -457,9 +457,16 @@ <</if>> <</if>> /*evaluate against slave expected height ...*/ - <<set _heightDiff = 1 - ($slaves[$i].height / Height.forAge($slaves[$i].height, $slaves[$i]))>> + <<set _heightDiff = $slaves[$i].height / Height.forAge($slaves[$i].height, $slaves[$i])>> + /*if she is taller than the expected height the growth is reduced, if shorter accelerated, + proportionally to the distance from the expected height*/ + <<if _heightDiff >= 1>> + <<set _heightDiff = 1 - _heightDiff>> + <<else>> + <<set _heightDiff-->> + <</if>> /*... and calculates final value*/ - <<set _growth = (_growth + _growth * _heightDiff) * _ageMod>> /*if she is taller than the expected height the growth is reduced, if shorter accelerated*/ + <<set _growth = (_growth + _growth * _heightDiff) * _ageMod>> <<set _growth = Math.round(Math.clamp(_growth,0,5))>> /*communicates the amount of growth*/ <<if _growth < 1>> /*in case _heightDiff manages to bring _growth down enough*/