;*****************************
;********* csky solider 3 ***********
[logic@mechanic]
active = smartcover@mechanic
suitable = {!is_smart_defending(red_smart_terrain_3_2) !smart_captured_by_faction(red_smart_terrain_3_2:monsters)}
trade = misc\trade\trade_trader_red_underground_trader.ltx
on_combat = combat@mechanic
level_spot = trader

[combat@mechanic]
on_info = walker@mechanic_defence

[smartcover@mechanic]
path_walk = kamp_1_task
out_restr = red_smart_terrain_3_2_mechanic_restr
meet = meet@mechanic
loophole_name = lead_sit_sleep_mechanic
cover_name = red_smart_terrain_3_2_mechanic_smartcover
cover_state = idle_target
on_game_timer = 150 | smartcover@mechanic2

[smartcover@mechanic2]
out_restr = red_smart_terrain_3_2_mechanic_restr
meet = meet@mechanic
loophole_name = lead_sit_sleep_mechanic
cover_name = red_smart_terrain_3_2_mechanic_smartcover
cover_state = idle_target
on_game_timer = 300 | {=dist_to_actor_ge(5)} smartcover@mechanic3

[smartcover@mechanic3]
out_restr = red_smart_terrain_3_2_mechanic_restr
meet = no_meet
loophole_name = lead_sit_sleep_mechanic
cover_name = red_smart_terrain_3_2_mechanic_smartcover
cover_state = lookout_target
on_game_timer = 450 | smartcover@mechanic
on_info = {=dist_to_actor_le(5)} smartcover@mechanic

[walker@mechanic_defence]
path_walk = mechanic_1_walk
path_look = mechanic_1_walk
on_game_timer = 5000 | smartcover@mechanic

[meet@mechanic]
meet_state = 2|nil@nil
meet_state_wpn = 2|nil@nil

[logic@artefact_search]
active = walker@artefact_search
suitable = {!smart_captured_by_faction(red_smart_terrain_3_2:bandit) +red_undeground_open +red_smart_3_2_init_artefact_search}

[walker@artefact_search]
meet = no_meet
;combat_ignore_cond = true
out_restr = red_smart_terrain_3_2_undeground_restr_2
path_walk = artefact_walker_1_walk
path_look = artefact_walker_1_look
on_signal = action | walker@exit_underground
;on_info = {!is_smart_defending(red_smart_terrain_3_2)} walker@exit_underground

[walker@exit_underground]
meet = no_meet
;combat_ignore_cond = true
out_restr = red_smart_terrain_3_2_undeground_restr_2
path_walk = artefact_walker_2_walk
on_signal = action | %-red_smart_3_2_init_artefact_search%