Jump to content

Colony: Difference between revisions

29 bytes removed ,  8 years ago
Line 48: Line 48:
* workers += if (worker+warrior < capacity) r_breed * r_worker * const
* workers += if (worker+warrior < capacity) r_breed * r_worker * const
* warriors += if (worker+warrior < capacity) r_breed * r_warrior * const
* warriors += if (worker+warrior < capacity) r_breed * r_warrior * const
* food += max(0, min(capacity, (r_food * ar_worker - level) * (workers+warriors) * const)), Gathering and eating, if r_food*ar_worker kept at level or above the food increase, else it decreases. Level could be 0.5, 0.4, or something... Maybe let food can be negative, to affect how many dies in steps below?
* food += min(capacity, (r_food * ar_worker - level) * (workers+warriors) * const), Gathering and eating, if r_food*ar_worker kept at level or above the food increase, else it decreases. Testing with level = 0.4. NOTE: Food can be negative, to affect how many dies in steps below.


Transform workers to warriors and vice versa
Transform workers to warriors and vice versa
Line 55: Line 55:


Starving:
Starving:
* if (food == 0) workers -= ?, warriors -= ?, or maybe x = x * 0.99 - const ?
* if (food < 0) workers += food*ar_workers, warriors += food*(1-ar_workers)
* if (workers + warriors < 2) colony is dead
* if (workers + warriors < 2) colony is dead