This section is dedicated to documenting the different AI files included in the working Dawn of War AI. Of course, if you created another, different AI, this provides a good reference of how the original AI works.
Check this to see how to add new units, abilities and races so that the AI works with your modidifications to the game!
cpu_manager.ai – General Clerical work that tells the AI where to look for all these files throughout the AI structure..
These are the important sections to fill out:
import( 'Strategies/<modname>BuildBaseStrategy.ai' )
import( 'Tactics/<modname>/<unitname>Tactic.ai' )
function CpuManager:Initialize()
self.player_stats:GetPlayerRaceName() == "<mod_race>" or
self.player_stats:GetPlayerRaceName() == "<mod_race>" or
function CpuManager:AddStrategy( strategy_name, priority )
elseif self.player_stats:GetPlayerRaceName() == "<mod_race>" then
strategy = <modname>BuildBaseStrategy( BuildBaseStrategyInfo )
function CpuManager:ForceAttack( player_id )
AttackStrategyInfo.<mod_race>.stop_attack_rating = -INT_MAX
AttackStrategyInfo.<mod_race>.prefer_player = player_id
function CpuManager:CreateTactic( squad_ai )
if squad_ai:IsEngineer() then
elseif stats:GetSquadName() == "<mod's builder unit>" then
return <unitname>Tactic( squad_ai )
if class == UnitStatsAI.UC_LightInfantryLow or
class == UnitStatsAI.UC_LightInfantryMed or
class == UnitStatsAI.UC_LightInfantryHigh then
elseif squad_name == "<mod's light infantry squad>" then
tactic = <unitname>Tactic( squad_ai )
elseif class == UnitStatsAI.UC_HeavyInfantryMed or
class == UnitStatsAI.UC_HeavyInfantryHigh then
elseif squad_name == "<mod's heavy infantry squad>" then
tactic = <unitname>Tactic( squad_ai )
elseif class == UnitStatsAI.UC_Commander then
elseif squad_name == "<mod's commander unit>" then
tactic = <unitname>Tactic( squad_ai )
elseif class == UnitStatsAI.UC_VehicleLow or
class == UnitStatsAI.UC_VehicleMed or
class == UnitStatsAI.UC_VehicleHigh then
elseif squad_name == "<mod's vehicle unit>" then
tactic = <unitname>Tactic( squad_ai )
elseif class == UnitStatsAI.UC_MonsterMed or
class == UnitStatsAI.UC_MonsterHigh then
elseif squad_name == "<mod's monster unit>" then
tactic = <unitname>Tactic( squad_ai )unitstats.ai – Organizes the faction's units into categories and tables for the AI to understand their usefulness and threats..
| Class | Recommended Rating Span |
| UnitStatsAI.UC_LightInfantryLow | 0.10000000 – 0.20000000 |
| UnitStatsAI.UC_LightInfantryMed / UnitStatsAI.UC_LightInfantryHigh | 0.20000000 – 0.30000000 |
| UnitStatsAI.UC_HeavyInfantryMed / UnitStatsAI.UC_MonsterMed | 0.30000000 – 0.40000000 |
| UnitStatsAI.UC_HeavyInfantryHigh | 0.40000000 – 0.45000000 |
| UnitStatsAI.UC_Commander | 0.45000000 – 0.55000000 |
| UnitStatsAI.UC_VehicleLow / UnitStatsAI.UC_VehicleMed | 0.30000000 – 0.50000000 |
| UnitStatsAI.UC_VehicleHigh / UnitStatsAI.UC_MonsterHigh | 0.50000000 – 1.00000000 |
name = "<race _name>_dummy_weapon", effectiveness = GenerateUnitEffectiveness(0,0,0,0,0,0,0,0,0,0,0), range = UnitStatsAI.RT_None,
already has a weapon sponsor present and reliably continue and upgrade to other weapons you have mentioned after
the dummy weapon.
For the sake of standardization, the list below standardizes AI effectiveness values:
Just copy one «effectiveness = ..» line for each applicable weapon!
Lasers
name = "laspistol",
effectiveness = GenerateUnitEffectiveness(2,3,2,2,1,1,1,1,1,1,1),
range = UnitStatsAI.RT_Melee,
name = "laser_rifle",
effectiveness = GenerateUnitEffectiveness(3,4,3,3,1,1,1,1,1,1,1),
range = UnitStatsAI.RT_Melee,
name = "multilaser_vehicle",
effectiveness = GenerateUnitEffectiveness(6,8,5,5,3,2,1,1,1,1,1),
range = UnitStatsAI.RT_Ranged,Bolt and Bolters name = "bolt_pistol", effectiveness = GenerateUnitEffectiveness(7,9,8,8,8,3,3,3,8,3,4), range = UnitStatsAI.RT_Melee, name = "twin_bolt_pistol", effectiveness = GenerateUnitEffectiveness(8,10,9,8,8,3,3,3,8,3,4), range = UnitStatsAI.RT_Ranged, name = "bolter_tactical", effectiveness = GenerateUnitEffectiveness(7,9,8,8,8,3,3,3,8,3,4), range = UnitStatsAI.RT_Ranged, name = "heavy_bolter", effectiveness = GenerateUnitEffectiveness(14,16,15,10,14,5,3,3,18,3,9), range = UnitStatsAI.RT_Ranged, name = "heavy_bolter_vehicle", effectiveness = GenerateUnitEffectiveness(21,24,21,21,10,14,5,3,10,3,5), range = UnitStatsAI.RT_None, name = "heavy_bolter_twin_vehicle", effectiveness = GenerateUnitEffectiveness(23,24,26,10,9,5,5,10,11,6,7), range = UnitStatsAI.RT_Ranged, name = "storm_bolter", effectiveness = GenerateUnitEffectiveness(12,19,17,20,17,8,6,4,20,4,7), range = UnitStatsAI.RT_Ranged, name = "storm_bolter_tactical", effectiveness = GenerateUnitEffectiveness(12,19,17,20,17,8,6,4,20,4,7), range = UnitStatsAI.RT_Ranged, name = "storm_bolter_vehicle", effectiveness = GenerateUnitEffectiveness(13,17,17,25,25,23,17,7,43,9,9), range = UnitStatsAI.RT_None,
Flamers name = "flamer", effectiveness = GenerateUnitEffectiveness(4,6,4,5,4,1,1,1,2,1,2), range = UnitStatsAI.RT_ShortRanged, name = "twin_flamer_pistol", effectiveness = GenerateUnitEffectiveness(6,7,5,5,4,1,1,1,2,1,2), range = UnitStatsAI.RT_ShortRanged, name = "flamer_tactical", effectiveness = GenerateUnitEffectiveness(4,6,4,5,4,1,1,1,2,1,2), range = UnitStatsAI.RT_ShortRanged, name = "rifle_flamer", effectiveness = GenerateUnitEffectiveness(4,6,4,5,4,1,1,1,2,1,2), range = UnitStatsAI.RT_ShortRanged, name = "flamer_vehicle", effectiveness = GenerateUnitEffectiveness(15,16,21,20,16,12,8,1,10,1,10), range = UnitStatsAI.RT_ShortRanged, name = "heavy_flamer", effectiveness = GenerateUnitEffectiveness(7,14,9,12,10,5,4,2,16,2,4), range = UnitStatsAI.RT_ShortRanged, name = "heavy_flamer_vehicle", effectiveness = GenerateUnitEffectiveness(18,16,14,12,10,4,1,1,12,1,4), range = UnitStatsAI.RT_ShortRanged, name = "twin_heavy_flamer_vehicle", effectiveness = GenerateUnitEffectiveness(20,17,15,13,10,4,1,1,12,1,4), range = UnitStatsAI.RT_ShortRanged,
Grenade name = "grenade_launcher", effectiveness = GenerateUnitEffectiveness(9,12,9,6,3,3,3,3,4,3,3), range = UnitStatsAI.RT_Ranged,
Plasma name = "plasma_pistol", effectiveness = GenerateUnitEffectiveness(2,3,8,11,13,5,7,9,13,7,6), range = UnitStatsAI.RT_Melee, name = "plasma_gun", effectiveness = GenerateUnitEffectiveness(6,8,9,10,13,8,7,8,12,6,7), range = UnitStatsAI.RT_Ranged, name = "plasma_rifle", effectiveness = GenerateUnitEffectiveness(11,19,16,24,21,5,3,3,24,3,14), range = UnitStatsAI.RT_Ranged, name = "plasmagun_vehicle", effectiveness = GenerateUnitEffectiveness(12,20,17,24,21,5,3,3,24,3,14), range = UnitStatsAI.RT_Ranged,
Missiles and Rockets
name = "missile_launcher_tactical",
effectiveness = GenerateUnitEffectiveness(4,4,4,4,4,29,28,10,4,9,4),
range = UnitStatsAI.RT_Ranged,
name = "missile_launcher_vehicle",
effectiveness = GenerateUnitEffectiveness(7,7,7,7,7,34,25,7,7,7,7),
range = UnitStatsAI.RT_Ranged,
name = "missile_battery",
effectiveness = GenerateUnitEffectiveness(5,5,5,5,5,36,36,38,5,14,4),
range = UnitStatsAI.RT_Ranged,
name = "rocket_launcher_twin_vehicle",
effectiveness = GenerateUnitEffectiveness(4,4,4,4,4,39,38,20,4,9,4),
range = UnitStatsAI.RT_Ranged,Assault Cannon name = "assault_cannon", effectiveness = GenerateUnitEffectiveness(21,26,22,22,21,10,11,7,25,7,10), range = UnitStatsAI.RT_Ranged, name = "assault_cannon_vehicle", effectiveness = GenerateUnitEffectiveness(22,29,25,11,9,6,7,3,11,3,8), range = UnitStatsAI.RT_Ranged,
Autocannon name = "autocannon_vehicle", effectiveness = GenerateUnitEffectiveness(7,31,25,20,19,16,16,20,19,6,6), range = UnitStatsAI.RT_Ranged, name = "autocannon_twin_vehicle", effectiveness = GenerateUnitEffectiveness(11,39,34,31,29,26,27,17,23,19,19), range = UnitStatsAI.RT_Ranged,
Battlecannon name = "battlecannon_vehicle", effectiveness = GenerateUnitEffectiveness(5,5,5,5,5,13,13,13,5,13,3), range = UnitStatsAI.RT_Ranged,
Lascannon
name = "lascannon_tactical",
effectiveness = GenerateUnitEffectiveness(16,20,17,7,4,27,29,8,8,3,3),
range = UnitStatsAI.RT_Ranged,
name = "lascannon_vehicle",
effectiveness = GenerateUnitEffectiveness(20,26,20,10,4,53,32,9,10,4,4),
range = UnitStatsAI.RT_None,
name = "lascannon_twin_vehicle",
effectiveness = GenerateUnitEffectiveness(23,25,22,12,10,27,16,7,19,8,5),
range = UnitStatsAI.RT_Ranged,Melta name = "melta_gun", effectiveness = GenerateUnitEffectiveness(2,3,6,11,13,16,14,9,8,15,15), range = UnitStatsAI.RT_Ranged, name = "melta_rifle", effectiveness = GenerateUnitEffectiveness(2,3,6,11,13,16,14,9,8,15,15), range = UnitStatsAI.RT_Ranged, name = "multi_melta", effectiveness = GenerateUnitEffectiveness(2,3,6,11,13,16,14,9,8,15,15), range = UnitStatsAI.RT_Ranged, name = "multimelta_vehicle", effectiveness = GenerateUnitEffectiveness(2,3,6,13,15,16,16,9,8,15,15), range = UnitStatsAI.RT_Ranged, name = "twin_multi_melta_vehicle", effectiveness = GenerateUnitEffectiveness(2,3,6,15,18,22,20,18,10,17,15), range = UnitStatsAI.RT_Ranged,
Specials name = "sniper_rifle", effectiveness = GenerateUnitEffectiveness(8,22,22,11,11,1,1,1,11,1,1), range = UnitStatsAI.RT_Ranged, name = "rifle_hellgun", effectiveness = GenerateUnitEffectiveness(16,14,15,11,9,9,8,7,7,9,3), range = UnitStatsAI.RT_Ranged, name = "daemon_fire", effectiveness = GenerateUnitEffectiveness(10,19,17,17,14,5,3,3,14,4,7), range = UnitStatsAI.RT_ShortRanged, name = "neuro_(bio)_pistol", effectiveness = GenerateUnitEffectiveness(6,7,6,10,11,4,7,9,8,8,9), range = UnitStatsAI.RT_ShortRanged, name = "shotgun", effectiveness = GenerateUnitEffectiveness(16,14,15,11,9,9,8,7,7,9,3), range = UnitStatsAI.RT_Ranged, name = "fusion_pistol", effectiveness = GenerateUnitEffectiveness(2,3,6,11,13,16,14,9,8,15,15), range = UnitStatsAI.RT_ShortRanged, name = "blasta", effectiveness = GenerateUnitEffectiveness(10,8,5,2,1,1,1,1,1,1,1), range = UnitStatsAI.RT_Melee, name = "bomb_launcher_vehicle", effectiveness = GenerateUnitEffectiveness(6,5,4,5,6,8,3,3,5,3,4), range = UnitStatsAI.RT_Ranged,
Melee name = "power_fist", effectiveness = GenerateUnitEffectiveness(17,26,20,21,9,8,8,5,20,5,11), range = UnitStatsAI.RT_Melee, name = "power_claw", effectiveness = GenerateUnitEffectiveness(22,34,29,31,30,19,21,8,20,8,26), range = UnitStatsAI.RT_Melee, name = "powersword", effectiveness = GenerateUnitEffectiveness(22,29,24,25,16,4,3,3,24,3,12), range = UnitStatsAI.RT_Melee, name = "chainsword", effectiveness = GenerateUnitEffectiveness(18,23,19,20,20,3,3,3,19,3,10), range = UnitStatsAI.RT_Melee, name = "powerlance", effectiveness = GenerateUnitEffectiveness(13,11,9,8,10,6,4,3,7,7,4), range = UnitStatsAI.RT_Melee, name = "blade", effectiveness = GenerateUnitEffectiveness(10,9,8,7,6,12,5,9,4,10,5), range = UnitStatsAI.RT_Melee,
Eldar-specific name = "shuriken_catapult", effectiveness = GenerateUnitEffectiveness(6.86,5.87,4.9,3.92,1.5,1,0.5,0,2.17,0,6.49), range = UnitStatsAI.RT_ShortRanged, name = "shuriken_catapult_vehicle", effectiveness = GenerateUnitEffectiveness(3.61,3.02,3.01,2.27,2.532465,1.98,0.76,1.3779045,1.33,1.44943623,2.01), range = UnitStatsAI.RT_Ranged, name = "shuriken_pistol", effectiveness = GenerateUnitEffectiveness(10.97,8.53,7.31,7.31,3.96,2.43,0.92,0,4.07,7.1739773,6.08), effectiveness = GenerateUnitEffectiveness(5.19,4.62,4.04,3.46,3.08,6.31,2.82,6.11308425,4.5,8.06706427,3.38), effectiveness = GenerateUnitEffectiveness(1.179839,1.178659,0.588677,0.589919,1.218265016,2.646875,0.967675,0,0.984677,1.38003898,1.949218), range = UnitStatsAI.RT_Melee, name = "shuriken_cannon_vehicle", effectiveness = GenerateUnitEffectiveness(9.8875,7.75,6.6375,5.525,3.7986975,1.475,0.625,0,3.95,2.159513575,2.8375), effectiveness = GenerateUnitEffectiveness(3.75,3.78,2.78,3.75,3.155841,1.24,0.95,0,3.34,1.84473702,2.37), effectiveness = GenerateUnitEffectiveness(3.6,2.89,2.16,2.19,1.16883,3.85,2.19,2.65738725,1.44,7.11541422,0.91), range = UnitStatsAI.RT_Ranged, name = "reaper_launcher", effectiveness = GenerateUnitEffectiveness(3.77,1.39,1.09,6.41,8.467524,2.15,1.2,0,6.9,0,5.19), range = UnitStatsAI.RT_Ranged, name = "deathspinner", effectiveness = GenerateUnitEffectiveness(13.4,10.34,9.76,1.91,1.675323,1.91,0.72,0,2.19,1.37623238,3.29), range = UnitStatsAI.RT_Ranged, name = "brightlance_vehicle", effectiveness = GenerateUnitEffectiveness(2.5,1.69,0.75,1.63,0.701298,21.96,6.75,13.254129,2.11,6.16376417,1.51), effectiveness = GenerateUnitEffectiveness(0.72,0.73,0.72,0.72,0.623376,5.97,2.26,2.7339375,3.34,2.928154,1), effectiveness = GenerateUnitEffectiveness(0.33,8.91,4.455,4.95,5.94,3.3,19.695,11.91,18.02758388,6.6,23.16901853), range = UnitStatsAI.RT_Ranged, name = "scatter_laser_vehicle", effectiveness = GenerateUnitEffectiveness(3.8,2.65,2.22,2.25,3.220776,5.95,1.5,1.36696875,4,1.464077,1.89), range = UnitStatsAI.RT_None, name = "starcannon_vehicle", effectiveness = GenerateUnitEffectiveness(3.8,2.65,2.22,2.26,2.259738,9.63,3.92,4.418043,4.89,7.99386042,2.66), effectiveness = GenerateUnitEffectiveness(1.4,8.91,4.455,4.95,5.94,3.3,19.695,11.91,18.02758388,6.6,23.16901853), range = UnitStatsAI.RT_Ranged,
<race_name>buildbasestrategy.ai – The master build file for your faction that controls how it builds important things for itself to stay competitive..
You can use the "marinebuildbasestrategy.ai" file as a basic template how to get your mod working. Of important note:
attackstrategyinfo.ai – File that controls the tolerance by which the AI will retreat when overwhelmed.
Deal with \Advanced first then trickle down to \Easy..
This is generally a good script to use:
<mod name>_race =
{
--my prorate against yours before I stop attacking you and retreat
stop_attack_rating = -100,
min_units = 2,buildbasestrategyinfo.ai – Controls general build toggles, research queue, and squad demand limits.
Deal with \Advanced first then trickle down to \Easy..
Follow these values as default below:
<mod name>_race =
{
--how much requisition I have before I try to build an uber unit
uber_unit_cost = <requisition cost of your uber unit>,
--minimum amount of power before I build another generator
min_power = 100,
resourcers = 2,
--reserve this amount for building units/buildings (not for use in upgrading/ reinforcing)
req_reserve = 200,
ETA =
{
cost = 250,
},
--attack rating needs to be greater than this prorated to attack
attack_rating = 150,
--need at least this at all times
squad_cap_threshold = 2,
--need at least 3 at all times
support_cap_threshold = 3,
--tolerance attacking turrets
turret_tolerance = 200,
--used to calculate wants for engineers
Engineers =
{
--number of engineers we're aiming for
want = 2,
},
ResearchOrder =
{
<ensure your AI researches everything it needs to "IN ORDER" the AI should and be careful of missing prerequistes that
can stop the AI from researching. Also, comment out any research that the AI won't be able to use or is redundant -
a fast teching AI is always a good policy. However, include all research items your faction can research and then
later on comment out those not needed!>
},
SquadLimits =
{
standard =
{
<create your squad list based on the order you put your units in unitstats.ai (ie. Engineers first and uber last)>
},
standard2 =
{
},buildorderstrategyinfo.ai – Controls how the AI will initially build its base in the first minute of game time.
A good gamestart build order looks like this:
<mod name>_race =
{
{ "flag_capture" }, { "post_builder" },
{ "flag_capture" }, { "post_builder" },
{ "flag_capture" },
{ "squad", "<your scout unit>" },
{ "squad", "<your scout unit>" },
{ "squad", "<your builder unit>" },
{ "squad", "<your scout unit>" },
{ "building", "<your barracks building>", true },
{ "squad", "<your commander unit>", true },
{ "squad", "<your first-tier infantry unit>", true },
{ "building", "<your power generator building(if applicable)>" },infantrytactic.ai – Dictates how general infantry use special abilities
-target ability table
InfantryTactic.TargetAbilities =
{
{ nil, "<infantry anti-infantry weapon ability>", Ability.Filters.CloseInfantryEnemy },
{ nil, "<infantry anti-vehicle weapon ability>", Ability.Filters.CloseVehicleEnemy },
function InfantryTactic:DoAbilities()
--check if I can use <this ability name>
local <ability shortname>_id = cpu_manager.stats:GetAbilityID( "<actual ability name>" )
Ability.DoAbilityArea( self.squad_ai, ability shortname>_id, Ability.Filters.<check filter section below> )
if self.squad_ai:IsAttached() then
<Commander Unit>Tactic.DoAbilities( self )
function InfantryTactic:Update()
--check if I can use <this ability name>
local <ability shortname>_id = cpu_manager.stats:GetAbilityID( "<actual ability name>" )
if self.squad_ai:CanDoAbility( <ability shortname>_id ) then
self.squad_ai:DoSpecialAbility( <ability shortname>_id )
if cpu_manager.assassinate and
( self.squad_ai:HasSquadAttached( "<your commander unit>") orvehicletactic.ai – Dictates how general vehicles use special abilities
function VehicleTactic:DoAbilities() --check if I can use <this ability name> local <ability shortname>_id = cpu_manager.stats:GetAbilityID( "<actual ability name>" ) if self.squad_ai:CanDoAbility( <ability shortname>_id ) then self.squad_ai:DoSpecialAbility( <ability shortname>_id )
<specific unit>tactic.ai – Dictates how specialized units use their own special abilities not normally used by regular units.
General script format that works well is:
function <specific unit>Tactic:UpdateAbilities() if <ability shortname>_id == nil then <ability shortname>_id = cpu_manager.stats:GetAbilityID( "<actual ability name>" ) end function <specific unit>:DoAbilities() <specific unit>.UpdateAbilities( self ) dbAssert( <ability shortname>_id ~= nil ) Ability.DoAbility<SelectBehaviour>( self.squad_ai, <ability shortname>_id, Ability.Filters.<SelectFilter>, <# of enemy units nearby> )
Examples of ability scripts can be found using existing factions (a variety lumped together shown below):
function <specific unit>Tactic:UpdateAbilities()
if FarSeer.storm_id == nil then
FarSeer.storm_id = cpu_manager.stats:GetAbilityID( "eldar_psychic_storm" )
end
if FarSeer.eldritchstorm_id == nil then
FarSeer.eldritchstorm_id = cpu_manager.stats:GetAbilityID( "eldar_eldritchstorm" )
end
if FarSeer.mind_war_id == nil then
FarSeer.mind_war_id = cpu_manager.stats:GetAbilityID( "eldar_mind_war" )
end
if FarSeer.guide_id == nil then
FarSeer.guide_id = cpu_manager.stats:GetAbilityID( "eldar_guide" )
end
if FarSeer.fleetoffoot_id == nil then
FarSeer.fleetoffoot_id = cpu_manager.stats:GetAbilityID( "eldar_fleetoffoot" )
end
if MekBoy.zap_id == nil then
MekBoy.zap_id = cpu_manager.stats:GetAbilityID( "ork_tank_zappa" )
end
if ChaosLord.strength_id == nil then
ChaosLord.strength_id = cpu_manager.stats:GetAbilityID( "chaos_daemon_strength" )
end
if Sorcerer.torment == nil then
Sorcerer.torment = cpu_manager.stats:GetAbilityID( "chaos_chains_of_torment" )
end
if Sorcerer.corruption == nil then
Sorcerer.corruption = cpu_manager.stats:GetAbilityID( "chaos_corruption" )
end
if Sorcerer.doombolt_id == nil then
Sorcerer.doombolt_id = cpu_manager.stats:GetAbilityID( "chaos_doombolt" )
end
function <specific unit>Tactic:DoAbilities()
<specific unit>Tactic.UpdateAbilities( self )
dbAssert( FarSeer.storm_id ~= nil )
dbAssert( FarSeer.mind_war_id ~= nil )
dbAssert( ChaosLord.strength_id ~= nil )
dbAssert( Sorcerer.torment ~= nil )
dbAssert( Sorcerer.doombolt_id ~= nil )
dbAssert( Sorcerer.corruption ~= nil )
Ability.DoAbilityPos( self.squad_ai, FarSeer.storm_id, Ability.Filters.CloseInfantryEnemy, 6 )
Ability.DoAbilityPos( self.squad_ai, FarSeer.eldritchstorm_id, Ability.Filters.CloseEnemy, 6 )
Ability.DoAbilityTarget( self.squad_ai, FarSeer.mind_war_id, Ability.Filters.CloseCommanderEnemy )
Ability.DoAbilityTarget( self.squad_ai, FarSeer.guide_id, Ability.Filters.CloseInCombat )
Ability.DoAbilityFastMove( self.squad_ai, FarSeer.fleetoffoot_id, false )
Ability.DoAbilityTarget( self.squad_ai, MekBoy.zap_id, Ability.Filters.CloseVehicleEnemy )
Ability.DoAbility( self.squad_ai, ChaosLord.strength_id, Ability.Filters.IsInCombat )
Ability.DoAbilityPos( self.squad_ai, Sorcerer.torment, Ability.Filters.CloseEnemy, 6 )
Ability.DoAbilityPos( self.squad_ai, Sorcerer.corruption, Ability.Filters.CloseEnemy, 12 )
Ability.DoAbilityPos( self.squad_ai, Sorcerer.doombolt_id, Ability.Filters.CloseInfantryEnemy, 6 )