[logic@zat_b18_noah]
active = walker@meet
suitable = {=check_npc_name(zat_b18_noah)}
prior = 100
on_hit = hit
on_death = death

[walker@meet]
path_walk = noah_walker_1_walk
path_look = noah_door_shooting_mark ;noah_walker_1_look
def_state_standing = guard_na
out_restr = zat_b18_out_restrictor_noah
on_info = {+zat_b18_noah_shot_door} remark@shoot_door
on_info2 = {+zat_b18_noah_gave_first_artefact -zat_b18_noah_gave_second_artefact -zat_b18_noah_gave_first_artefact_brake} walker@no_meet %+zat_b18_noah_gave_first_artefact_brake%
on_info3 = {+zat_b18_noah_gave_second_artefact -zat_b18_noah_breakdown -zat_b18_noah_gave_second_artefact_brake} walker@no_meet %+zat_b18_noah_gave_second_artefact_brake%
on_info4 = {+zat_b18_noah_breakdown} remark@fire
on_info5 = {+zat_b18_actor_enemy} walker@fire %=actor_enemy%
on_actor_dist_ge_nvis = 100 | %+zat_b18_reset_memory -zat_b18_noah_shot_door -zat_b18_noah_remembers -zat_b18_noah_breakdown =actor_neutral%
meet = meet
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
combat_ignore_keep_when_attacked = true
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[walker@no_meet]
path_walk = noah_walker_1_walk
path_look = noah_walker_1_look
def_state_standing = guard_na
out_restr = zat_b18_out_restrictor_noah
on_info = {+zat_b18_noah_shot_door} remark@shoot_door
on_info2 = {+zat_b18_noah_go_away} %=play_sound(zat_b18_noah_go_away) -zat_b18_noah_go_away%
on_info3 = {+zat_b18_actor_enemy} walker@fire %=actor_enemy%
on_actor_dist_le = 15 | %=play_sound(zat_b18_noah_no_talk)%
on_actor_dist_ge_nvis = 100 | walker@meet %+zat_b18_reset_memory -zat_b18_noah_shot_door -zat_b18_noah_remembers -zat_b18_noah_breakdown =actor_neutral%
meet = meet@no_speak
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
combat_ignore_keep_when_attacked = true
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

;----------�������� � �����---------
[remark@shoot_door]
anim = threat_fire ;threat_fire
target = path  | zat_b18_noah_door_shooting_mark, 0
meet = no_meet
on_info = %=play_sound(zat_b18_noah_greetings)%
on_game_timer = 15 | walker@stop %-zat_b18_noah_shot_door% ;remark@aim_to_actor %-zat_b18_noah_shot_door%
on_info2 = {+zat_b18_actor_enemy} walker@fire %=actor_enemy%
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
combat_ignore_keep_when_attacked = true
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
out_restr = zat_b18_out_restrictor_noah

;----------�������� � ������---------

[walker@stop]
path_walk = noah_walker_1_walk
path_look = noah_door_shooting_mark
def_state_standing = threat_na
out_restr = zat_b18_out_restrictor_noah
on_info = {+zat_b18_actor_enemy} walker@fire %=actor_enemy%
on_timer = 500 | remark@aim_to_actor
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
combat_ignore_keep_when_attacked = true
meet = no_meet
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[remark@aim_to_actor]
anim = threat_na
target = story | actor
on_info = {+zat_b18_noah_remembers -zat_b18_noah_go_away} walker@meet
on_info2 = {+zat_b18_noah_go_away} walker@no_meet
on_info3 = {+zat_b18_noah_shot_door} %-zat_b18_noah_shot_door%
on_info4 = {+zat_b18_actor_enemy} walker@fire %=actor_enemy%
on_actor_dist_ge_nvis = 100 | walker@meet %+zat_b18_reset_memory -zat_b18_actor_enemy -zat_b18_noah_shot_door -zat_b18_noah_remembers -zat_b18_noah_breakdown =actor_neutral =restore_health%
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
combat_ignore_keep_when_attacked = true
meet = meet@weap
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
out_restr = zat_b18_out_restrictor_noah



;-------------�������� ������----------
[remark@fire]
anim = threat_na
target = story | actor
meet = no_meet
on_info = %=play_sound(zat_b18_noah_breakdown)%
on_signal = sound_end | walker@fire %=actor_enemy%
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true, {=check_enemy_name(sim_default) =fighting_dist_ge(30)} true
combat_ignore_keep_when_attacked = true
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false
out_restr = zat_b18_out_restrictor_noah


[walker@fire]
path_walk = noah_walker_1_walk
path_look = noah_walker_1_look
def_state_standing = guard_na
out_restr = zat_b18_out_restrictor_noah
on_info = {-zat_b18_actor_enemy_info} %+zat_b18_actor_enemy_info =actor_enemy%
on_actor_dist_ge_nvis = 100 | walker@meet %+zat_b18_reset_memory -zat_b18_actor_enemy -zat_b18_noah_shot_door -zat_b18_noah_remembers -zat_b18_noah_breakdown =actor_neutral =restore_health%
meet = no_meet
danger = danger
combat_ignore_cond = {=check_enemy_name(zat_b18_dog_noah)} true
wounded = wounded
gather_items_enabled = false
help_wounded_enabled = false
corpse_detection_enabled = false

[meet]
close_anim		= guard_na
close_victim    = actor
close_distance  = 7
close_snd_hello = nil
close_snd_bye   = nil
use			= true
abuse		= true
trade_enable 	= false
allow_break = false

[meet@weap]
close_anim		= threat_na
close_victim    = actor
close_distance  = 7
close_snd_hello = nil
close_snd_bye   = nil
use			=  true
abuse		= true
trade_enable 	= false
allow_break = false

[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

[danger]
ignore_distance = 0
ignore_distance_grenade = 0
ignore_distance_corpse = 0
ignore_distance_hit = 0
ignore_distance_sound = 0



[meet@no_speak]
use = false
snd_on_use = zat_b18_noah_no_talk
close_anim		= guard_na
close_distance  = 20

[hit]
on_info = {=hit_by_actor -zat_b18_actor_enemy} %+zat_b18_actor_enemy =stop_sound%

[death]
on_info = %+zat_b18_noah_dead =stop_sound%