[danger@esc_assault]
ignore_distance = 0

[wounded@esc_assault]
hp_cover = 0|false ;--/ запрет прятаться в каверы

[combat_ignore@esc_assault]

[threshold@esc_assault]
max_ignore_distance = 3

[meet@esc_assault_petruha_wait]
meet_state		= 25|hello |5|nil
meet_state_wpn	= 25|hello |5|nil
victim		= 25|actor
victim_wpn		= 25|actor
use			= true
use_wpn		= true
;syndata		= backoff@threat_weap
meet_dialog	= esc_rangers_dialog

;-- **************** STATE 0 ***********************

[logic@esc_assault_petruha_off]
active = remark@esc_assault_petruha_off
combat_ignore = combat_ignore@esc_assault

[remark@esc_assault_petruha_off]
path_walk = off_point1
combat_ignore_cond = always
danger = danger@esc_assault
threshold = threshold@esc_assault

[logic@esc_assault_ranger1_off]
active = remark@esc_assault_ranger1_off
combat_ignore = combat_ignore@esc_assault

[remark@esc_assault_ranger1_off]
path_walk = off_point2
combat_ignore_cond = always
threshold = threshold@esc_assault
danger = danger@esc_assault

[logic@esc_assault_ranger2_off]
active = remark@esc_assault_ranger2_off
combat_ignore = combat_ignore@esc_assault

[remark@esc_assault_ranger2_off]
path_walk = off_point3
threshold = threshold@esc_assault
combat_ignore_cond = always
danger = danger@esc_assault

;-- **************** STATE 1 ***********************

[logic@esc_assault_petruha_wait]
active = camper@esc_assault_petruha_wait
combat_ignore = combat_ignore@esc_assault
threshold = threshold@esc_assault

[camper@esc_assault_petruha_wait]
path_walk = petruha_wait
path_look = petruha_wait_look
danger = danger@esc_assault
meet = meet@esc_assault_petruha_wait
def_state_standing  = guard
invulnerable =  true
on_info = {+esc_assault_go1} remark@esc_assault_petruha
on_info2 = {=dist_to_actor_le(3)} remark@esc_assault_petruha_near_wait
on_info3 = {=is_npc_online} camper@esc_assault_petruha_good
on_info4 = {+esc_talked_with_wolf} camper@esc_assault_petruha_good
on_info5 = {+scene_end} camper@esc_assault_petruha_good

[camper@esc_assault_petruha_good]
path_walk = petruha_wait
path_look = petruha_wait_look
danger = danger@esc_assault
meet = meet@esc_assault_petruha_wait
def_state_standing  = guard
invulnerable = false
on_info = {+esc_assault_go1} remark@esc_assault_petruha
on_info2 = {=dist_to_actor_le(3)} remark@esc_assault_petruha_near_wait
on_info3 = {!is_npc_online -esc_talked_with_wolf -scene_end} camper@esc_assault_petruha_wait

[remark@esc_assault_petruha_near_wait]
danger = danger@esc_assault
meet = meet@esc_assault_petruha_wait
target = actor
on_info = {+esc_assault_go1} remark@esc_assault_petruha
on_info2 = {=dist_to_actor_ge(10)} camper@esc_assault_petruha_wait

[remark@esc_assault_petruha]
anim = ward
snd = esc_assault_raid
meet = no_meet
target = esc_assault_walker_look, 0
combat_ignore_cond = {!fighting_actor}
danger = danger@esc_assault
on_signal = sound_end| %+esc_assault_talked_petruha =smart_terrain_force_update(esc_assault)%

[logic@esc_assault_ranger1_wait]
active = kamper@esc_assault_ranger1_wait
combat_ignore = combat_ignore@esc_assault

;--for test
[kamper@esc_assault_ranger1_wait]
kamp_name = campfire_01
path_walk = walker_wait1
path_look = walker_look
danger = danger@esc_assault
threshold = threshold@esc_assault
invulnerable = true
on_info = {=is_npc_online} kamper@esc_assault_ranger1_good
on_info2 = {+esc_talked_with_wolf} kamper@esc_assault_ranger1_good
on_info3 = {+scene_end} kamper@esc_assault_ranger1_good

[kamper@esc_assault_ranger1_good]
kamp_name = campfire_01
path_walk = walker_wait1
path_look = walker_look
danger = danger@esc_assault
threshold = threshold@esc_assault
invulnerable = false
on_info = {!is_npc_online -esc_talked_with_wolf -scene_end} kamper@esc_assault_ranger1_wait

