- double fert = GetCreature().Fertility();
- double rand = Assets().random.UNorm();
- if (fert > rand) {
- std::cout << "[" << int(GetCreature().GetSimulation().Time())
- << "s] " << GetCreature().Name() << " split" << std::endl;
- Split(GetCreature());
+ // check if eligible to split
+ if (GetCreature().Mass() > GetCreature().GetProperties().Birth().mass * 1.8) {
+ double fert = GetCreature().Fertility();
+ double rand = Assets().random.UNorm();
+ if (fert > rand) {
+ std::cout << "[" << int(GetCreature().GetSimulation().Time())
+ << "s] " << GetCreature().Name() << " split" << std::endl;
+ Split(GetCreature());
+ }