;--------------------------------------------------------------------------------------------------
; FIND MUTANT MEAT FOR FREEDOM TASK-

[mil_smart_terrain_7_10_freedom_trader_stalker_task_1]
icon = ui_inGame2_Nochnaya_ohota
prior = 40
storyline = false
title = mil_smart_terrain_7_10_freedom_trader_stalker_task_1_name
title_functor = general_fetch_task
descr = mil_smart_terrain_7_10_freedom_trader_stalker_task_1_text
descr_functor = general_fetch_task
job_descr = mil_smart_terrain_7_10_freedom_trader_stalker_task_1_about
fetch_descr = mil_smart_terrain_7_10_freedom_trader_stalker_task_1_fetch_about
fetch_func = %=setup_generic_fetch_task_random(mil_smart_terrain_7_10_freedom_trader_stalker_task_1_fetch:4:6:mutant_part_boar_chop:mutant_part_dog_meat:mutant_part_flesh_meat:mutant_part_psevdodog_meat:mutant_part_krovosos_meat)%
stage_complete = 1
; precondition = true
repeat_timeout = 21600
status_functor = actor_has_fetch_item
target_functor = general_fetch_task
task_complete_descr = mil_smart_terrain_7_10_freedom_trader_stalker_task_1_fetch_finish
on_complete = %=complete_task_inc_goodwill(50:freedom) =reward_and_remove(mil_smart_terrain_7_10_freedom_trader_stalker_task_1_fetch:3) =reward_stash(true) =inc_task_stage(mil_smart_terrain_7_10_freedom_trader_stalker_task_1)%

;--------------------------------------------------------------------------------------------------
; FIND ARTEFACT FOR FREEDOM TASK-

[mil_smart_terrain_7_10_freedom_trader_stalker_task_2]
icon = ui_inGame2_Kontrakt_s_uchenimi
prior = 5
storyline = false
title = jup_b6_scientist_tech_task_2_name
title_functor = general_fetch_task
descr = mil_smart_terrain_7_10_freedom_trader_stalker_task_2_text
descr_functor = general_fetch_task
job_descr = jup_b6_scientist_tech_task_2_about
fetch_descr = jup_b6_scientist_tech_task_2_fetch_about
fetch_func = %=setup_artefact_fetch_task(mil_smart_terrain_7_10_freedom_trader_stalker_task_2_fetch)%
stage_complete = 1
status_functor = actor_has_fetch_item
target_functor = general_fetch_task
task_complete_descr = jup_b6_scientist_tech_task_2_fetch_finish
; precondition = true
repeat_timeout = 64800
on_complete = %=complete_task_inc_goodwill(50:freedom) =reward_item_cost_mult_and_remove(mil_smart_terrain_7_10_freedom_trader_stalker_task_2_fetch:0.6) =inc_task_stage(mil_smart_terrain_7_10_freedom_trader_stalker_task_2)%
on_fail = %=fail_task_dec_goodwill(25:freedom)%

;--------------------------------------------------------------------------------------------------
; STOP ENEMY ASSAULT FOR FREEDOM TASK-

[mil_smart_terrain_7_7_freedom_leader_stalker_task_1]
icon = ui_inGame2_Odin_vistrel
prior = 2
storyline = false
title = mil_smart_terrain_7_7_freedom_leader_stalker_task_1_name
descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_1_text
job_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_1_about
task_complete_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_1_finish
repeat_timeout = 43200
target_functor = general_under_faction_control
status_functor = check_smart_under_faction_control_staged
status_functor_params = army,dolg,monolith
stage_complete = 1
on_init = %=find_smart_under_faction_control_ex(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_id:army:dolg:monolith)%
precondition = {=all_avail_smart_stayed_squad_count_ge_by_faction_ex(1:nil:false:army:dolg:monolith)} true, false
on_complete = %=complete_task_inc_goodwill(50:freedom) =reward_random_money(7000:8500) =reward_stash(true) =inc_task_stage(mil_smart_terrain_7_7_freedom_leader_stalker_task_1) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_id) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_target_id)%
on_fail = %=pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_id) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_target_id) =fail_task_dec_goodwill(25:freedom)%
on_cancel = %=pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_id) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_1_target_id)%


;--------------------------------------------------------------------------------------------------
; RECAPTURE TERRITORY FOR FREEDOM TASK-

[mil_smart_terrain_7_7_freedom_leader_stalker_task_2]
icon = ui_inGame2_Odin_vistrel
prior = 2
storyline = false
title = mil_smart_terrain_7_7_freedom_leader_stalker_task_2_name
descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_2_text
job_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_2_about
task_complete_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_2_finish
repeat_timeout = 43200
target_functor = general_under_faction_control
status_functor = check_smart_under_faction_control_staged
status_functor_params = dolg
stage_complete = 1
on_init = %=find_smart_under_faction_control(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_id:dolg)%
precondition = {=all_avail_smart_stayed_squad_count_ge_by_faction(1:nil:false:dolg)} true, false
on_complete = %=complete_task_inc_goodwill(50:freedom) =reward_random_money(7500:8500) =reward_stash(true) =inc_task_stage(mil_smart_terrain_7_7_freedom_leader_stalker_task_2) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_id) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_target_id)%
on_fail = %=pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_id) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_target_id) =fail_task_dec_goodwill(25:freedom)%
on_cancel = %=pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_id) =pstor_reset(mil_smart_terrain_7_7_freedom_leader_stalker_task_2_target_id)%

;--------------------------------------------------------------------------------------------------
; ASSASSINATE MONOLITH FOR FREEDOM TASK-

