Merchants: Difference between revisions

Jump to navigation Jump to search
31 bytes added ,  17:35, 24 July 2019
m
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{RandomInt}(\frac{RestockFrequency}{2}, RestockFrequency)</math>
<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>

Navigation menu