// ******************************************************************************************
// RangeSupportAttack
// 4 teams, 2 ranged and 2 strong. The ranged sit on the flanks and the strong move about in middle
// teasing the enemy to come near
// ******************************************************************************************
STRATEGY

DESCRIPTION
name=RangeSupportAttackT6
frequency=2
mintech=6
maxtech=6
house=all
losses=100
reactive=0
ENDDESCRIPTION

// The TEAMS:
TEAM
name rangeteam1
teamtype AllRangeWeapons
minunits 4
maxunits 8
ENDTEAM

TEAM
name rangeteam2
teamtype AllRangeWeapons
minunits 4
maxunits 8
ENDTEAM

TEAM
name strongteam1
teamtype strong
minunits 3
maxunits 10
ENDTEAM

TEAM
name strongteam2
teamtype strong
minunits 3
maxunits 10
ENDTEAM

// The TARGET:
TARGET
name enemy
targettype any
ENDTARGET

STAGING
name stagNear
relative enemy
stagingtype front
distance medium
threat mediumthreat
ENDSTAGING

STAGING
name stagFar
relative enemy
stagingtype front
distance far
threat mediumthreat
ENDSTAGING

STAGING
name stagVeryNear
relative enemy
stagingtype front
distance near
threat highthreat
ENDSTAGING

STAGING
name sf1
relative stagFar
stagingtype lflank
distance near
threat highthreat
ENDSTAGING

STAGING
name sf2
relative stagFar
stagingtype rflank
distance near
threat highthreat
ENDSTAGING

STAGING
name sn1
relative stagNear
stagingtype lflank
distance near
threat highthreat
ENDSTAGING

STAGING
name sn2
relative stagNear
stagingtype rflank
distance near
threat highthreat
ENDSTAGING

// In this step we prepare by moving ranged teams out to sides with strong in middle
// STEP 0
STEP

SEND
who rangeteam1
destination sf1
route lowthreat
encounter attack
endstate attack
ENDSEND

SEND
who rangeteam2
destination sf2
route lowthreat
encounter attack
endstate attack
ENDSEND

SEND
who strongteam1
destination stagFar
route lowthreat
encounter attack
endstate attack
ENDSEND

SEND
who strongteam2
destination stagFar
route lowthreat
encounter attack
endstate attack
ENDSEND

ENDSTEP

// In this step we keep the shape but move closer to enemy
// we can engage enemy from this move onward
// STEP 1
STEP

SEND
who strongteam1
destination stagNear
route lowthreat
encounter attack
endstate attack
ENDSEND

SEND
who strongteam2
destination stagNear
route lowthreat
encounter attack
endstate attack
ENDSEND

SEND
who rangeteam1
destination sn1
route lowthreat
encounter attack
endstate attack
ENDSEND

SEND
who rangeteam2
destination sn2
route lowthreat
encounter attack
endstate attack
ENDSEND

ENDSTEP

// If here without engaging just loop
// STEP 2
STEP
WAIT
ticks 400
ENDWAIT
ENDSTEP

// STEP 3
// Move one of the strong teams forward a bit but do not engage
// try to draw enemy out
STEP
SEND
who strongteam1
destination stagVeryNear
route quickest
encounter avoid
endstate avoid
ENDSEND
ENDSTEP

// STEP 4
STEP
GOTO
value 1
ENDGOTO
ENDSTEP

// and thats your lot
ENDSTRATEGY
