[logic]
active = mob_remark@start_wait
on_trade = mob_trade
trade = misc\trade_trader.ltx

; ------------------------------------------------------------------------------------------------------
; СТАРТ
; ------------------------------------------------------------------------------------------------------

; Ждем вначале немного
[mob_remark@start_wait]
dialog_cond = always
anim = idle_2_def_0
on_info = {=talking} mob_remark@before_first_phrase
on_signal = action_end | mob_remark@start_wait2

[mob_remark@start_wait2]
dialog_cond = always
anim = idle_2_def_0
on_info = {=talking} mob_remark@before_first_phrase
on_signal = action_end | mob_remark@start_wait3

[mob_remark@start_wait3]
dialog_cond = always
anim = idle_2_def_0
on_info = {=talking} mob_remark@before_first_phrase
on_signal = action_end | mob_remark@start_wait4

[mob_remark@start_wait4]
dialog_cond = always
anim = idle_2_def_0
on_info = {=talking} mob_remark@before_first_phrase
on_signal = action_end | mob_remark@before_first_phrase

; Пододвигаемся к игроку
[mob_remark@before_first_phrase]
dialog_cond = always
anim = idle_2_to_idle_0
on_signal = action_end | {=talking} mob_remark@idle_0_def_0, mob_remark@first_phrase



; Говорим первую фразу (подойди-ка - надо бы ситуацию прояснить)
[mob_remark@first_phrase]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_come_here
on_signal = action_end | {=talking} mob_remark@idle_0_def_0, mob_remark@before_second_phrase
on_info = {=talking} mob_remark@idle_0_def_0 ; обрывать фразу

; Ждем немного
[mob_remark@before_second_phrase]
dialog_cond = always
anim = idle_0_def_0
tip = tips_esc_trader_how_to_talk
on_info = {=talking} mob_remark@idle_0_def_0
on_signal = action_end | mob_remark@second_phrase

; Говорим вторую фразу (что стоишь? подходи)
[mob_remark@second_phrase]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_come_here2
on_signal = action_end | mob_remark@idle_0_def_0
on_info = {=talking} mob_remark@idle_0_def_0 ; обрывать фразу


; ------------------------------------------------------------------------------------------------------
; ЗАНИМАЕМСЯ СВОИМИ ДЕЛАМИ
; ------------------------------------------------------------------------------------------------------
[mob_remark@idle_0_spec_scratch_0]
dialog_cond = always
anim = idle_0_spec_scratch_0
on_signal = action_end | mob_remark@idle_0_def_0

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

; ------------------------------------------------------------------------------------------------------
; РАЗГОВОР
; ------------------------------------------------------------------------------------------------------

[mob_remark@idle_0_def_0]
dialog_cond = always
anim = idle_0_def_0
on_signal = action_end | {=talking} mob_remark@idle_0_def_0, {~50} mob_remark@idle_0_spec_scratch_0, mob_remark@idle_0_def_0
on_info = {-esc_trader_monolog_1_played +esc_trader_monolog_1} mob_remark@monolog_1 %+esc_trader_monolog_1_played%,   {-esc_trader_tutorial_choice_played +esc_trader_tutorial_choice} mob_remark@tut_choice %+esc_trader_tutorial_choice_played%
on_info2 = {+esc_trader_tutorial_chosen +esc_trader_newbie -esc_trader_newbie_course_done} %=run_tutorial(part_1_pda) +esc_trader_newbie_course_done%
on_actor_dist_le_nvis = 3 | {+tutorial_end -esc_trader_hello_played} mob_remark@hello_what_have_you_got %+esc_trader_hello_played%
on_actor_dist_ge_nvis = 5 | {-esc_trader_bye_played +esc_trader_hello_played} mob_remark@bye %+esc_trader_bye_played%
;on_actor_dist_ge_nvis2 = 10 | %-esc_trader_hello_played -esc_trader_bye_played%


; ------------------------------------------------------------------------------------------------------
; ТОРГОВЛЯ (общие для всех секций настройки)
; ------------------------------------------------------------------------------------------------------

[mob_trade]
on_info = {+tutorial_end =trading =trade_exchanged} mob_remark@trade_exchanged
on_info2 = {+tutorial_end !trading =trade_exchanged} mob_remark@trade_good
on_info3 = {+tutorial_end !trading !trade_exchanged} mob_remark@trade_bad

; ------------------------------------------------------------------------------------------------------
; ОЗВУЧКА: ПРИВЕТСТВИЯ И ТОРГОВЛЯ
; ------------------------------------------------------------------------------------------------------

[mob_remark@hello_what_have_you_got]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_hello_what_have_you_got
on_signal = action_end | mob_remark@idle_0_def_0

[mob_remark@bye]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_bye
on_signal = action_end | mob_remark@idle_0_def_0

; ------------------------------------------------------------------------------------------------------
; ОЗВУЧКА ФРАЗ
; ------------------------------------------------------------------------------------------------------

[mob_remark@monolog_1]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_monolog1
on_signal = action_end | mob_remark@idle_0_def_0
on_info = {+esc_trader_tutorial_choice} mob_remark@idle_0_def_0 ; обрывать фразу FIXME

[mob_remark@tut_choice]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_tut_choice
on_signal = action_end | mob_remark@idle_0_def_0
on_info = {+esc_trader_experienced} mob_remark@idle_0_def_0, {+esc_trader_newbie} mob_remark@idle_0_def_0 ; обрывать фразу FIXME

[mob_remark@trade_good]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_good_trade
on_signal = action_end | mob_remark@idle_0_def_0

[mob_remark@trade_bad]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_bad_trade
on_signal = action_end | mob_remark@idle_0_def_0

[mob_remark@trade_exchanged]
dialog_cond = always
anim = idle_0_talk_2
anim_head = head_anim_normal
snd = trader_exchanged
on_signal = action_end | mob_remark@idle_0_def_0
