[logic@zat_b5_stalker_3]
active = walker
suitable = {=check_npc_name(zat_b5_stalker_3) -zat_b5_task_end}
prior = 100
on_hit = hit
post_combat_time = 0,0
on_death = death

[walker]
path_walk = zat_b5_stalker_3_walker_1_walk
path_look = zat_b5_stalker_3_walker_1_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = assault
meet = no_meet
on_info = {+zat_b5_actor_with_bandits} walker@start_bandit %=actor_enemy%
on_info2 = {+zat_b5_actor_with_dealer} walker@start_bandit %=actor_enemy% ;walker@start %=actor_enemy%
on_info3 = {+zat_b5_actor_with_stalkers} walker@start_stalker
combat_ignore_cond =  {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

;---------------çà áàíäèòîâ---------------------
[walker@start_bandit]
path_walk = zat_b5_stalker_3_b_walker_1_walk
path_look = zat_b5_stalker_3_b_walker_1_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = sneak_run
on_info = {+zat_b5_actor_bandit_go_to_trader} walker@start_bandit_2 %=actor_enemy%
on_info2 = {+zat_b5_meat} walker@fight ;{-zat_b5_actor_with_stalkers =actor_see_npc =see_actor} walker@fight %+zat_b5_meat%, {=hit_by_actor} walker@fight %+zat_b5_meat%,
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer:actor)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@start_bandit_2]
path_walk = zat_b5_stalker_3_b_walker_2_walk
path_look = zat_b5_stalker_3_b_walker_2_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = sneak_run
on_signal = st_walk_3 | walker@start_bandit_3
on_info = {+zat_b5_meat} walker@fight ;{-zat_b5_actor_with_stalkers =actor_see_npc =see_actor} walker@fight %+zat_b5_meat%, {=hit_by_actor} walker@fight %+zat_b5_meat%,
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer:actor)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@start_bandit_3]
path_walk = zat_b5_stalker_3_b_walker_3_walk
path_look = zat_b5_stalker_3_b_walker_3_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = sneak_run
on_info = {+zat_b5_dealer_speak_2_done} walker@start_bandit_4
on_info2 = {+zat_b5_meat} walker@fight ;{-zat_b5_actor_with_stalkers =actor_see_npc =see_actor} walker@fight %+zat_b5_meat%, {=hit_by_actor} walker@fight %+zat_b5_meat%,
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer:actor)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@start_bandit_4]
path_walk = zat_b5_stalker_3_b_walker_4_walk
path_look = zat_b5_stalker_3_b_walker_4_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = sneak_run
;on_game_timer = 40 | walker@fight
on_info = {+zat_b5_meat} walker@fight
on_actor_dist_le = 6 | walker@fight
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer:actor)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@fight]
path_walk = zat_b5_bandit_3_walker_2_walk
path_look = zat_b5_bandit_3_walker_2_look
out_restr = zat_b5_smart_terrain_attack
combat_ignore_cond = {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
meet = no_meet
;wounded = wounded
;gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

;----------------------çà ñòàëêåðîâ------------------ 
[walker@start_stalker]
path_walk = zat_b5_stalker_3_walker_1_walk
path_look = zat_b5_stalker_3_walker_1_look
out_restr = zat_b5_stalkers_start_out_restr
def_state_moving1 = assault
def_state_standing = guard_na
meet = no_meet
on_info = {+zat_b5_actor_stalker_go_to_trader} walker@stalker_timer_go_to_position
;on_info2 = {+zat_b5_meat} walker@stalker_fight
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@stalker_timer_go_to_position]
path_walk = zat_b5_stalker_3_walker_1_walk
path_look = zat_b5_stalker_3_walker_1_look
out_restr = zat_b5_stalkers_start_out_restr
def_state_moving1 = assault
def_state_standing = guard_na
on_game_timer = 20 | walker@stalker_go_to_position
on_info = {+zat_b5_meat} walker@stalker_fight
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@stalker_go_to_position]
path_walk = zat_b5_stalker_3_walker_2_walk
path_look = zat_b5_stalker_3_walker_2_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = assault
def_state_standing = guard_na
on_signal = st_3_walk_2 | walker@stalker_go_to_position_3
on_info = {+zat_b5_meat} walker@stalker_fight
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@stalker_go_to_position_3]
path_walk = zat_b5_stalker_3_walker_21_walk
path_look = zat_b5_stalker_3_walker_21_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = sneak_run
on_signal = st_1_walk_21 | walker@stalker_go_to_position_4
on_info = {+zat_b5_meat} walker@stalker_fight
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@stalker_go_to_position_4]
path_walk = zat_b5_stalker_3_walker_22_walk
path_look = zat_b5_stalker_3_walker_22_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = sneak_run
on_signal = st_1_walk_22 | walker@stalker_go_to_position_5
on_info = {+zat_b5_meat} walker@stalker_fight
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@stalker_go_to_position_5]
path_walk = zat_b5_stalker_3_walker_22_walk
path_look = zat_b5_stalker_3_walker_22_look
;out_restr = zat_b5_dolg_trader_1_defence
def_state_moving1 = assault
;on_info = {+zat_b5_meat} camper@fight
on_info = {+zat_b5_stalker_attack_dealer} walker@stalker_fight
meet = no_meet
combat_ignore_cond = {=check_enemy_name(zat_b5_dealer_assistant:zat_b7_duty_illicit_dealer:zat_b5_actor_with_bandits:zat_b5_actor_with_dealer)} true, {=check_enemy_name(zat_b5_stalker_raider:zat_b7_bandit_boss)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
danger = danger
;wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[camper@fight]
path_walk = zat_b5_stalker_3_camper_1_walk
path_look = zat_b5_stalker_3_camper_1_look
on_signal = stalker_1_cam_end | walker@stalker_fight
on_game_timer = 100 | walker@stalker_fight
def_state_moving1 = sneak_run
def_state_moving_fire = sneak_fire
radius = 5 
no_retreat = true 
meet = no_meet
;wounded = wounded
;gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
combat_ignore_cond = {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true

[walker@stalker_fight]
path_walk = zat_b5_bandit_3_walker_2_walk
path_look = zat_b5_bandit_3_walker_2_look
out_restr = zat_b5_smart_terrain_attack
meet = no_meet
on_info = {+zat_b5_actor_help_stalkers} walker@stalker_after_fight
;wounded = wounded
;gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
combat_ignore_cond = {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true

[walker@stalker_after_fight]
path_walk = walker_2_walk
path_look = walker_2_look
out_restr = zat_b5_smart_terrain_attack
meet = no_meet
;wounded = wounded
gather_items_enabled = false
;help_wounded_enabled = false
corpse_detection_enabled = false
combat_ignore_cond = {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true



[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

[meet]
close_distance = 0
close_victim = nil
use = false
snd_on_use = {=actor_enemy} nil, {=has_enemy} meet_use_no_fight, {!has_enemy} zat_b5_stalkers_refuse_talk 
                                              
[danger]
ignore_distance = 0

[hit]
on_info = {=hit_by_actor -zat_b5_stalker_hit} %+zat_b5_stalker_hit +zat_b5_meat%, {-zat_b5_meat +zat_b5_actor_stalker_go_to_trader} %+zat_b5_meat%

[death] 
on_info = %=inc_counter(stalker_death)%