diff --git a/changelog.txt b/changelog.txt index d8eb0bd..be5fdaa 100644 --- a/changelog.txt +++ b/changelog.txt @@ -11,6 +11,7 @@ Date: 23. 11. 2021 - Optimized regional base upgrades so that the work is spread over many ticks reducing lag spikes - Optimized adding new chunks to the Rampant in-memory state map Tweaks: + - New enemy regional bases that have two factions now do 75% on one faction and 25% on the faction for building and upgrading enemy structures - Doubled the processing rate of regional faction bases with new enemies - Added a small chance (0.5%) that Hives can spawn outside resource patches (Thank you Dimm2101) - Increased suicide and nuclear biters attack range from 0.5 to 1 diff --git a/libs/BaseUtils.lua b/libs/BaseUtils.lua index 495042c..fbb4251 100644 --- a/libs/BaseUtils.lua +++ b/libs/BaseUtils.lua @@ -269,7 +269,17 @@ function baseUtils.upgradeEntity(entity, baseAlignment, map, disPos, evolve, reg local distance = mMin(1, euclideanDistancePoints(position.x, position.y, 0, 0) * BASE_DISTANCE_TO_EVO_INDEX) local evoIndex = mMax(distance, map.evolutionLevel) - local spawnerName = findEntityUpgrade(baseAlignment[mRandom(#baseAlignment)], + local pickedBaseAlignment + if (#baseAlignment == 2) then + if mRandom() < 0.75 then + pickedBaseAlignment = baseAlignment[2] + else + pickedBaseAlignment = baseAlignment[1] + end + else + pickedBaseAlignment = baseAlignment[1] + end + local spawnerName = findEntityUpgrade(pickedBaseAlignment, currentEvo, evoIndex, entity,