8,756
edits
m (→Restocking) |
m (→Restocking) |
||
Line 6: | Line 6: | ||
When the merchant is first created, LastRestock tick is set to | When the merchant is first created, LastRestock tick is set to | ||
<math>\text{LastRestockTick} = \text{TickOnCreation} + \text{ | <math>\text{LastRestockTick} = \text{TickOnCreation} + \text{Random}( \frac{RestockFrequency}{2}, RestockFrequency)</math> | ||
which substitutes to | which substitutes to | ||
Line 12: | Line 12: | ||
<math>\text{LastRestockTick} = \text{TickOnCreation} + \text{Random}(3000, 6000)</math> | <math>\text{LastRestockTick} = \text{TickOnCreation} + \text{Random}(3000, 6000)</math> | ||
If the current in game turn count-LastRestockTick is greater than RestockFrequency, LastRestockTick is set to equal the current GameTick. | Every EndTurn, this is called: | ||
If the current in game turn count-LastRestockTick is greater than RestockFrequency, LastRestockTick is set to equal the current GameTick. | |||
<math>\text{num1} = \text{InGameTurn} - \text{LastRestockTick} \ge 6000</math> <math>\rightarrow</math> | <math>\text{num1} = \text{InGameTurn} - \text{LastRestockTick} \ge 6000</math> <math>\rightarrow</math> |