[walker@generic]
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
wounded = wounded

;----------------------------------------------------------------------------------------------------------

[logic@pri_a17_military_captain_tarasov]
suitable = {-pri_a17_actor_leaver  =check_npc_name(pri_a17_military_captain_tarasov)} true
prior = 70
active = walker@firstmeet
on_death = death
on_combat = combat
post_combat_time = 0, 0
known_info = known_info

[walker@firstmeet]:walker@generic
path_walk = taras_stay_idle
path_look = taras_look_idle
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {+pri_a17_mon_ambush_killed +pri_a17_actor_has_gauss_rifle -pri_a17_actor_attack_military} walker@safe, {+pri_a17_patrol_dead} walker@squad_go_check, walker@teleported
on_info2 = {+pri_a17_teleport_step_1 -pri_a17_taras_teleported} % +pri_a17_taras_teleported =teleport_npc(pri_a17_taras_go1)%
meet = no_meet
combat_ignore_cond = true
combat_ignore_keep_when_attacked = true
invulnerable = true

[walker@teleported]:walker@generic
path_walk = taras_stay_idle
path_look = taras_look_idle
def_state_standing = talk_default
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_game_timer = 50 | {=dist_to_actor_le(5) -pri_a17_taras_give_orders_1} remark@give_orders %+pri_a17_taras_give_orders_1 =play_sound(pri_a17_recon_squad_commander_order_hide1)%
meet = no_meet

[remark@give_orders]:walker@generic
target = story | actor
anim = idle
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_game_timer = 32 | walker@sneak 
meet = no_meet

[walker@sneak]:walker@generic
path_walk = taras_go1
path_look = taras_golook1
def_state_moving1 = assault 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {=npc_in_zone(pri_a17_squad_follow)} %+pri_a17_squad_go_1%
on_signal = at_position | walker@get_at_pos 
meet = no_meet

[walker@get_at_pos]:walker@generic
path_walk = taras_attack
path_look = taras_pat_look 
def_state_moving1 = assault
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {=npc_in_zone(pri_a17_taras_hide_cover_zone) !actor_enemy} smartcover@ready_to_attack %+pri_a17_recon_go =play_sound(pri_a17_recon_squad_commander_order_hide2) +pri_a17_patrol_go%
meet = no_meet

[smartcover@ready_to_attack]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = idle_target
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {!actor_in_zone(pri_a17_hosp_square) =npc_in_zone(pri_a17_taras_cover_2_zone)} smartcover@ready_to_attack1 
on_info2 = {+pri_a17_mon_atk} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
meet = no_meet
in_restr = pri_a17_val_chek_fight_zone

[smartcover@ready_to_attack1]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = idle_target 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {+pri_a17_mon_atk} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
on_info2 = {+pri_a17_mon_pat_sound1 !is_playing_sound !actor_enemy} %=play_sound(pri_a17_recon_squad_attack_now_)%
on_info3 = {-pri_a17_mon_pat_sound1 !actor_in_zone(pri_a17_hosp_build_1)} smartcover@ready_to_attack1_actor_dont_hide,  {-pri_a17_mon_pat_sound1 =actor_in_zone(pri_a17_backoff)} smartcover@ready_to_attack1_actor_dont_hide
on_signal = sound_end | {+pri_a17_mon_pat_sound1} smartcover@ready_to_attack2 
meet = no_meet

[smartcover@ready_to_attack1_actor_dont_hide]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = idle_target 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {=actor_in_zone(pri_a17_monolith_attack_zone) !actor_enemy} %=play_sound(pri_a17_recon_squad_actor_dont_hide)%, {=actor_in_zone(pri_a17_backoff) !actor_enemy} %=play_sound(pri_a17_recon_squad_actor_dont_hide)%, smartcover@ready_to_attack1
on_signal = sound_end | smartcover@ready_to_attack1
meet = no_meet

[smartcover@ready_to_attack2]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = idle_target 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {+pri_a17_mon_atk} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
on_info2 = {+pri_a17_mon_pat_sound2 !is_playing_sound !actor_enemy} %=play_sound(pri_a17_recon_squad_attack_now_)%
on_signal = sound_end | smartcover@ready_to_attack3 
meet = no_meet

[smartcover@ready_to_attack3]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = idle_target 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {+pri_a17_mon_atk} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
on_info2 = {+pri_a17_mon_pat_sound3 !is_playing_sound !actor_enemy} %=play_sound(pri_a17_recon_squad_commander_ready_to_fire)%
on_signal = sound_end | smartcover@ready_to_attack4 
meet = no_meet