[mil_smart_terrain_7_7_freedom_leader_stalker_task_3]
icon = ui_inGame2_Odin_vistrel
prior = 35
storyline = false
title = mil_smart_terrain_7_7_freedom_leader_stalker_task_3_name
descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_3_text
job_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_3_about
task_complete_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_3_finish
precondition = true
repeat_timeout = 64800
status_functor = bounty_task
target_functor = general_bounty_task
stage_complete = 1
on_job_descr = %=on_init_bounty_hunt(mil_smart_terrain_7_7_freedom_leader_stalker_task_3:monolith)%
on_complete = %=reward_random_money(8500:10000) =reward_stash(true) =inc_task_stage(mil_smart_terrain_7_7_freedom_leader_stalker_task_3) =complete_task_inc_goodwill(50:freedom)%


;--------------------------------------------------------------------------------------------------
; ASSASSINATE DUTY FOR FREEDOM TASK-

[mil_smart_terrain_7_7_freedom_leader_stalker_task_4]
icon = ui_inGame2_Odin_vistrel
prior = 40
storyline = false
title = mil_smart_terrain_7_7_freedom_leader_stalker_task_4_name
descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_4_text
job_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_4_about
task_complete_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_4_finish
precondition = true
repeat_timeout = 64800
status_functor = bounty_task
target_functor = general_bounty_task
stage_complete = 1
on_job_descr = %=on_init_bounty_hunt(mil_smart_terrain_7_7_freedom_leader_stalker_task_4:dolg)%
on_complete = %=reward_random_money(9000:11000) =reward_stash(true) =inc_task_stage(mil_smart_terrain_7_7_freedom_leader_stalker_task_4) =complete_task_inc_goodwill(50:freedom)%


;--------------------------------------------------------------------------------------------------
; FIND WEAPON FOR FREEDOM TASK-

[mil_smart_terrain_7_7_freedom_leader_stalker_task_5]
icon = ui_inGame2_Osobiy_zakaz
prior = 50
storyline = false
title = mil_smart_terrain_7_7_freedom_leader_stalker_task_5_name
title_functor = general_fetch_task
descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_5_text
descr_functor = general_fetch_task
job_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_5_about
fetch_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_5_fetch_about
fetch_func = %=setup_weapon_fetch_task(mil_smart_terrain_7_7_freedom_leader_stalker_task_5_fetch)%
stage_complete = 1
status_functor = actor_has_fetch_item
target_functor = general_fetch_task
task_complete_descr = mil_smart_terrain_7_7_freedom_leader_stalker_task_5_fetch_finish
; precondition = true
repeat_timeout = 64800
on_complete = %=complete_task_inc_goodwill(50:freedom) =reward_weapon_cost_mult_and_remove(mil_smart_terrain_7_7_freedom_leader_stalker_task_5_fetch:1.2) =reward_stash(true) =inc_task_stage(mil_smart_terrain_7_7_freedom_leader_stalker_task_5)%
on_fail = %=fail_task_dec_goodwill(25:freedom)%


;--------------------------------------------------------------------------------------------------
; FIND LEVEL 1 TOOLS FOR SCREW TASK-

[mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1]
icon = ui_inGame2_Instrumenti
prior = 50
storyline = false
title = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_name
title_functor = general_fetch_task
descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_text
descr_functor = general_fetch_task
job_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_about
fetch_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_fetch_about
fetch_func = %=setup_generic_fetch_task(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_fetch:1:itm_repairkit_tier_1)%
stage_complete = 1
status_functor = actor_has_fetch_item
target_functor = general_fetch_task
task_complete_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_fetch_finish
on_complete = %+mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_1 =complete_task_inc_goodwill(50:freedom) =reward_item_cost_mult_and_remove(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1_fetch:0.8) =inc_task_stage(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_1)%
precondition = {-mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_1} true, false


;--------------------------------------------------------------------------------------------------
; FIND LEVEL 2 TOOLS FOR SCREW TASK-

[mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2]
icon = ui_inGame2_Instrumenti
prior = 50
storyline = false
title = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_name
title_functor = general_fetch_task
descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_text
descr_functor = general_fetch_task
job_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_about
fetch_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_fetch_about
fetch_func = %=setup_generic_fetch_task(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_fetch:1:itm_repairkit_tier_2)%
stage_complete = 1
status_functor = actor_has_fetch_item
target_functor = general_fetch_task
task_complete_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_fetch_finish
on_complete = %+mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_2 =complete_task_inc_goodwill(50:freedom) =reward_item_cost_mult_and_remove(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2_fetch:0.8) =inc_task_stage(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_2)%
precondition = {+mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_1 -mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_2} true, false


;--------------------------------------------------------------------------------------------------
; FIND LEVEL 3 TOOLS FOR SCREW TASK-

[mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3]
icon = ui_inGame2_Instrumenti
prior = 50
storyline = false
title = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_name
title_functor = general_fetch_task
descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_text
descr_functor = general_fetch_task
job_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_about
fetch_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_fetch_about
fetch_func = %=setup_generic_fetch_task(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_fetch:1:itm_repairkit_tier_3)%
stage_complete = 1
status_functor = actor_has_fetch_item
target_functor = general_fetch_task
task_complete_descr = mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_fetch_finish
on_complete = %+mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_3 =complete_task_inc_goodwill(50:freedom) =reward_item_cost_mult_and_remove(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3_fetch:0.8) =inc_task_stage(mil_smart_terrain_7_7_freedom_mechanic_stalker_task_3)%
precondition = {+mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_2 -mil_smart_terrain_7_7_freedom_mechanic_stalker_upgrade_tier_3} true, false
