From d462e8f32da0abe00d39ddd6b4c152853126bd85 Mon Sep 17 00:00:00 2001 From: Aaron Veden Date: Fri, 10 Dec 2021 13:32:14 -0800 Subject: [PATCH] added raiding ai state to lower temperament --- changelog.txt | 1 + libs/AIPlanning.lua | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/changelog.txt b/changelog.txt index 7b67c3a..2a0d1d6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -34,6 +34,7 @@ Date: 23. 11. 2021 - 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 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: - Increase chance to upgrade an enemy structure from 5% to 30% - 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 diff --git a/libs/AIPlanning.lua b/libs/AIPlanning.lua index 3503975..b061ba7 100644 --- a/libs/AIPlanning.lua +++ b/libs/AIPlanning.lua @@ -156,8 +156,10 @@ local function planning(map, evolution_factor, tick) local roll = universe.random() if (map.temperament < 0.05) then -- 0 - 0.05 if universe.enabledMigration then - if (roll < 0.35) then + if (roll < 0.30) then map.state = AI_STATE_MIGRATING + elseif (roll < 0.50) and universe.raidAIToggle then + map.state = AI_STATE_RAIDING elseif universe.siegeAIToggle then map.state = AI_STATE_SIEGE else @@ -178,6 +180,8 @@ local function planning(map, evolution_factor, tick) if (universe.enabledMigration) then if (roll < 0.4) then map.state = AI_STATE_MIGRATING + elseif (roll < 0.55) and universe.raidAIToggle then + map.state = AI_STATE_RAIDING elseif universe.siegeAIToggle then map.state = AI_STATE_SIEGE else