[smartcover@ready_to_attack4]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = lookout_target 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {+pri_a17_mon_atk} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
on_info2 = {+pri_a17_mon_pat_sound4 !is_playing_sound !actor_enemy} %=play_sound(pri_a17_recon_squad_attack_now_)%
on_signal = sound_end | smartcover@ready_to_attack5 
meet = no_meet

[smartcover@ready_to_attack5]:walker@generic
cover_name = pri_a17_taras_ready_to_attack
cover_state = lookout_target 
combat_ignore_cond = {=fighting_dist_ge (15)} true
on_info = {+pri_a17_mon_atk} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
on_info2 = {+pri_a17_mon_pat_sound5 !is_playing_sound !actor_enemy} %=play_sound(pri_a17_recon_squad_attack_now_)%
on_info4 =  {+pri_a17_atk_mon_pat} camper@attack %=make_enemy(pri_a17_monolith_patrol_lead)%
on_signal = sound_end | camper@attack 
meet = no_meet

[camper@attack]:walker@generic
path_walk = taras_attack;_2
path_look = taras_pat_look
def_state_moving1 = assault
def_state_campering = threat_na
def_state_campering_fire = threat_fire
no_retreat = true 
on_info =  {+pri_a17_patrol_dead} walker@go_check_1
on_info2 = {+pri_a17_ice_dead} remark@taras_shocked
on_info3 = {+pri_a17_good_shot -pri_a17_nice_tar_end !is_playing_sound} %=play_sound(pri_a17_recon_squad_nice_shoot)%
on_info4 = {=health_le(0.99) !actor_enemy} %=restore_health% 
on_signal = sound_end | %+pri_a17_nice_tar_end%
out_restr = pri_a17_taras_attack_fight_zone
meet = no_meet
combat_ignore_cond = {=check_enemy_name(pri_a17_monolith_preacher)} true

[walker@go_check_1]:walker@generic
path_walk = taras_attack
path_look = taras_pat_look
def_state_standing = caution
on_game_timer = 55 | {-pri_a17_ord_tar_end !is_playing_sound} %+pri_a17_ord_tar_end =play_sound(pri_a17_recon_squad_order_to_check)%
on_signal = sound_end | {+pri_a17_ord_tar_end} walker@go_check_2 %+pri_a17_squad_move%
on_info = {+pri_a17_ice_dead -pri_a17_taras_shock_sound} remark@taras_shocked %+pri_a17_taras_shock_sound =play_sound(pri_a17_recon_squad_monolith_ambush)%, {+pri_a17_ice_dead} remark@taras_shocked
meet = no_meet
combat_ignore_cond = {=fighting_dist_ge (25)} true, {=check_enemy_name(pri_a17_monolith_preacher)} true

[walker@go_check_2]:walker@generic
path_walk = taras_chek_stay
path_look = taras_chek_look
def_state_moving1 = assault
on_info = {+pri_a17_ice_dead -pri_a17_taras_shock_sound} remark@taras_shocked %+pri_a17_taras_shock_sound =play_sound(pri_a17_recon_squad_monolith_ambush)%, {+pri_a17_ice_dead} remark@taras_shocked, {=npc_in_zone(pri_a17_taras_check_zone)} walker@squad_go_check 
meet = no_meet
combat_ignore_cond = {=fighting_dist_ge (20)} true, {=check_enemy_name(pri_a17_monolith_preacher)} true

[walker@squad_go_check]:walker@generic
path_walk = taras_chek_sit
path_look = taras_chek_look
def_state_moving1 = assault
on_info = {+pri_a17_get_in_cover} walker@defend, {+pri_a17_ice_dead -pri_a17_taras_shock_sound} remark@taras_shocked %+pri_a17_taras_shock_sound =play_sound(pri_a17_recon_squad_monolith_ambush)%, {+pri_a17_ice_dead} remark@taras_shocked
meet = no_meet
combat_ignore_cond = {=fighting_dist_ge (20)} true, {=check_enemy_name(pri_a17_monolith_preacher)} true

[remark@taras_shocked]:walker@generic
anim = bloodsucker_search
target = path | pri_a17_taras_chek_look, 0
on_signal = anim_end | walker@defend %+pri_a17_get_in_cover%
on_info = {=health_le(0.99) !actor_enemy} %=restore_health% 
combat_ignore_cond = true
combat_ignore_keep_when_attacked = true
meet = no_meet