[logic@esc_assault_ranger2_wait]
active = kamper@esc_assault_ranger2_wait
combat_ignore = combat_ignore@esc_assault

[kamper@esc_assault_ranger2_wait]
kamp_name = campfire_01
path_walk = walker_wait2
path_look = walker_look2
danger = danger@esc_assault
threshold = threshold@esc_assault
invulnerable = true
on_info = {=is_npc_online} kamper@esc_assault_ranger2_good
on_info2 = {+esc_talked_with_wolf} kamper@esc_assault_ranger2_good
on_info3 = {+scene_end} kamper@esc_assault_ranger2_good

[kamper@esc_assault_ranger2_good]
kamp_name = campfire_01
path_walk = walker_wait2
path_look = walker_look2
danger = danger@esc_assault
threshold = threshold@esc_assault
invulnerable = false
on_info = {!is_npc_online -esc_talked_with_wolf -scene_end} kamper@esc_assault_ranger2_wait

;-- **************** STATE 2 ***********************

[danger@esc_assault_approaching]
ignore_distance = 0
ignore_distance_corpse = 0
ignore_ distance_sound = 0

[logic@esc_assault_petruha_approaching]
active = walker@esc_assault_petruha_approaching
combat_ignore = combat_ignore@esc_assault
threshold = threshold@esc_assault

[walker@esc_assault_petruha_approaching]
path_walk = fight_walk1
path_look = fight_walk1_look
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
team = esc_rangers
on_signal = wait | remark@esc_assault_petruha_wait2

[remark@esc_assault_petruha_wait2]
anim = binocular
target = esc_assault_wait_point1_look, 0
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
on_info = {+scene_end} walker@esc_assault_petruha_approaching2

[walker@esc_assault_petruha_approaching2]
path_walk = apprach1
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
team = esc_rangers
on_signal = reached | %+esc_assault_go2%
on_info = {+esc_assault_go2} %=smart_terrain_force_update(esc_assault)%

[logic@esc_assault_ranger1_approaching]
active = walker@esc_assault_ranger1_approaching
combat_ignore = combat_ignore@esc_assault
threshold = threshold@esc_assault

[walker@esc_assault_ranger1_approaching]
path_walk = fight_walk2
path_look = fight_walk2_look
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
team = esc_rangers
on_signal = wait | remark@esc_assault_ranger1_wait2

[remark@esc_assault_ranger1_wait2]
anim = caution
target = esc_assault_wait_point2_look, 0
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
on_info = {+scene_end} walker@esc_assault_ranger1_approaching2

[walker@esc_assault_ranger1_approaching2]
path_walk = apprach2
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
team = esc_rangers
on_signal = reached | %+esc_assault_go2%
;on_info = {+esc_assault_go2} %=smart_terrain_force_update(esc_assault)%

[logic@esc_assault_ranger2_approaching]
active = walker@esc_assault_ranger2_approaching
combat_ignore = combat_ignore@esc_assault
threshold = threshold@esc_assault

[walker@esc_assault_ranger2_approaching]
path_walk = fight_walk3
path_look = fight_walk3_look
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
team = esc_rangers
on_signal = wait | remark@esc_assault_ranger2_wait2

[remark@esc_assault_ranger2_wait2]
anim = caution
target = esc_assault_wait_point3_look, 0
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
on_info = {+scene_end} walker@esc_assault_ranger2_approaching2

[walker@esc_assault_ranger2_approaching2]
path_walk = apprach3
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_approaching
combat_ignore_cond = {!fighting_actor}
team = esc_rangers
on_signal = reached | %+esc_assault_go2%
;on_info = {+esc_assault_go2} %=smart_terrain_force_update(esc_assault)%

;-- **************** STATE 3 ***********************

[danger@esc_assault_fight]
ignore_distance = 0
ignore_distance_corpse = 0

[logic@esc_assault_petruha_fight]
active = walker@esc_assault_petruha_fight
combat_ignore = combat_ignore@esc_assault

[walker@esc_assault_petruha_fight]
path_walk = fight_walk1a
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_fight
wounded = wounded@esc_assault
;on_info = {+esc_factory_cleaned} %=smart_terrain_force_update(esc_assault) =smart_terrain_force_update(esc_stalker_factory)%

[logic@esc_assault_ranger1_fight]
active = walker@esc_assault_ranger1_fight
combat_ignore = combat_ignore@esc_assault

