1,297
edits
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 += | * 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 | * 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 | ||