[walker@defend]:walker@generic
path_walk = taras_chek_fight
path_look = taras_pat_look
out_restr = pri_a17_taras_chek_fight_zone
on_info = {=counter_greater(pri_a17_monolith_amb_death:11) !squad_has_enemy(pri_a17_recon_squad) +pri_a17_actor_has_gauss_rifle} walker@safe, {+pri_a17_mon_ambush_killed} walker@safe 
on_game_timer = 170 | {!actor_enemy} %=play_sound(pri_a17_recon_squad_sniper_out)%
on_info2 = {=health_le(0.5) !actor_enemy} %=restore_health% 
on_info3 = {=actor_in_zone(pri_a17_hosp_build_1)} %+pri_a17_in_cover%
def_state_moving1 = assault 
meet = no_meet
combat_ignore_cond = {=check_enemy_name(pri_a17_monolith_preacher)} true

[walker@safe]:walker@generic
path_walk = taras_chek_fight
path_look = taras_chek_look
on_info = {+pri_a17_actor_has_gauss_rifle !is_playing_sound !actor_enemy !has_enemy} %=play_sound(pri_a17_recon_squad_after_monolith_clear)%
on_signal = sound_end | walker@fintalk
meet = meet@get_f_gauss

[meet@get_f_gauss]
meet_dialog	    = pri_a17_military_recon_squad_after_scene_dialog 
trade_enable	= false
close_distance  = 15
close_anim      = guard
close_victim    = actor
abuse           = false
use 			= true

[walker@fintalk]:walker@generic
path_walk = taras_final_talk
path_look = taras_final_look
on_info = {+pri_a17_val_fin_talk_end !is_playing_sound  !actor_enemy} %=play_sound(pri_a17_recon_squad_commander_to_prapor)%, {+pri_a17_val_dead} patrol@home, {=dist_to_actor_ge(140)} patrol@home %+pri_a17_go_home%
on_signal = sound_end |  patrol@home %+pri_a17_go_home%
meet = no_meet

[patrol@home]:walker@generic
path_walk = patrol_home
commander = true
formation = back
on_signal = path_end | walker@base_1
on_info = {=npc_in_zone(pri_a16_sr_noweap)} walker@base
meet = no_meet
out_restr = pri_a16_sr_noweap
def_state_moving = assault

[walker@base]:walker@generic
path_walk = taras_base_stay
path_look = taras_base_look
def_state_standing = wait
on_info = {=squad_in_zone_all(pri_a17_recon_squad:pri_surge_hide_a16) =check_smart_alarm_status(zat_stalker_base_smart:normal)} %+pri_a17_at_home =set_squad_neutral_to_actor(pri_a17_recon_squad)%
out_restr = pri_a16_sr_noweap

;-------------------------------------------------------------

[wounded]
hp_state 		= 0|wounded_heavy@help_heavy
hp_state_see 	= 0|wounded_heavy@help_heavy
hp_victim 		= 0|nil
hp_fight 		= 0|false
hp_cover		= 0|false

[combat]
on_info = {=actor_enemy} %+pri_a17_actor_attack_military%

[death]
on_info = {=killed_by_actor =squad_exist(pri_a17_recon_squad)} %+pri_a17_actor_attack_military +pri_a17_taras_dead =set_squad_enemy_to_actor(pri_a17_recon_squad) =stop_sound%, %+pri_a17_taras_dead =stop_sound%

[known_info]
pri_a17_taras_is_dead

;-------------------------------------------����� ������ �����--------------------------------------------
[logic@pri_a17_military_captain_tarasov_dead]
suitable = {+pri_a17_actor_leaver  =check_npc_name(pri_a17_military_captain_tarasov)} true
prior = 70
active = walker@taras_dead
on_death = death
on_combat = combat
post_combat_time = 0, 0
known_info = known_info

[walker@taras_dead]:walker@generic
path_walk = taras_dead
on_info = walker@taras_dead_2 %=teleport_npc(pri_a17_taras_dead)%
meet = no_meet

[walker@taras_dead_2]:walker@generic
path_walk = taras_dead
on_game_timer = 20 | walker@taras_dead_3 %=hit_npc(self:pri_a17_mon_sni_3:bip01_head:1:23)%

[walker@taras_dead_3]:walker@generic
path_walk = taras_dead
on_game_timer = 5 | nil %=kill_npc%
