mirror of
https://github.com/veden/Rampant.git
synced 2025-01-28 03:29:34 +02:00
adjusting siege groups to raid groups during ai siege state
This commit is contained in:
parent
0cdacdfba4
commit
ffa52e6c74
@ -543,6 +543,8 @@ function upgrade.prepMap(universe, surface)
|
||||
|
||||
map.activatedMap = false
|
||||
|
||||
map.sentSiegeGroups = 0
|
||||
map.maxSiegeGroups = 2
|
||||
map.maxAggressiveGroups = 1
|
||||
map.sentAggressiveGroups = 0
|
||||
map.processedChunks = 0
|
||||
|
@ -32,7 +32,7 @@ Date: 23. 11. 2021
|
||||
- Surfaces are allocated but don't begin processing until the first enemy structure or unit group is found
|
||||
- Map cleanup is now processed regardless of current active map
|
||||
- Chunk pass scanning is now processed regardless of current active map
|
||||
- Siege AI state now sends roughly 1 raid group every 3 settler groups if raiding is enabled
|
||||
- Siege AI state now sends roughly 1 raid group every 2 settler groups if raiding is enabled
|
||||
- Siege groups now try to settle just outside player structures as opposed to attacking
|
||||
- Added Raid AI state to lower temperament scores @ 20% at 0 temperament and 15% at (0.2, 0.4)
|
||||
Tweaks:
|
||||
|
@ -237,6 +237,10 @@ function aiAttackWave.formSettlers(map, chunk)
|
||||
universe.formCommand.unit_count = scaledWaveSize
|
||||
local foundUnits = surface.set_multi_command(universe.formCommand)
|
||||
if (foundUnits > 0) then
|
||||
if (map.state == AI_STATE_SIEGE) then
|
||||
map.sentSiegeGroups = map.sentSiegeGroups + 1
|
||||
end
|
||||
|
||||
if universe.NEW_ENEMIES then
|
||||
squad.base = findNearbyBase(map, chunk)
|
||||
end
|
||||
@ -341,6 +345,10 @@ function aiAttackWave.formSquads(map, chunk)
|
||||
universe.formCommand.unit_count = scaledWaveSize
|
||||
local foundUnits = surface.set_multi_command(universe.formCommand)
|
||||
if (foundUnits > 0) then
|
||||
if (map.state == AI_STATE_SIEGE) then
|
||||
map.sentSiegeGroups = 0
|
||||
end
|
||||
|
||||
if universe.NEW_ENEMIES then
|
||||
squad.base = findNearbyBase(map, chunk)
|
||||
end
|
||||
|
@ -22,9 +22,9 @@ local AI_STATE_ONSLAUGHT = constants.AI_STATE_ONSLAUGHT
|
||||
function aiPredicates.canAttack(map)
|
||||
local surface = map.surface
|
||||
local goodAI = (((map.state == AI_STATE_AGGRESSIVE) and (map.sentAggressiveGroups < map.maxAggressiveGroups)) or
|
||||
(map.state == AI_STATE_RAIDING) or
|
||||
(map.state == AI_STATE_ONSLAUGHT) or
|
||||
(map.universe.raidAIToggle and (map.state == AI_STATE_SIEGE) and (map.random() < 0.025)))
|
||||
(map.state == AI_STATE_RAIDING) or
|
||||
(map.state == AI_STATE_ONSLAUGHT) or
|
||||
(map.universe.raidAIToggle and (map.state == AI_STATE_SIEGE) and (map.sentSiegeGroups >= map.maxSiegeGroups)))
|
||||
local notPeaceful = not surface.peaceful_mode
|
||||
local nocturalMode = map.universe.aiNocturnalMode
|
||||
local noctural = (not nocturalMode) or (nocturalMode and surface.darkness > 0.65)
|
||||
|
Loading…
x
Reference in New Issue
Block a user