X-Git-Url: http://git.localhorst.tv/?p=blobs.git;a=blobdiff_plain;f=src%2Fcreature%2Fcreature.cpp;fp=src%2Fcreature%2Fcreature.cpp;h=cb0f501eaece3e45d5500e3961acdc9486478362;hp=f0f7aac985f30ff3fe36467bb5bc60c8b3ed43a3;hb=7159e493b63552ec7de1fceec4abcb7e0e099ec0;hpb=e6a15aa6012cf8f034f3073c3d042f9a714da011 diff --git a/src/creature/creature.cpp b/src/creature/creature.cpp index f0f7aac..cb0f501 100644 --- a/src/creature/creature.cpp +++ b/src/creature/creature.cpp @@ -182,8 +182,8 @@ void Creature::Ingest(int res, double amount) noexcept { // 30% of solids stays in body AddMass(res, amount * 0.3 * composition.Compatibility(res)); } else { - // 5% of fluids stays in body - AddMass(res, amount * 0.05 * composition.Compatibility(res)); + // 10% of fluids stays in body + AddMass(res, amount * 0.1 * composition.Compatibility(res)); } math::GaloisLFSR &random = sim.Assets().random; if (random.UNorm() < AdaptChance()) { @@ -782,7 +782,7 @@ void Spawn(Creature &c, world::Planet &p) { double color_divisor = 0.0; if (p.HasAtmosphere()) { - c.AddMass(p.Atmosphere(), 0.01); + c.AddMass(p.Atmosphere(), 0.005); color_avg += c.GetSimulation().Resources()[p.Atmosphere()].base_color * 0.1; color_divisor += 0.1; } @@ -857,7 +857,10 @@ void Split(Creature &c) { a->Name(c.GetSimulation().Assets().name.Sequential()); c.GetGenome().Configure(*a); for (const auto &cmp : c.GetComposition()) { - a->AddMass(cmp.resource, cmp.value * 0.5); + // require at least 0.1% + if (cmp.value > 0.002) { + a->AddMass(cmp.resource, cmp.value * 0.5); + } } s.GetPlanet().AddCreature(a); // TODO: duplicate situation somehow @@ -872,7 +875,10 @@ void Split(Creature &c) { b->Name(c.GetSimulation().Assets().name.Sequential()); c.GetGenome().Configure(*b); for (const auto &cmp : c.GetComposition()) { - b->AddMass(cmp.resource, cmp.value * 0.5); + // require at least 0.1% + if (cmp.value > 0.002) { + b->AddMass(cmp.resource, cmp.value * 0.5); + } } s.GetPlanet().AddCreature(b); b->GetSituation().SetPlanetSurface(