1
0
mirror of https://github.com/veden/Rampant.git synced 2025-01-28 03:29:34 +02:00

FACTO-11: 1 in 500 spawners now become hives outside resource chunks

This commit is contained in:
Aaron Veden 2022-01-16 16:51:43 -08:00
parent 46d2d0ce51
commit fe5fda3c33
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 19 additions and 5 deletions

View File

@ -8,7 +8,7 @@ Date: 29. 12. 2021
- Set maximum value on enemy seed to 4294967295
- Slightly increased spacing between enemy structures
- License has changed to GPLv3
- Removed chance of hive outside resoure chunks on settler structure creation
- Greatly reduced chance of hive outside resoure chunks on initial structure creation (1 in about 500 spawners will be hives)
- Separated mod setting into printing settlers building and ai spending points
- Reduced visual size of spawners and hives
- Increased visual size of worms

View File

@ -237,7 +237,8 @@ local function findEntityUpgrade(baseAlignment, currentEvo, evoIndex, originalEn
if evolve then
local chunk = getChunkByPosition(map, originalEntity.position)
local entityType = map.universe.buildingHiveTypeLookup[originalEntity.name]
local entityName = originalEntity.name
local entityType = map.universe.buildingHiveTypeLookup[entityName]
if not entityType then
if map.random() < 0.5 then
entityType = "biter-spawner"
@ -245,10 +246,23 @@ local function findEntityUpgrade(baseAlignment, currentEvo, evoIndex, originalEn
entityType = "spitter-spawner"
end
end
local roll = map.random()
local makeHive = (chunk ~= -1) and
(getResourceGenerator(map, chunk) > 0) and
((entityType == "biter-spawner") or (entityType == "spitter-spawner"))
and (map.random() < 0.2)
(
(entityType == "biter-spawner") or (entityType == "spitter-spawner")
)
and
(
(
(roll <= 0.002) and
not map.universe.proxyEntityLookup[entityName]
)
or
(
(roll <= 0.202) and
(getResourceGenerator(map, chunk) > 0)
)
)
return initialEntityUpgrade(baseAlignment, tier, maxTier, map, (makeHive and "hive"), entityType)
else
return entityUpgrade(baseAlignment, tier, maxTier, originalEntity, map)