[logic@val_escort_guard]
active          = patrol@val_escort_guard_wait
on_death        = death@val_escort_guard
on_hit          = hit@val_escort_guard
on_combat       = combat@val_escort_guard
corpse_detection_profile = quest

[death@val_escort_guard]
on_info     = %=val_escort_guard_death%

[hit@val_escort_guard]
on_info     = %=val_escort_guard_hit%

[combat@val_escort_guard]
on_info     = %=val_escort_guard_combat%

[danger@val_escort_guard]
ignore_distance_corpse          = 0
ignore_distance_sound          = 30
danger_inertion_time_sound      = 5000
danger_inertion_time_hit        = 7000
danger_inertion_time_ricochet   = 4000

;--------------------------------------------------------------------------
; wait for scene start
;--------------------------------------------------------------------------
[patrol@val_escort_guard_wait]
path_walk           = captive_wait_walk
path_look           = captive_wait_look
animation           = guard
on_info             = {+val_escort_start}           follower@val_escort_guard_walk ;patrol
on_info2            = {+val_escort_combat}          remark@val_escort_guard_fight
on_info3            = {+val_escort_captive_dead}    patrol@val_escort_guard_free
;on_info3            = {+val_escort_captive_enemy}   remark@val_escort_guard_free
danger              = danger@val_escort_guard
combat_ignore_cond  = {=check_fighting(400) -val_escort_captive_enemy}
tolerant			= monster

;--------------------------------------------------------------------------
; escort captive
;--------------------------------------------------------------------------
; [patrol@val_escort_guard_walk]
; path_walk           = captive_walk
; path_look           = captive_look
; formation           = back
;;animation           = patrol
; on_info             = {+val_escort_combat}          remark@val_escort_guard_fight
; on_info2            = {+val_escort_captive_dead}    remark@val_escort_guard_free
;;on_info3            = {+val_escort_captive_enemy}   remark@val_escort_guard_free
; danger              = danger@val_escort_guard
; combat_ignore_cond  = {=check_fighting(400) -val_escort_captive_enemy}
;tolerant			= monster

[follower@val_escort_guard_walk]
leader              = 400
dont_change_job     = true
anim_walk           = patrol
anim_run            = assault
on_info             = {+val_escort_combat}          remark@val_escort_guard_fight
on_info2            = {+val_escort_captive_dead}    patrol@val_escort_guard_free
;on_info3            = {+val_escort_captive_enemy}   remark@val_escort_guard_free
danger              = danger@val_escort_guard
combat_ignore_cond  = {=check_fighting(400) -val_escort_captive_enemy}, {=check_fighting(406)}, {=check_fighting(400) +val_escort_captive_enemy} false
tolerant			= monster

;--------------------------------------------------------------------------
; fight with actor and nap1
;--------------------------------------------------------------------------
[remark@val_escort_guard_fight]
anim                = wait_na
on_info             = {+val_escort_nap1_dead}       patrol@val_escort_guard_free
on_info2            = {+val_escort_captive_dead}    patrol@val_escort_guard_free
;on_info3            = {+val_escort_captive_enemy}   remark@val_escort_guard_free
combat_ignore_cond  = {=check_fighting(400) -val_escort_captive_enemy} true, false
tolerant			= monster,0,0,10

[patrol@val_escort_guard_free]
path_walk           = guards_leave_walk
def_state_moving1   = patrol
def_state_moving2   = patrol
formation           = line
on_signal           = arrived | %=val_escort_guard_free%

;[remark@val_escort_guard_free]
;anim                = wait
;on_info             = %=val_escort_guard_free%

