;*****************************
;********* csky solider 2 ***********

[logic]
active = smartcover@soldier_2_wait
relation = friend
post_combat_time = 0,0

[smartcover@soldier_2_wait]
use_in_combat = true
meet = no_meet
invulnerable = true
combat_ignore_cond = true
cover_name = red_bridge_east_smartcover_2
;cover_state = idle_target
;target_path = red_bridge_csky_smart_soldier_2_f1_fire_look
on_info = {+red_bridge_clear_path -red_bridge_bandit_time_out} smartcover@clear_path_fire
on_info2 = {+red_bridge_allyes_skirmish2} smartcover@soldier_2_cover2
on_info3 = {+red_bridge_down_done} walker@bridge_walk_work2

[smartcover@clear_path_fire]
use_in_combat = true
meet = no_meet
invulnerable = true
;combat_ignore_cond = true
cover_name = red_bridge_east_smartcover_2
cover_state = fire_target
target_path = red_bridge_csky_smart_soldier_2_f1_fire_look
on_info = {+red_bridge_allyes_skirmish2} smartcover@soldier_2_cover2
on_info2 = {=has_enemy_in_current_loopholes_fov()} smartcover@clear_path_fire2 
on_info3 = {+red_bridge_down_done} walker@bridge_walk_work2

[smartcover@clear_path_fire2]
use_in_combat = true
meet = no_meet
invulnerable = true
;combat_ignore_cond = true
cover_name = red_bridge_east_smartcover_2
;cover_state = fire_target
;target_path = red_bridge_csky_smart_soldier_2_f1_fire_look
on_info = {+red_bridge_allyes_skirmish2} smartcover@soldier_2_cover2
on_info2 = {!has_enemy_in_current_loopholes_fov()} smartcover@clear_path_fire
on_info3 = {+red_bridge_down_done} walker@bridge_walk_work2

[smartcover@soldier_2_cover2]
use_in_combat = true
meet = no_meet
invulnerable = true
combat_ignore_cond = true
cover_name = red_bridge_east_smartcover_2
on_info = {+red_bridge_down_done} walker@bridge_walk_work2
on_game_timer = 100 | {-red_bridge_bandit_time_out} smartcover@soldier_2_cover2_fire

[smartcover@soldier_2_cover2_fire]
use_in_combat = true
meet = no_meet
invulnerable = true
;combat_ignore_cond = true
cover_name = red_bridge_east_smartcover_2
target_path = red_bridge_csky_smart_soldier_2_f1_fire_look
on_info = {+red_bridge_down_done} walker@bridge_walk_work2
on_game_timer = 100 | smartcover@soldier_2_cover2

[walker@bridge_walk_work2]
;out_restr = red_bridge_csky_restr
invulnerable = true
combat_ignore_cond = always
path_walk = red_bridge_csky_smart_bridge_walk
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
on_signal = action | camper@assault_work2 %+red_bridge_cs_soldier_2_wait_1%
on_info = {+red_bridge_cs_soldier_2_wait_1} camper@assault_work2
meet = no_meet

[camper@assault_work2]
out_restr = red_bridge_attack_restr
invulnerable = true
path_walk = red_bridge_csky_smart_soldier_2_assault_walk
path_look = red_bridge_csky_smart_soldier_2_assault_look
radius = 20
no_retreat = true 
def_state_moving = assault
def_state_campering = threat
def_state_campering_fire = threat_fire
on_signal = action | remark@assault_work2
on_info = {+red_bridge_bandit_out} camper@talk_work2
on_info2 = {+red_bridge_allyes_win} camper@talk_work2
meet = no_meet

[remark@assault_work2]
out_restr = red_bridge_attack_restr
invulnerable = true
target = red_bridge_csky_smart_soldier_2_assault_look,0
anim = threat
on_game_timer = 20 | camper@talk_work2 %+red_bridge_allyes_win%
on_info = {+red_bridge_allyes_win} camper@talk_work2
meet = no_meet

[camper@talk_work2]
invulnerable = true
out_restr = red_bridge_bandit_restr
path_walk = red_bridge_csky_smart_soldier_2_talk_walk
path_look = red_bridge_csky_smart_soldier_talk_look
on_signal = action | camper@wait_talk_work_2 %+red_bridge_cs2%
on_info = {+red_bridge_cs2} camper@wait_talk_work_2

[camper@wait_talk_work_2]
invulnerable = true
out_restr = red_bridge_bandit_restr
path_walk = red_bridge_csky_smart_soldier_2_talk_walk
path_look = red_bridge_csky_smart_soldier_talk_look
on_info = {+red_bridge_finished} camper@talk2_work2

[camper@talk2_work2]
invulnerable = true
out_restr = red_bridge_bandit_restr
path_walk = red_bridge_csky_smart_soldier_2_talk_walk
path_look = red_bridge_csky_smart_soldier_talk_look
on_game_timer = 50 | {+red_bridge_csky_go_limansk} walker@bridge_guard_work2 %+red_bridge_cs_soldier_2_wait_2%
on_info = {+red_bridge_cs_soldier_2_wait_2} walker@bridge_guard_work2

[remark@talk_work2]
invulnerable = true
out_restr = red_bridge_bandit_restr
target = red_bridge_csky_smart_soldier_talk_look, 0
anim = salut_free
on_game_timer = 30 | walker@bridge_guard_work2
meet = no_meet

[walker@bridge_guard_work2]
out_restr = red_bridge_bandit_restr
path_walk = red_bridge_csky_smart_soldier_2_guard_walk
path_look = red_bridge_csky_smart_soldier_2_guard_look
meet = no_meet
;on_info = {=dist_to_actor_ge(150) !actor_see_npc} %=destroy_object%