1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-26 20:54:12 +02:00

FACTO-293: Decreased chance of settler squads on movement violations

This commit is contained in:
Aaron Veden 2023-04-06 22:19:04 -07:00
parent ee2c1bbadc
commit 0528078621
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 5 additions and 2 deletions

View File

@ -10,6 +10,7 @@ Version: 3.3.0
- Halved movement penalty violations before building, kamikaze, or dispanding unit groups
- Squads can retreat 3 times before switching to kamikaze
- Kamikaze squads will not retreat
- Reduced chance of squad becoming settler at 5% when hitting movement penalty violations
Bugfixes:
- Fixed occasionally compression number wouldn't appear on unit group
- Fixed squad compression could take place when attacking

View File

@ -268,8 +268,10 @@ local function addMovementPenalty(squad, chunk)
if (penalty.c.id == chunk.id) then
penalty.v = penalty.v + 1
if penalty.v >= 7 then
if Universe.enabledMigration and
(Universe.builderCount < Universe.AI_MAX_BUILDER_COUNT) then
if Universe.enabledMigration
and (Universe.random() < 0.05)
and (Universe.builderCount < Universe.AI_MAX_BUILDER_COUNT)
then
squad.settler = true
squad.originPosition.x = squad.group.position.x
squad.originPosition.y = squad.group.position.y