From fe0613b394474b747faf70324a680df6dda4fe0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Severin=20Gl=C3=B6ckner?= Date: Sun, 29 Jul 2018 00:49:37 +0200 Subject: [PATCH] TSG S2: adjust AI settings This follows the earlier commit which unified side 2 and 3. In the first rounds the AI behaves like former side 3, later like side 2. This is seemlessly possible, because side 3's AI settings were having practical effect at the beginning of the game, and side 2's conflicing settings don't come into action before the recruited troops met the ones of the player. (bug #3032) [ci skip] (cherry-picked from commit ee09bc3b6309950c10ed8e0800952ce3c6cd6607) --- .../scenarios/02_Proven_by_the_Sword.cfg | 48 +++++++++++-------- 1 file changed, 28 insertions(+), 20 deletions(-) diff --git a/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg b/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg index f2d9a2f2a126..24b919114de1 100644 --- a/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg +++ b/data/campaigns/The_South_Guard/scenarios/02_Proven_by_the_Sword.cfg @@ -72,19 +72,17 @@ (Footpad,Thug,Thief,Poacher,Trapper)} [ai] - # macroified the params here because they'll be reused later in the scenario -#define URZA_NALMATH_AI_PARAMS - {ATTACK_DEPTH 2 3 4} - grouping=no - {NO_SCOUTS} - village_value=3 -#enddef - - {URZA_NALMATH_AI_PARAMS} + grouping=no + {NO_SCOUTS} {QUANTITY recruitment_pattern (fighter,fighter,scout,fighter) (fighter,archer,fighter,fighter) (scout,fighter,archer,fighter,fighter)} + + # The units at the beginning should not focus villages: + village_value=0 + # scout_village_targeting=0 + {MODIFY_AI_DELETE_CANDIDATE_ACTION 2 main_loop villages} [/ai] {FLAG_VARIANT6 ragged} @@ -107,14 +105,27 @@ #ifdef HARD {NAMED_GENERIC_UNIT 2 Footpad 34 14 () (_"Criminal")} {VILLAGE_USERS} - # Thief instead of Poacher: - {NAMED_GENERIC_UNIT 2 Thief 18 22 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN} + {NAMED_GENERIC_UNIT 2 Thief 18 22 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN} # Thief instead of Poacher {NAMED_GENERIC_UNIT 2 Thief 22 12 () (_"Criminal")} {VILLAGE_USERS} {GUARDIAN} #endif [/side] {STARTING_VILLAGES 2 21} + [event] + name=turn 6 + + # Now is the time that the recruited units may have met Deoran's, + # and may have the chance to recapture a village. + [modify_side] + side=2 + [ai] + village_value=3 + [/ai] + [/modify_side] + {MODIFY_AI_ADD_CANDIDATE_ACTION 2 main_loop {AI_CA_VILLAGES}} + [/event] + [event] name=prestart @@ -269,7 +280,7 @@ {QUANTITY add 31 23 19} [/modify_turns] - # check if it is Deoran. If not, tell him to go to Westin + # Check if it is Deoran. If not, tell him to go to Westin. [if] [have_unit] x,y=22,16 @@ -291,7 +302,7 @@ [/if] [/event] - # Deoran arrives at the citadel + # Deoran arrives at the citadel. [event] name=moveto @@ -367,14 +378,12 @@ (Skeleton,Skeleton Archer,Vampire Bat,Blood Bat)} [/set_recruit] - # update the [ai] params so that the recruitment_pattern matches the new - # recruits + # Update the [ai] params so that the recruitment_pattern matches + # the new recruits. [modify_side] side=2 [ai] - {URZA_NALMATH_AI_PARAMS} - {QUANTITY recruitment_pattern (fighter) (fighter,fighter,scout,fighter) (fighter,archer,fighter,archer,scout)} @@ -453,7 +462,7 @@ [/if] [/event] - # The undead attack + # The undead attack! [event] name=prerecruit @@ -502,7 +511,7 @@ [/event] [/event] - # Pillaging and burning the villages near Westin + # Pillaging and burning the villages near Westin. [event] name=capture @@ -691,4 +700,3 @@ [/scenario] #undef VILLAGE_USERS -#undef URZA_NALMATH_AI_PARAMS