[walker@esc_assault_ranger1_fight]
path_walk = fight_walk2a
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_fight
wounded = wounded@esc_assault

[logic@esc_assault_ranger2_fight]
active = walker@esc_assault_ranger2_fight
combat_ignore = combat_ignore@esc_assault

[walker@esc_assault_ranger2_fight]
path_walk = fight_walk3a
def_state_moving1 = assault
def_state_moving2 = assault
def_state_moving3 = assault
meet = no_meet
danger = danger@esc_assault_fight
wounded = wounded@esc_assault

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

[combat_ignore@nimble]

[danger@nimble]
ignore_distance          = 10
ignore_distance_grenade  = 10
ignore_distance_corpse   = 10
ignore_distance_hit      = 50
ignore_distance_sound    = 10
danger_inertion_time_grenade = 5
danger_inertion_time_corpse  = 5
danger_inertion_time_hit     = 5
danger_inertion_time_sound   = 5

[threshold@nimble]
max_ignore_distance = 10
ignore_monster = 0

[hit@esc_assault_nimble]
on_info = {=hit_by_actor} %=disable_invulnerability%

[logic@esc_assault_nimble]
active = walker@esc_assault_nimble00
combat_ignore = combat_ignore@nimble
threshold = threshold@nimble
on_hit = hit@esc_assault_nimble
on_death = death@nimble

[death@nimble]
on_info = %+esc_nimble_dead%

[walker@esc_assault_nimble00]
path_walk = nimble_walk00
path_look = nimble_look00
threshold = threshold@nimble
meet = meet@nimble0
combat_ignore_cond = always
on_info = {+nimble_second_talk -esc_nimble_vpered} walker@esc_assault_nimble0
on_info2 = {+esc_nimble_item1_done} kamper@esc_assault_nimble1 
on_info3 = {-esc_nimble_item1_done +esc_nimble_item1_have} walker@esc_assault_nimble4
on_info4 = {-esc_nimble_item1_have +esc_nimble_sleep} sleeper@esc_assault_nimble0
on_info5 = {+esc_nimble_after_talk -esc_nimble_sleep} walker@esc_assault_nimble3
on_info6 = {-esc_nimble_after_talk +esc_nimble_done} walker@esc_assault_nimble2
on_info7 = {+esc_nimble_vpered -esc_nimble_done} walker@esc_assault_nimble1

[walker@esc_assault_nimble0]
path_walk = nimble_walk0
path_look = nimble_look0
threshold = threshold@nimble
combat_ignore_cond = always
on_info = {+esc_nimble_vpered} walker@esc_assault_nimble1

[walker@esc_assault_nimble1]
path_walk = nimble_walk1a
path_look = nimble_look1
meet = no_meet
threshold = threshold@nimble
danger = danger@nimble
on_signal = done| walker@esc_assault_nimble2 %+esc_nimble_done%

[walker@esc_assault_nimble2]
path_walk = nimble_walk1
path_look = nimble_look1
threshold = threshold@nimble
danger = danger@nimble
on_info = {+esc_nimble_after_talk} walker@esc_assault_nimble3

[walker@esc_assault_nimble3]
path_walk = nimble_walk2
meet = no_meet
danger = danger@nimble
threshold = threshold@nimble
def_state_moving1 = run
def_state_moving2 = run
def_state_moving3 = run
invulnerable = true
on_signal = sleep| sleeper@esc_assault_nimble0 %+esc_nimble_sleep%
on_info = {+esc_nimble_sleep} sleeper@esc_assault_nimble0

[sleeper@esc_assault_nimble0]
path_main = nimble_sleep
wakeable = false
invulnerable = false
on_info = {+esc_nimble_item1_have} walker@esc_assault_nimble4

[walker@esc_assault_nimble4]
path_walk = nimble_walk3
path_walk = nimble_look3
danger = danger@nimble
threshold = threshold@nimble
on_signal = cache|%+esc_nimble_item1_talk%
invulnerable = true
on_info = {+esc_nimble_item1_done} kamper@esc_assault_nimble1
on_actor_dist_ge_nvis = 80|kamper@esc_assault_nimble1 %+esc_nimble_item1_done%

[kamper@esc_assault_nimble1]
path_walk = nimble_kamp_walk
path_look = nimble_kamp_look
kamp_name = kamp1
invulnerable = false

[meet@nimble0]
use_wpn = true
trade_enable = false