(
"back_alley_kill_local_merchant",mtf_arena_fight,-1,
"You enter the back alley",
[
(0,mtef_visitor_source|mtef_team_0,af_override_horse,aif_start_alarmed,1,[]),
(3,mtef_visitor_source|mtef_team_1,af_override_horse,aif_start_alarmed,1,[]),
],
[
common_inventory_not_available,
(ti_tab_pressed, 0, 0, [(display_message,"str_cannot_leave_now")], []),
(ti_before_mission_start, 0, 0, [], [(call_script, "script_change_banners_and_chest")]),
##################################################################weather of the Citadel
(ti_before_mission_start, 0, 0, [],
[
(store_current_scene,":scene"),
(try_begin),
(eq,":scene","scn_multi_scene_1"),
(scene_set_day_time,20),
(set_fog_distance, 50, 0x00666633),
(eq,":scene","scn_multi_scene_4"),
(scene_set_day_time,3),
(set_fog_distance, 20, 0x00736252),
(end_try),
]),
##################################################################weather of the Citadel
(0, 0, ti_once, [],
[
(call_script, "script_music_set_situation_with_culture", mtf_sit_ambushed),
]),
(0, 0, ti_once, [
(store_mission_timer_a,":cur_time"),
(ge,":cur_time",1),
(assign, ":merchant_hp", 0),
(assign, ":player_hp", 0),
(assign, ":merchant_hp", 0),
(assign, ":merchant_agent", -1),
(assign, ":player_agent", -1),
(try_for_agents, ":agent_no"),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(try_begin),
(eq, ":troop_id", "trp_local_merchant"),
(store_agent_hit_points, ":merchant_hp", ":agent_no"),
(assign, ":merchant_agent", ":agent_no"),
(else_try),
(eq, ":troop_id", "trp_player"),
(store_agent_hit_points, ":player_hp",":agent_no"),
(assign, ":player_agent", ":agent_no"),
(try_end),
(try_end),
(ge, ":player_agent", 0),
(ge, ":merchant_agent", 0),
(agent_is_alive, ":player_agent"),
(agent_is_alive, ":merchant_agent"),
(is_between, ":merchant_hp", 1, 30),
(gt, ":player_hp", 50),
(start_mission_conversation, "trp_local_merchant"),
], []),
(1, 4, ti_once, [(assign, ":not_alive", 0),
(try_begin),
(call_script, "script_cf_troop_agent_is_alive", "trp_local_merchant"),
(else_try),
(assign, ":not_alive", 1),
(try_end),
(this_or_next|main_hero_fallen),
(eq, ":not_alive", 1)],
[
(try_begin),
(main_hero_fallen),
(call_script, "script_fail_quest", "qst_kill_local_merchant"),
(else_try),
(call_script, "script_change_player_relation_with_center", "$current_town", -4),
(call_script, "script_succeed_quest", "qst_kill_local_merchant"),
(try_end),
(finish_mission),
]),
],
),