From a3d23b9c27c6686a2b5ebc5f21e6b4bdaf363bc7 Mon Sep 17 00:00:00 2001 From: SMUnlimited Date: Sun, 8 Dec 2024 23:01:32 +0000 Subject: [PATCH] Fix set react calculation issue and made easier to predict build order #466 Priority works backwards for setbuildreact to improve predictability --- REFORGED/Elf/BuildSequence.ai | 80 +++++++++------------- REFORGED/Human/BuildSequence.ai | 50 +++++++------- REFORGED/Orc/BuildSequence.ai | 22 +++--- REFORGED/Undead/BuildSequence.ai | 24 +++---- TFT/Elf/BuildSequence.ai | 112 ++++++++++++++----------------- TFT/Human/BuildSequence.ai | 54 +++++++-------- TFT/Orc/BuildSequence.ai | 22 +++--- TFT/Undead/BuildSequence.ai | 32 ++++----- common.eai | 23 +++---- 9 files changed, 194 insertions(+), 225 deletions(-) diff --git a/REFORGED/Elf/BuildSequence.ai b/REFORGED/Elf/BuildSequence.ai index 5526a53bd..d06746f09 100644 --- a/REFORGED/Elf/BuildSequence.ai +++ b/REFORGED/Elf/BuildSequence.ai @@ -508,7 +508,7 @@ function build_sequence_MassHD takes nothing returns nothing if tier == 3 then call BuildUnit(2, MOUNTAIN_GIANT, 60) - call SetBuildReact(40, 20, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) + call SetBuildReact(40, 20, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 90) call BuildUnit(12, DRYAD, 70) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -548,7 +548,7 @@ if tier == 3 then elseif tier == 2 then call BuildUnit(1, MOUNTAIN_GIANT, 50) - call SetBuildReact(30, 12, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) + call SetBuildReact(30, 12, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 80) call BuildUnit(6, DRYAD, 70) call BuildUnit(1, TREE_ETERNITY, 45) call BuildUnit(1, hero[1], 140) @@ -586,7 +586,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, HUNTRESS, 3, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 24) + call SetBuildReact(26, 6, HUNTRESS, 3, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -733,8 +733,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 55) call BuildUnit(1, hero[1], 150) @@ -894,8 +893,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -961,10 +959,8 @@ endfunction function build_sequence_Ballista takes nothing returns nothing if tier == 3 then - call SetBuildReact(14, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(14, 4, HUNTRESS, 6, BALLISTA, enemy_unarmored, 4, 8, 70) call BuildUnit(12, DRYAD, 55) - call BuildUnit(4, HUNTRESS, 60) - call BuildUnit(6, BALLISTA, 60) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -990,10 +986,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(14, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(14, 4, HUNTRESS, 5, BALLISTA, enemy_unarmored, 4, 8, 74) call BuildUnit(6, DRYAD, 55) - call BuildUnit(4, HUNTRESS, 60) - call BuildUnit(5, BALLISTA, 60) call BuildUnit(1, TREE_ETERNITY, 50) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1088,8 +1082,7 @@ function build_sequence_Talon takes nothing returns nothing if tier == 3 then call BuildUnit(14, DRUID_TALON, 90) call BuildUnit(12, FAERIE_DRAGON, 100) - call SetBuildReact(14, 0, MOUNTAIN_GIANT, 0, HIPPO, enemy_air, 8, 12, 65) - call BuildUnit(4, MOUNTAIN_GIANT, 70) + call SetBuildReact(14, 4, MOUNTAIN_GIANT, 0, HIPPO, enemy_air, 8, 12, 90) call BuildUnit(1, hero[1], 150) call BuildUnit(1, hero[2], 140) call BuildUnit(1, hero[3], 130) @@ -1130,8 +1123,7 @@ if tier == 3 then elseif tier == 2 then call BuildUnit(12, DRUID_TALON, 40) call BuildUnit(8, FAERIE_DRAGON, 100) - call SetBuildReact(14, 0, MOUNTAIN_GIANT, 0, HIPPO, enemy_air, 8, 12, 65) - call BuildUnit(3, MOUNTAIN_GIANT, 70) + call SetBuildReact(14, 3, MOUNTAIN_GIANT, 0, HIPPO, enemy_air, 8, 12, 76) call BuildUnit(1, TREE_ETERNITY, 55) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1172,8 +1164,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 58) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -1337,8 +1328,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 55) call BuildUnit(1, hero[1], 150) @@ -1501,8 +1491,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -1577,8 +1566,7 @@ endfunction function build_sequence_Archer takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 0, ARCHER, 0, HUNTRESS, enemy_unarmored, 4, 8, 50) - call BuildUnit(32, ARCHER, 10) + call SetBuildReact(20, 32, ARCHER, 0, HUNTRESS, enemy_unarmored, 4, 8, 74) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -1612,8 +1600,7 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(14, 0, ARCHER, 0, HUNTRESS, enemy_unarmored, 4, 8, 50) - call BuildUnit(22, ARCHER, 30) + call SetBuildReact(14, 22, ARCHER, 0, HUNTRESS, enemy_unarmored, 4, 8, 74) call BuildUnit(1, TREE_ETERNITY, 45) call BuildUnit(1, hero[1], 150) call BuildUnit(1, hero[2], 140) @@ -1645,7 +1632,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 12, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 40) + call SetBuildReact(26, 12, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 66) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -1783,8 +1770,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 55) call BuildUnit(1, hero[1], 150) @@ -1858,8 +1844,8 @@ endfunction function build_sequence_MassHuntress takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) - call SetBuildReact(42, 15, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) + call SetBuildReact(20, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 70) + call SetBuildReact(42, 15, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 92) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -1902,8 +1888,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(12, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) - call SetBuildReact(42, 12, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) + call SetBuildReact(12, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 62) + call SetBuildReact(42, 12, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 92) call BuildUnit(1, TREE_ETERNITY, 45) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1942,7 +1928,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 8, HUNTRESS, 4, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 26) + call SetBuildReact(26, 8, HUNTRESS, 4, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 60) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -2084,8 +2070,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 150) @@ -2168,8 +2153,8 @@ endfunction function build_sequence_AoWMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) - call SetBuildReact(50, 15, HUNTRESS, 10, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) + call SetBuildReact(20, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 70) + call SetBuildReact(50, 15, HUNTRESS, 10, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 100) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -2218,8 +2203,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(14, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) - call SetBuildReact(40, 10, HUNTRESS, 8, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) + call SetBuildReact(14, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 74) + call SetBuildReact(40, 10, HUNTRESS, 8, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 90) call BuildUnit(1, TREE_ETERNITY, 50) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -2267,7 +2252,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 8, HUNTRESS, 4, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 35) + call SetBuildReact(26, 8, HUNTRESS, 4, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 60) call BuildUnit(1, TREE_AGES, 55) call BuildUnit(1, hero[1], 150) @@ -2359,8 +2344,8 @@ endfunction function build_sequence_AoLMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(16, 2, DRYAD, 1, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 60) - call SetBuildReact(50, 10, DRUID_CLAW, 8, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 60) + call SetBuildReact(16, 2, DRYAD, 1, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 76) + call SetBuildReact(50, 10, DRUID_CLAW, 8, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 110) call BuildUnit(3, CHIMAERA, 58) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -2416,8 +2401,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(16, 2, DRYAD, 1, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 60) - call SetBuildReact(50, 5, DRUID_CLAW, 4, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 60) + call SetBuildReact(16, 2, DRYAD, 1, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 80) + call SetBuildReact(50, 5, DRUID_CLAW, 4, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 110) call BuildUnit(1, TREE_ETERNITY, 80) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -2469,8 +2454,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(4, HUNTRESS, 52) + call SetBuildReact(26, 6, ARCHER, 4, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 55) call BuildUnit(1, hero[1], 150) diff --git a/REFORGED/Human/BuildSequence.ai b/REFORGED/Human/BuildSequence.ai index 98e066384..d3654ce50 100644 --- a/REFORGED/Human/BuildSequence.ai +++ b/REFORGED/Human/BuildSequence.ai @@ -582,7 +582,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -710,7 +710,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP,50) @@ -773,7 +773,7 @@ endfunction function build_sequence_Gryph takes nothing returns nothing if tier == 3 then - call SetBuildReact(24, 6, GRYPHON, 3, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 50) + call SetBuildReact(24, 6, GRYPHON, 3, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 74) call BuildUnit(6, KNIGHT, 50) call BuildUnit(4, PRIEST, 60) call BuildUnit(1, hero[1], 140) @@ -848,7 +848,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -1001,7 +1001,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 66) call BuildUnit(1, hero[1], 150) call BuildUnit(1, KEEP,50) @@ -1156,7 +1156,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 3, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(26, 3, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, hero[1], 150) call BuildUnit(1, KEEP,50) @@ -1305,7 +1305,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -1475,7 +1475,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -1549,9 +1549,9 @@ function init_strategy_Dragonhawk takes nothing returns nothing endfunction function build_sequence_Dragonhawk takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 0, GRYPHON, 15, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 70) + call SetBuildReact(20, 0, GRYPHON, 15, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 100) call BuildUpgr(1, UPG_CLOUD, 100) - call BuildUnit(6, KNIGHT, 100) + call BuildUnit(6, KNIGHT, 90) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -1628,7 +1628,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -1695,12 +1695,12 @@ endfunction function build_sequence_BarrackMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(36, 2, KNIGHT, 6, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 60) - call SetBuildReact(12, 0, MORTAR, 0, COPTER, (enemy_unarmored + (enemy_air * 4) - (enemy_piercing * 4)), 4, 25, 55) + call SetBuildReact(36, 2, KNIGHT, 6, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 80) + call SetBuildReact(12, 0, MORTAR, 0, COPTER, (enemy_unarmored + (enemy_air * 4) - (enemy_piercing * 4)), 4, 25, 67) if GetUpgradeLevel(UPG_TANK) > 0 then - call SetBuildReact(22, 1, KNIGHT, 0, ROCKET_TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 50) + call SetBuildReact(22, 1, KNIGHT, 0, ROCKET_TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 72) else - call SetBuildReact(22, 1, KNIGHT, 0, TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 50) + call SetBuildReact(22, 1, KNIGHT, 0, TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 72) endif call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1743,8 +1743,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 3, FOOTMAN, 5, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 50) - call SetBuildReact(12, 0, MORTAR, 0, COPTER, (enemy_air * 3 - (enemy_piercing * 3)), 4, 25, 40) + call SetBuildReact(20, 3, FOOTMAN, 5, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 70) + call SetBuildReact(12, 0, MORTAR, 0, COPTER, (enemy_air * 3 - (enemy_piercing * 3)), 4, 25, 62) call BuildUnit(1, CASTLE, 50) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1781,7 +1781,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 3, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 50) + call SetBuildReact(26, 3, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 65) call BuildUpgr(Min((TownCountDone(FOOTMAN)/5),1), UPG_DEFEND, 45) call BuildUnit(1, KEEP, 50) call BuildUnit(1, hero[1], 150) @@ -1851,8 +1851,8 @@ endfunction function build_sequence_SanctumMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(32, 3, GRYPHON, 4, HUMAN_DRAGON_HAWK, ((enemy_air * 2) - enemy_piercing), 4, 25, 45) - call SetBuildReact(32, 3, SPELL_BREAKER, 3, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 45) + call SetBuildReact(32, 3, GRYPHON, 4, HUMAN_DRAGON_HAWK, ((enemy_air * 2) - enemy_piercing), 4, 25, 77) + call SetBuildReact(32, 3, SPELL_BREAKER, 3, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 77) call BuildUnit(10, PRIEST, 60) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1900,9 +1900,9 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(24, 3, SPELL_BREAKER, 0, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 45) + call SetBuildReact(24, 3, SPELL_BREAKER, 0, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 69) call BuildUnit(7, PRIEST, 55) - call BuildUnit(4, HUMAN_DRAGON_HAWK, 30) + call BuildUnit(4, HUMAN_DRAGON_HAWK, 50) call BuildUnit(3, FOOTMAN, 60) call BuildUnit(1, CASTLE, 50) call BuildUnit(1, hero[1], 130) @@ -1948,7 +1948,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -2143,7 +2143,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) @@ -2285,7 +2285,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 150) - call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 44) + call SetBuildReact(26, 4, FOOTMAN, 2, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 60) call BuildUnit(1, KEEP, 50) diff --git a/REFORGED/Orc/BuildSequence.ai b/REFORGED/Orc/BuildSequence.ai index c3c1ae9c1..55b0b06ed 100644 --- a/REFORGED/Orc/BuildSequence.ai +++ b/REFORGED/Orc/BuildSequence.ai @@ -1285,8 +1285,8 @@ function init_strategy_BarrackMix takes nothing returns nothing endfunction function build_sequence_BarrackMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(36, 4, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) - call SetBuildReact(36, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) + call SetBuildReact(36, 4, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 86) + call SetBuildReact(36, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 86) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -1336,8 +1336,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(32, 1, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) - call SetBuildReact(22, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) + call SetBuildReact(32, 1, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 82) + call SetBuildReact(22, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 82) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, FORTRESS, 45) @@ -1389,7 +1389,7 @@ elseif tier == 2 then else call BuildUpgr(Min(((TownCountDone(GRUNT)/2)-2),1), UPG_ORC_PILLAGE, 30) - call SetBuildReact(30, 1, GRUNT, 3, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 16, 50) + call SetBuildReact(30, 1, GRUNT, 3, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 16, 65) call BuildUnit(1, hero[1], 150) call BuildUnit(1, STRONGHOLD, 50) if not (c_enemy_total == c_enemy[R_ELF]) then @@ -1464,9 +1464,9 @@ endfunction function build_sequence_BestiaryMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(22, 2, WYVERN, 2, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 50) - call SetBuildReact(22, 2, RAIDER, 2, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 50) - call SetBuildReact(30, 2, WYVERN, 2, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 40) + call SetBuildReact(22, 2, WYVERN, 2, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 72) + call SetBuildReact(22, 2, RAIDER, 2, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 72) + call SetBuildReact(30, 2, WYVERN, 2, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 70) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -1508,9 +1508,9 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 1, WYVERN, 1, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 50) - call SetBuildReact(20, 1, RAIDER, 1, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 50) - call SetBuildReact(30, 1, WYVERN, 1, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 40) + call SetBuildReact(20, 1, WYVERN, 1, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 70) + call SetBuildReact(20, 1, RAIDER, 1, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 70) + call SetBuildReact(30, 1, WYVERN, 1, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 70) call BuildUnit(1, hero[1], 130) call BuildUnit(1, hero[2], 120) call BuildUnit(1, FORTRESS, 45) diff --git a/REFORGED/Undead/BuildSequence.ai b/REFORGED/Undead/BuildSequence.ai index 6325c9bd6..fd109071c 100644 --- a/REFORGED/Undead/BuildSequence.ai +++ b/REFORGED/Undead/BuildSequence.ai @@ -1418,10 +1418,10 @@ endfunction function build_sequence_CryptMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 5, ABOMINATION, 2, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 50) - call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 40) - call SetBuildReact(15, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 50) - call SetBuildReact(15, 0, MEAT_WAGON, 1, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - enemy_piercing - enemy_towers - (enemy_unarmored * 2)), 4, 25, 40) + call SetBuildReact(20, 5, ABOMINATION, 2, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 70) + call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 60) + call SetBuildReact(15, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 65) + call SetBuildReact(15, 0, MEAT_WAGON, 1, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - enemy_piercing - enemy_towers - (enemy_unarmored * 2)), 4, 25, 55) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) call BuildUnit(1, hero[3], 120) @@ -1458,8 +1458,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 4, GHOUL, 3, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 50) - call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 40) + call SetBuildReact(20, 4, GHOUL, 3, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 70) + call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 60) call BuildUnit(2, OBSIDIAN_STATUE, 55) call BuildUnit(1, MEAT_WAGON, 55) call BuildUnit(1, NECROPOLIS_3, 50) @@ -1495,7 +1495,7 @@ elseif tier == 2 then else - call SetBuildReact(26, 5, GHOUL, 3, CRYPT_FIEND, ((enemy_unarmored * 3) + enemy_magic - (enemy_normal * 3)), 4, 25, 50) + call SetBuildReact(26, 5, GHOUL, 3, CRYPT_FIEND, ((enemy_unarmored * 3) + enemy_magic - (enemy_normal * 3)), 4, 25, 65) call BuildUpgr(Min((TownCountDone(GHOUL)/5),1), UPG_CANNIBALIZE, 60) call BuildUnit(1, NECROPOLIS_2, 55) call BuildUnit(1, hero[1], 150) @@ -1554,9 +1554,9 @@ endfunction function build_sequence_TempleMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 3, ABOMINATION, 2, MEAT_WAGON, (enemy_towers * 2), 4, 25, 50) - call SetBuildReact(20, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 40) - call SetBuildReact(20, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 50) + call SetBuildReact(20, 3, ABOMINATION, 2, MEAT_WAGON, (enemy_towers * 2), 4, 25, 70) + call SetBuildReact(20, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 60) + call SetBuildReact(20, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 70) call BuildUnit(6, GHOUL, 25) call BuildUnit(1, hero[1], 140) call BuildUnit(1, hero[2], 130) @@ -1591,8 +1591,8 @@ if tier == 3 then elseif tier == 2 then call BuildUnit(6, GHOUL, 25) - call SetBuildReact(30, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 55) - call SetBuildReact(10, 3, OBSIDIAN_STATUE, 2, MEAT_WAGON, enemy_towers, 4, 25, 55) + call SetBuildReact(30, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 75) + call SetBuildReact(10, 3, OBSIDIAN_STATUE, 2, MEAT_WAGON, enemy_towers, 4, 25, 65) call BuildUnit(1, NECROPOLIS_3, 55) call BuildUnit(1, hero[1], 130) call BuildUnit(1, hero[2], 120) diff --git a/TFT/Elf/BuildSequence.ai b/TFT/Elf/BuildSequence.ai index f4bb77131..9ccd929ea 100644 --- a/TFT/Elf/BuildSequence.ai +++ b/TFT/Elf/BuildSequence.ai @@ -506,10 +506,10 @@ endfunction function build_sequence_MassHD takes nothing returns nothing if tier == 3 then - call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 60) call BuildUnit(2, MOUNTAIN_GIANT, 60) - call SetBuildReact(20, 35, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) - call BuildUnit(8, DRYAD, 70) + call SetBuildReact(20, 35, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 70) + call BuildUnit(8, DRYAD, 54) call BuildUnit(1, hero[1], 90) call BuildUnit(1, hero[2], 60) call BuildUnit(1, DEN_OF_WONDERS, 80) @@ -541,10 +541,10 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 60) call BuildUnit(1, MOUNTAIN_GIANT, 50) - call SetBuildReact(20, 10, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) - call BuildUnit(4, DRYAD, 70) + call SetBuildReact(20, 10, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 70) + call BuildUnit(4, DRYAD, 62) call BuildUnit(1, TREE_ETERNITY, 10) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) @@ -579,8 +579,8 @@ elseif tier == 2 then else call BuildUnit(1, merc_rush, 60) - call SetBuildReact(22, 6, HUNTRESS, 3, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 20) - call BuildUnit(1, TREE_AGES, 10) + call SetBuildReact(22, 6, HUNTRESS, 3, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 60) + call BuildUnit(1, TREE_AGES, 45) call BuildUnit(1, hero[1], 70) @@ -725,8 +725,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -882,8 +881,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -949,12 +947,10 @@ endfunction function build_sequence_Ballista takes nothing returns nothing if tier == 3 then - call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(10, 4, HUNTRESS, 6, BALLISTA, enemy_unarmored, 4, 8, 80) call BuildUnit(12, DRYAD, 55) - call BuildUnit(4, HUNTRESS, 60) - call BuildUnit(6, BALLISTA, 60) - call BuildUnit(1, hero[1], 80) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[1], 90) + call BuildUnit(1, hero[2], 80) call BuildUnit(1, ZEPPELIN, 50) call BuildUpgr(1, UPG_BOLT, 72) @@ -978,13 +974,11 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(10, 4, HUNTRESS, 5, BALLISTA, enemy_unarmored, 4, 8, 70) call BuildUnit(6, DRYAD, 55) - call BuildUnit(4, HUNTRESS, 60) - call BuildUnit(5, BALLISTA, 60) call BuildUnit(1, TREE_ETERNITY, 10) call BuildUnit(1, hero[1], 80) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[2], 70) call BuildUnit(1, ZEPPELIN, 50) call BuildUpgr(1, UPG_BOLT, 70) @@ -1155,8 +1149,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -1315,8 +1308,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -1480,8 +1472,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -1553,7 +1544,7 @@ endfunction function build_sequence_Archer takes nothing returns nothing if tier == 3 then - call SetBuildReact(10, 0, ARCHER, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(10, 0, ARCHER, 0, BALLISTA, enemy_unarmored, 4, 8, 60) call BuildUnit(31, ARCHER, 10) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 75) @@ -1584,7 +1575,7 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(10, 0, ARCHER, 0, BALLISTA, enemy_unarmored, 4, 8, 50) + call SetBuildReact(10, 0, ARCHER, 0, BALLISTA, enemy_unarmored, 4, 8, 60) call BuildUnit(18, ARCHER, 30) call BuildUnit(1, TREE_ETERNITY, 10) call BuildUnit(1, hero[1], 80) @@ -1614,7 +1605,7 @@ elseif tier == 2 then else - call SetBuildReact(20, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 40) + call SetBuildReact(20, 6, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 60) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 85) @@ -1749,8 +1740,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -1822,10 +1812,10 @@ endfunction function build_sequence_MassHuntress takes nothing returns nothing if tier == 3 then - call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) - call SetBuildReact(20, 35, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) + call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 60) + call SetBuildReact(20, 35, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 70) call BuildUnit(1, hero[1], 90) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[2], 70) call BuildUnit(1, DEN_OF_WONDERS, 150) call BuildUpgr(1, UPG_GLAIVE, 70) @@ -1862,11 +1852,11 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 50) - call SetBuildReact(20, 10, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 50) - call BuildUnit(1, TREE_ETERNITY, 10) + call SetBuildReact(10, 0, HUNTRESS, 0, BALLISTA, enemy_unarmored, 4, 8, 60) + call SetBuildReact(20, 10, HUNTRESS, 0, ARCHER, enemy_air, 5, 20, 70) + call BuildUnit(1, TREE_ETERNITY, 30) call BuildUnit(1, hero[1], 80) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[2], 70) call BuildUpgr(2, UPG_MOON_ARMOR, 30) call BuildUnit(1, DEN_OF_WONDERS, 55) @@ -1903,8 +1893,8 @@ elseif tier == 2 then else call BuildUnit(1, merc_rush, 60) - call SetBuildReact(22, 6, HUNTRESS, 2, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 20) - call BuildUnit(1, TREE_AGES, 10) + call SetBuildReact(22, 6, HUNTRESS, 2, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 60) + call BuildUnit(1, TREE_AGES, 45) call BuildUnit(1, hero[1], 80) @@ -2043,8 +2033,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) @@ -2124,10 +2113,10 @@ endfunction function build_sequence_AoWMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) - call SetBuildReact(60, 1, HUNTRESS, 3, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) - call BuildUnit(1, hero[1], 90) - call BuildUnit(1, hero[2], 60) + call SetBuildReact(20, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 70) + call SetBuildReact(60, 1, HUNTRESS, 3, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 110) + call BuildUnit(1, hero[1], 120) + call BuildUnit(1, hero[2], 110) call BuildUpgr(3, UPG_MOON_ARMOR, 20) call BuildUpgr(Min((((TownCountDone(ARCHER) + TownCountDone(HUNTRESS))/3)-2),3), UPG_STR_MOON, 50) call BuildUpgr(Min(((TownCountDone(ARCHER)/2)-3),1), UPG_MARKSMAN, 40) @@ -2170,11 +2159,11 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(15, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) - call SetBuildReact(40, 1, HUNTRESS, 3, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) + call SetBuildReact(15, 2, ARCHER, 3, BALLISTA, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 65) + call SetBuildReact(40, 1, HUNTRESS, 3, ARCHER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 90) call BuildUnit(1, TREE_ETERNITY, 25) - call BuildUnit(1, hero[1], 80) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[1], 100) + call BuildUnit(1, hero[2], 90) call BuildUpgr(2, UPG_MOON_ARMOR, 20) call BuildUpgr(Min((((TownCountDone(ARCHER) + TownCountDone(HUNTRESS))/3)-2),2), UPG_STR_MOON, 50) call BuildUpgr(Min(((TownCountDone(ARCHER)/2)-2),1), UPG_BOWS, 50) @@ -2215,8 +2204,8 @@ elseif tier == 2 then else - call SetBuildReact(22, 6, HUNTRESS, 3, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 35) - call BuildUnit(1, TREE_AGES, 35) + call SetBuildReact(22, 6, HUNTRESS, 3, ARCHER, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 3, 18, 60) + call BuildUnit(1, TREE_AGES, 45) call BuildUnit(1, hero[1], 85) call BuildUnit(1, DEN_OF_WONDERS, 15) @@ -2304,10 +2293,10 @@ endfunction function build_sequence_AoLMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 2, DRYAD, 3, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 60) - call SetBuildReact(60, 1, DRUID_CLAW, 3, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 40) - call BuildUnit(1, hero[1], 90) - call BuildUnit(1, hero[2], 60) + call SetBuildReact(20, 2, DRYAD, 3, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 80) + call SetBuildReact(60, 1, DRUID_CLAW, 3, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 100) + call BuildUnit(1, hero[1], 110) + call BuildUnit(1, hero[2], 100) call BuildUpgr(3, UPG_HIDES, 30) call BuildUpgr(Min((((TownCountDone(DRYAD)*2) + TownCountDone(DRUID_CLAW) + TownCountDone(MOUNTAIN_GIANT))/5),3), UPG_STR_WILD, 50) call BuildUpgr(Min(((TownCountDone(DRYAD)/2)-2),1), UPG_ABOLISH, 50) @@ -2359,11 +2348,11 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(15, 2, DRYAD, 1, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 60) - call SetBuildReact(40, 1, DRUID_CLAW, 2, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 40) + call SetBuildReact(15, 2, DRYAD, 1, MOUNTAIN_GIANT, (enemy_towers + enemy_piercing - enemy_casters - enemy_normal), 4, 25, 75) + call SetBuildReact(40, 1, DRUID_CLAW, 2, DRYAD, (enemy_unarmored + enemy_air + (enemy_magic * 2) + enemy_normal - enemy_piercing - enemy_siege)/3, 4, 25, 80) call BuildUnit(1, TREE_ETERNITY, 35) call BuildUnit(1, hero[1], 80) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[2], 75) call BuildUpgr(2, UPG_HIDES, 30) call BuildUpgr(Min((TownCountDone(DRUID_CLAW)/2),1), UPG_DRUID_CLAW, 70) call BuildUpgr(Min((((TownCountDone(DRYAD)*2) + TownCountDone(DRUID_CLAW) + TownCountDone(MOUNTAIN_GIANT))/5),2), UPG_STR_WILD, 50) @@ -2412,8 +2401,7 @@ elseif tier == 2 then else - call SetBuildReact(18, 3, ARCHER, 0, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 38) - call BuildUnit(1, HUNTRESS, 52) + call SetBuildReact(18, 3, ARCHER, 1, HUNTRESS, (enemy_normal + enemy_mediumarmor - (enemy_air * 2) - enemy_piercing - enemy_siege), 4, 25, 56) call BuildUnit(1, TREE_AGES, 50) call BuildUnit(1, hero[1], 80) diff --git a/TFT/Human/BuildSequence.ai b/TFT/Human/BuildSequence.ai index 5e59400d3..31a32ffd7 100644 --- a/TFT/Human/BuildSequence.ai +++ b/TFT/Human/BuildSequence.ai @@ -601,7 +601,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) call BuildFront(1, ARCANE_TOWER, 50) @@ -793,7 +793,7 @@ endfunction function build_sequence_Gryph takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 6, GRYPHON, 3, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 50) + call SetBuildReact(20, 6, GRYPHON, 3, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 70) call BuildUnit(4, PRIEST, 60) call BuildUnit(1, CASTLE, 10) call BuildUnit(1, hero[1], 80) @@ -871,7 +871,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) call BuildFront(1, ARCANE_TOWER, 50) @@ -1023,7 +1023,7 @@ elseif tier == 2 then else call BuildUnit(1, merc_rush, 60) - call SetBuildReact(12, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(12, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, hero[1], 80) call BuildUnit(1, KEEP,50) @@ -1180,7 +1180,7 @@ elseif tier == 2 then else call BuildUnit(1, merc_rush, 60) - call SetBuildReact(12, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(12, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, hero[1], 80) call BuildUnit(1, KEEP,50) @@ -1323,7 +1323,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) @@ -1491,7 +1491,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) call BuildFront(1, ARCANE_TOWER, 50) @@ -1566,7 +1566,7 @@ function init_strategy_Dragonhawk takes nothing returns nothing endfunction function build_sequence_Dragonhawk takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 0, GRYPHON, 30, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 40) + call SetBuildReact(20, 0, GRYPHON, 30, HUMAN_DRAGON_HAWK, enemy_air, 8, 16, 60) call BuildUpgr(1, UPG_CLOUD, 115) call BuildUnit(1, CASTLE, 10) call BuildUnit(1, hero[1], 80) @@ -1645,7 +1645,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) call BuildFront(1, ARCANE_TOWER, 50) @@ -1715,15 +1715,15 @@ endfunction function build_sequence_BarrackMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(40, 2, KNIGHT, 6, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 60) - call SetBuildReact(10, 0, MORTAR, 0, COPTER, (enemy_unarmored + (enemy_air * 4) - (enemy_piercing * 4)), 4, 25, 55) + call SetBuildReact(40, 2, KNIGHT, 6, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 80) + call SetBuildReact(10, 0, MORTAR, 0, COPTER, (enemy_unarmored + (enemy_air * 4) - (enemy_piercing * 4)), 4, 25, 65) if GetUpgradeLevel(UPG_TANK) > 0 then - call SetBuildReact(20, 1, KNIGHT, 0, ROCKET_TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 50) + call SetBuildReact(20, 1, KNIGHT, 0, ROCKET_TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 70) else - call SetBuildReact(20, 1, KNIGHT, 0, TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 50) + call SetBuildReact(20, 1, KNIGHT, 0, TANK, ((enemy_towers * 2) + enemy_air - (enemy_siege * 3) - enemy_normal), 4, 25, 70) endif call BuildUnit(1, hero[1], 90) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[2], 70) call BuildUpgr(Min((((TownCountDone(FOOTMAN)) + TownCountDone(KNIGHT))/4),3), UPG_MELEE, 60) call BuildUpgr(Min((((TownCountDone(RIFLEMAN)) + TownCountDone(MORTAR) + TownCountDone(COPTER))/4),3), UPG_RANGED, 60) call BuildUpgr(Min((((TownCountDone(RIFLEMAN)) + TownCountDone(MORTAR))/4),3), UPG_LEATHER, 50) @@ -1762,8 +1762,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 3, FOOTMAN, 5, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 50) - call SetBuildReact(10, 0, MORTAR, 0, COPTER, (enemy_air * 3 - (enemy_piercing * 3)), 4, 25, 40) + call SetBuildReact(20, 3, FOOTMAN, 5, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 70) + call SetBuildReact(10, 0, MORTAR, 0, COPTER, (enemy_air * 3 - (enemy_piercing * 3)), 4, 25, 50) call BuildUnit(1, CASTLE, 45) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 40) @@ -1800,11 +1800,11 @@ elseif tier == 2 then else - call SetBuildReact(18, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 50) - call BuildUpgr(Min((TownCountDone(FOOTMAN)/5),1), UPG_DEFEND, 45) - call BuildUnit(1, KEEP, 45) + call SetBuildReact(18, 2, FOOTMAN, 4, RIFLEMAN, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 2)), 4, 25, 70) + call BuildUpgr(Min((TownCountDone(FOOTMAN)/5),1), UPG_DEFEND, 55) + call BuildUnit(1, KEEP, 55) call BuildUnit(1, hero[1], 120) - call BuildUnit(1, ARCANE_VAULT, 15) + call BuildUnit(1, ARCANE_VAULT, 55) @@ -1872,8 +1872,8 @@ endfunction function build_sequence_SanctumMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(40, 3, GRYPHON, 4, HUMAN_DRAGON_HAWK, ((enemy_air * 2) - enemy_piercing), 4, 25, 45) - call SetBuildReact(30, 3, SPELL_BREAKER, 3, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 45) + call SetBuildReact(40, 3, GRYPHON, 4, HUMAN_DRAGON_HAWK, ((enemy_air * 2) - enemy_piercing), 4, 25, 85) + call SetBuildReact(30, 3, SPELL_BREAKER, 3, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 75) call BuildUnit(10, PRIEST, 60) call BuildUnit(1, hero[1], 90) call BuildUnit(1, hero[2], 70) @@ -1920,9 +1920,9 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 3, SPELL_BREAKER, 0, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 45) + call SetBuildReact(20, 3, SPELL_BREAKER, 0, SORCERESS, ((enemy_normal * 2) - enemy_magic - enemy_siege - enemy_piercing), 4, 25, 65) call BuildUnit(7, PRIEST, 55) - call BuildUnit(4, HUMAN_DRAGON_HAWK, 30) + call BuildUnit(4, HUMAN_DRAGON_HAWK, 42) call BuildUnit(1, CASTLE, 42) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) @@ -1967,7 +1967,7 @@ else call BuildFront(1, ARCANE_TOWER, 75) call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) @@ -2160,7 +2160,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) @@ -2299,7 +2299,7 @@ elseif tier == 2 then else call BuildUnit(1, hero[1], 80) - call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 38) + call SetBuildReact(16, 4, FOOTMAN, 0, RIFLEMAN, (enemy_unarmored + (enemy_lightarmor * 2) + enemy_air + enemy_magic - (enemy_normal * 2)), 4, 25, 56) call BuildUnit(1, KEEP, 50) diff --git a/TFT/Orc/BuildSequence.ai b/TFT/Orc/BuildSequence.ai index d0fda01bb..4e6e66f81 100644 --- a/TFT/Orc/BuildSequence.ai +++ b/TFT/Orc/BuildSequence.ai @@ -1296,8 +1296,8 @@ function init_strategy_BarrackMix takes nothing returns nothing endfunction function build_sequence_BarrackMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(55, 2, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) - call SetBuildReact(30, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) + call SetBuildReact(55, 2, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 105) + call SetBuildReact(30, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 80) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUnit(1, hero[3], 40) @@ -1347,8 +1347,8 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(30, 1, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 50) - call SetBuildReact(20, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 50) + call SetBuildReact(30, 1, GRUNT, 4, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 25, 80) + call SetBuildReact(20, 1, GRUNT, 0, CATAPULT, (enemy_unarmored + enemy_towers + enemy_casters)/2, 4, 25, 70) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUnit(1, FORTRESS, 50) @@ -1399,7 +1399,7 @@ elseif tier == 2 then else call BuildUpgr(Min(((TownCountDone(GRUNT)/2)-2),1), UPG_ORC_PILLAGE, 30) - call SetBuildReact(30, 1, GRUNT, 3, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 16, 50) + call SetBuildReact(30, 1, GRUNT, 3, HEAD_HUNTER, (enemy_unarmored + enemy_air - enemy_normal), 4, 16, 65) call BuildUnit(1, VOODOO_LOUNGE, 55) call BuildUnit(1, hero[1], 130) call BuildUnit(1, STRONGHOLD, 50) @@ -1476,9 +1476,9 @@ endfunction function build_sequence_BestiaryMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 2, WYVERN, 2, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 50) - call SetBuildReact(20, 2, RAIDER, 2, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 50) - call SetBuildReact(40, 2, WYVERN, 2, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 40) + call SetBuildReact(20, 2, WYVERN, 2, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 70) + call SetBuildReact(20, 2, RAIDER, 2, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 70) + call SetBuildReact(40, 2, WYVERN, 2, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 75) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUnit(1, hero[3], 40) @@ -1520,9 +1520,9 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 1, WYVERN, 1, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 50) - call SetBuildReact(20, 1, RAIDER, 1, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 50) - call SetBuildReact(30, 1, WYVERN, 1, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 40) + call SetBuildReact(20, 1, WYVERN, 1, BATRIDER, (enemy_towers + enemy_unarmored)/2, 4, 25, 70) + call SetBuildReact(20, 1, RAIDER, 1, KODO_BEAST, enemy_heavyarmor - enemy_piercing, 4, 25, 70) + call SetBuildReact(30, 1, WYVERN, 1, RAIDER, (enemy_unarmored + enemy_towers + enemy_casters + enemy_piercing)/4, 4, 25, 75) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUnit(1, FORTRESS, 45) diff --git a/TFT/Undead/BuildSequence.ai b/TFT/Undead/BuildSequence.ai index 82ba8b96a..c807d49b7 100644 --- a/TFT/Undead/BuildSequence.ai +++ b/TFT/Undead/BuildSequence.ai @@ -1462,10 +1462,10 @@ endfunction function build_sequence_CryptMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 5, ABOMINATION, 2, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 50) - call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 40) - call SetBuildReact(15, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 50) - call SetBuildReact(15, 1, MEAT_WAGON, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - enemy_piercing - enemy_towers - (enemy_unarmored * 2)), 4, 25, 40) + call SetBuildReact(20, 5, ABOMINATION, 2, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 70) + call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 60) + call SetBuildReact(15, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 65) + call SetBuildReact(15, 1, MEAT_WAGON, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - enemy_piercing - enemy_towers - (enemy_unarmored * 2)), 4, 25, 55) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUpgr(Min((TownCountDone(GHOUL)/5),1), UPG_GHOUL_FRENZY, 60) @@ -1501,11 +1501,11 @@ if tier == 3 then elseif tier == 2 then - call SetBuildReact(20, 5, GHOUL, 2, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 50) - call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 40) + call SetBuildReact(20, 5, GHOUL, 2, CRYPT_FIEND, (enemy_unarmored + (enemy_air * 2) + enemy_magic - (enemy_normal * 3)), 4, 25, 70) + call SetBuildReact(20, 0, CRYPT_FIEND, 0, GARGOYLE, ((enemy_air * 3) + enemy_normal - (enemy_piercing * 2) - enemy_unarmored), 4, 25, 60) call BuildUnit(2, OBSIDIAN_STATUE, 55) call BuildUnit(1, MEAT_WAGON, 55) - call BuildUnit(1, NECROPOLIS_3, 45) + call BuildUnit(1, NECROPOLIS_3, 50) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUpgr(Min((TownCountDone(CRYPT_FIEND)/3),1), UPG_BURROWING, 60) @@ -1539,9 +1539,9 @@ elseif tier == 2 then else - call SetBuildReact(40, 5, GHOUL, 2, CRYPT_FIEND, ((enemy_unarmored * 3) + enemy_magic - (enemy_normal * 3)), 4, 25, 50) + call SetBuildReact(40, 5, GHOUL, 2, CRYPT_FIEND, ((enemy_unarmored * 3) + enemy_magic - (enemy_normal * 3)), 4, 25, 60) call BuildUpgr(Min((TownCountDone(GHOUL)/5),1), UPG_CANNIBALIZE, 60) - call BuildUnit(1, NECROPOLIS_2, 25) + call BuildUnit(1, NECROPOLIS_2, 40) call BuildUnit(1, hero[1], 150) call BuildUnit(1, TOMB_OF_RELICS, 15) @@ -1601,12 +1601,12 @@ endfunction function build_sequence_TempleMix takes nothing returns nothing if tier == 3 then - call SetBuildReact(20, 2, ABOMINATION, 3, MEAT_WAGON, (enemy_towers * 2), 4, 25, 50) - call SetBuildReact(30, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 40) - call SetBuildReact(20, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 50) + call SetBuildReact(20, 2, ABOMINATION, 3, MEAT_WAGON, (enemy_towers * 2), 4, 25, 70) + call SetBuildReact(30, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 70) + call SetBuildReact(20, 2, OBSIDIAN_STATUE, 0, BLK_SPHINX, ((enemy_magic * 2) + enemy_casters - (enemy_piercing * 2)), 4, 25, 70) call BuildUnit(5, GHOUL, 25) call BuildUnit(1, hero[1], 80) - call BuildUnit(1, hero[2], 60) + call BuildUnit(1, hero[2], 70) call BuildUpgr(Min((TownCountDone(MEAT_WAGON) + TownCountDone(ABOMINATION))/4,1), UPG_PLAGUE, 50) call BuildUpgr(Min((TownCountDone(NECRO)/3),2), UPG_NECROS, 60) call BuildUpgr(Min((TownCountDone(NECRO)/3),1), UPG_SKEL_LIFE, 60) @@ -1639,9 +1639,9 @@ if tier == 3 then elseif tier == 2 then call BuildUnit(5, GHOUL, 25) - call SetBuildReact(30, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 55) - call SetBuildReact(10, 3, OBSIDIAN_STATUE, 3, MEAT_WAGON, enemy_towers, 4, 25, 55) - call BuildUnit(1, NECROPOLIS_3, 35) + call SetBuildReact(30, 5, NECRO, 5, BANSHEE, (enemy_casters * 2) - enemy_normal, 4, 25, 85) + call SetBuildReact(10, 3, OBSIDIAN_STATUE, 3, MEAT_WAGON, enemy_towers, 4, 25, 65) + call BuildUnit(1, NECROPOLIS_3, 40) call BuildUnit(1, hero[1], 80) call BuildUnit(1, hero[2], 60) call BuildUpgr(Min((TownCountDone(NECRO)/3),1), UPG_NECROS, 60) diff --git a/common.eai b/common.eai index d0bf2bba1..88bce4f02 100644 --- a/common.eai +++ b/common.eai @@ -9794,27 +9794,24 @@ function BuildAtMine takes integer qty, integer unitid, integer prio returns not endfunction //============================================================================ +// Unlike other build commands priority works backwards so it always builds first units at prio specified then works backwards. This is because otherwise its unknown how many units it will build as its first units will build at variable priority based on number of units it actually builds. +// Min value is in addition to the number built within the food use. +// Builds both units in unison if a mix function SetBuildReact takes integer food, integer min1, integer unit1, integer min2, integer unit2, real enemy_strength, real strength1, real strength2, integer prio returns nothing local integer num1 = R2I(LinearInterpolation(strength1, strength2, I2R(food), 0, enemy_strength)) / Max(GetFoodUsed(old_id[unit1]),1) local integer num2 = (food - num1 * GetFoodUsed(old_id[unit1])) / Max(GetFoodUsed(old_id[unit2]),1) local integer prio1 = 0 local integer prio2 = 0 - local integer food1 = food / Max(GetFoodUsed(old_id[unit1]),1) - local integer food2 = food / Max(GetFoodUsed(old_id[unit2]),1) - if food1 > food2 then - set prio1 = prio+(food1-1)*2 - (min1+num1-1)*2 // So builds starting at the max priority possible - set prio2 = prio+(food1-1)*2 - (min2+num2-1)*2 // i.e build 6 footmen instead of 12 but will build those 6 starting at same proirity of 12 - else // This is so it builds less than the max it still builds at same priority. - set prio1 = prio+(food2-1)*2 - (min1+num1-1)*2 - 4 // I assuming the second unit id is less common so make sure it has smaller prioity so that first unit gets its requirements first - set prio2 = prio+(food2-1)*2 - (min2+num2-1)*2 - 4 + if min1+num1 >= min2+num2 then + set prio1 = prio - (min1+num1)*2 // Set priority so first units will be build at `prio` first then decrease + set prio2 = prio - 1 + (-(min1+num1)+(min2+num2))*2 // Ensure this then builds at same priority as prio1 to interweave the two units by making up the difference + //if equal second unit is always slightly less priority + elseif min2+num2 > min1+num1 then + set prio1 = prio + (-(min2+num2)+(min1+num1))*2 + set prio2 = prio - (min2+num2)*2 - 1 endif -// if min1+num1 > min2 + num2 then -// set prio2 = prio+(min1+num1-1)*2 - (min2+num2-1)*2 // So it builds at same priority as the first unit does -// elseif min1+num1 < min2+num2 then -// set prio1 = prio+(min2+num2-1)*2 - (min1+num1-1)*2 -// endif if min1 + num1 > 0 then call BuildUnit(min1 + num1, unit1, prio1) endif