;==============================================================
;
; Tasks Provided By Military (drx_ql_tasks_military.ltx)
;	CoC 1.5b r4 - DoctorX Questlines 2.0
;
;		- Strings file: configs\text\eng\drx_ql_strings_military.xml
;		- Status functor file: scripts\task_status_functor.script  (functions for status_functor field)
;		- Target functor file: scripts\task_functor.script  (functions for target_functor field)
;		- Preconditions file: scripts\xr_conditions.script  (functions for precondition and condlist_* fields)
;		- Task scripts file: scripts\xr_effects.script  (functions for on_* fields)
;
;	Created by: DoctorX
;	Last revised: November 07, 2019
;
;==============================================================


;//////////////////////////////////////////////////////////////////////////////////////////////////
;
; Military Storyline Tasks
;
;	Created by DoctorX
;	for DoctorX Questlines 2.0
;	November 07, 2019
;
;--------------------------------------------------------------------------------------------------

; -----------------------------------------------
; Military Investigate Stingray 5 (Zaton, Distorted Swamp) Storyline Task-

[drx_ql_army_sl_task_1]

icon = ui_inGame2_Skat_1
storyline = true
prior = 139
weight = 3
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() +drx_ql_info_main_task_x19_done -drx_ql_info_stingray_5_done -drx_ql_info_stingray_4_done -drx_ql_quest_item_blackbox_task_started} true, false

important = true

title = drx_ql_army_sl_task_1_name
descr = drx_ql_army_sl_task_1_text
descr_functor = drx_ql_float_item_task_target
job_descr = drx_ql_army_sl_task_1_about
task_complete_descr = drx_ql_army_sl_task_1_finish

stage_complete = 1
target_functor = drx_ql_float_item_task_target
status_functor = drx_ql_float_item_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_1)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_1)} fail
condlist_3 = {=actor_has_item(drx_ql_quest_item_blackbox) -drx_ql_info_stingray_5_snorks_spawned} %=drx_ql_create_squad(drx_ql_designated_target_squad_mutant_zaton_swamp:zat_sim_6) +drx_ql_info_stingray_5_snorks_spawned%

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_1:drx_ql_location_stingray_5_blackbox:drx_ql_quest_item_blackbox)%
on_init = %=reward_random_item(scientific_outfit) =drx_ql_setup_float_task(drx_ql_army_sl_task_1:drx_ql_quest_item_blackbox:0:drx_ql_location_stingray_5_blackbox) +drx_ql_quest_item_blackbox_task_started%
on_complete = %=drx_ql_reward_money(4500:7000) =complete_task_inc_goodwill(50:army) =remove_item(drx_ql_quest_item_blackbox) =inc_task_stage(drx_ql_army_sl_task_1) -drx_ql_quest_item_blackbox_task_started +drx_ql_info_stingray_5_done -drx_ql_info_stingray_5_snorks_spawned =drx_ql_reset_task(drx_ql_army_sl_task_1)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_release_float_item(drx_ql_army_sl_task_1) -drx_ql_quest_item_blackbox_task_started -drx_ql_info_stingray_5_snorks_spawned =drx_ql_fail_task(drx_ql_army_sl_task_1) =drx_ql_reset_task(drx_ql_army_sl_task_1)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_release_float_item(drx_ql_army_sl_task_1) -drx_ql_quest_item_blackbox_task_started -drx_ql_info_stingray_5_snorks_spawned =drx_ql_fail_task(drx_ql_army_sl_task_1) =drx_ql_reset_task(drx_ql_army_sl_task_1)%

;------------------------------------------------
; Military Battle Plans Storyline Task-

[drx_ql_army_sl_task_2]

icon = ui_inGame2_Poslednie_razrabotki
storyline = true
prior = 139
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() =drx_ql_is_npc(agr_smart_terrain_1_6_army_mechanic_stalker) -drx_ql_quest_item_notebook_task_started} true, false

title = drx_ql_army_sl_task_2_name
descr = drx_ql_army_sl_task_2_text
descr_functor = drx_ql_quest_stash_task_target
job_descr = drx_ql_army_sl_task_2_about
task_complete_descr = drx_ql_army_sl_task_2_finish

stage_complete = 1
target_functor = drx_ql_quest_stash_task_target
target_functor_params = drx_ql_quest_item_notebook
status_functor = drx_ql_quest_stash_task_status
status_functor_params = drx_ql_quest_item_notebook
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_2)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_2)} fail


on_job_descr = %=drx_ql_create_quest_stash(drx_ql_quest_item_notebook:drx_ql_army_sl_task_2)%
on_init = %=moon_cotz_reenable_quest_stash() +drx_ql_quest_item_notebook_task_started%
on_complete = %=drx_ql_reward_money(1500:3000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =remove_item(drx_ql_quest_item_notebook) =inc_task_stage(drx_ql_army_sl_task_2) -drx_ql_quest_item_notebook_task_started =pstor_reset(drx_ql_quest_item_notebook_stash_id) =drx_ql_reset_task(drx_ql_army_sl_task_2)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_quest_stash(drx_ql_quest_item_notebook) -drx_ql_quest_item_notebook_task_started =pstor_reset(drx_ql_quest_item_notebook_stash_id) =drx_ql_fail_task(drx_ql_army_sl_task_2) =drx_ql_reset_task(drx_ql_army_sl_task_2)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_quest_stash(drx_ql_quest_item_notebook) -drx_ql_quest_item_notebook_task_started =pstor_reset(drx_ql_quest_item_notebook_stash_id) =drx_ql_fail_task(drx_ql_army_sl_task_2) =drx_ql_reset_task(drx_ql_army_sl_task_2)%

; -----------------------------------------------
; Military Search Agroprom Underground Storyline Task-

[drx_ql_army_sl_task_3]

icon = ui_inGame2_Laboratoriya_X8
storyline = true
prior = 165
weight = 3
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() -drx_ql_info_main_task_agr_u_done} true, false

important = true

title = drx_ql_army_sl_task_3_name
descr = drx_ql_army_sl_task_3_text
descr_functor = drx_ql_ug_fetch_task_target
job_descr = drx_ql_army_sl_task_3_about
task_complete_descr = drx_ql_army_sl_task_3_finish

stage_complete = 2
target_functor = drx_ql_ug_fetch_task_target
target_functor_params = agr_space_restrictor_to_agr_ug_2
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_3)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_3)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_3:drx_ql_location_main_story_1_quest_case_1:main_story_1_quest_case)%
on_init = %=drx_ql_setup_story_item_task(drx_ql_army_sl_task_3:main_story_1_quest_case) =drx_ql_activate_teleport(agr_space_restrictor_to_agr_ug_1:agr_space_restrictor_to_agr_ug_2:agr_space_restrictor_to_agr_ug_4)%
on_complete = %=drx_ql_reward_random(6000:8000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =drx_ql_release_story_item(main_story_1_quest_case) =inc_task_stage(drx_ql_army_sl_task_3) +drx_ql_info_main_task_agr_u_done =drx_ql_reset_task(drx_ql_army_sl_task_3)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_release_story_item(main_story_1_quest_case) =drx_ql_fail_task(drx_ql_army_sl_task_3) =drx_ql_reset_task(drx_ql_army_sl_task_3)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_release_story_item(main_story_1_quest_case) =drx_ql_fail_task(drx_ql_army_sl_task_3) =drx_ql_reset_task(drx_ql_army_sl_task_3)%

;------------------------------------------------
; Military Dark Valley Compound Brawl Storyline Task-

[drx_ql_army_sl_task_4]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = true
prior = 194
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() =drx_ql_is_npc(agr_smart_terrain_1_6_near_2_military_colonel_kovalski) =drx_ql_is_enemy(bandit) =is_factions_enemies(army:bandit) !squad_exist(drx_ql_designated_target_squad_bandit_valley_compound_1) !squad_exist(drx_ql_designated_target_squad_bandit_valley_compound_2) !squad_exist(drx_ql_designated_target_squad_bandit_valley_compound_3) !squad_exist(drx_ql_designated_target_squad_bandit_valley_compound_4) !squad_exist(drx_ql_attack_squad_army_valley_compound_1) !squad_exist(drx_ql_attack_squad_army_valley_compound_2)} true, false

title = drx_ql_army_sl_task_4_name
descr = drx_ql_army_sl_task_4_text
descr_1 = drx_ql_army_sl_task_4_text_1
descr_functor = drx_ql_bab_task_target
job_descr = drx_ql_army_sl_task_4_about
message = drx_ql_army_sl_task_4_message
goodbye = drx_ql_army_sl_task_4_goodbye
task_complete_descr = drx_ql_army_sl_task_4_finish

stage_complete = 3
target_functor = drx_ql_bab_task_target
status_functor = drx_ql_bab_task_status
status_functor_params = drx_ql_designated_target_squad_bandit_valley_compound_1, drx_ql_designated_target_squad_bandit_valley_compound_2, drx_ql_designated_target_squad_bandit_valley_compound_3, drx_ql_designated_target_squad_bandit_valley_compound_4
status_functor_rendezvous = val_smart_terrain_3_0
status_functor_rendezvous_dist = 65
status_functor_allied_squads = drx_ql_attack_squad_army_valley_compound_2, val_smart_terrain_3_0
status_functor_enemy_squads = drx_ql_designated_target_squad_bandit_valley_compound_1, val_smart_terrain_4_0, drx_ql_designated_target_squad_bandit_valley_compound_2, val_smart_terrain_4_0, drx_ql_designated_target_squad_bandit_valley_compound_3, val_smart_terrain_4_0, drx_ql_designated_target_squad_bandit_valley_compound_4, val_smart_terrain_4_0
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_4)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_4)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_4:val_smart_terrain_3_0)%
on_init = %=drx_ql_give_escort_task_companions(drx_ql_attack_squad_army_valley_compound_1)%
on_complete = %=drx_ql_reward_random(5000:9000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_4) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_valley_compound_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_valley_compound_2) =drx_ql_reset_task(drx_ql_army_sl_task_4)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_valley_compound_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_valley_compound_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_4) =drx_ql_fail_task(drx_ql_army_sl_task_4) =drx_ql_reset_task(drx_ql_army_sl_task_4)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_valley_compound_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_valley_compound_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_valley_compound_4) =drx_ql_fail_task(drx_ql_army_sl_task_4) =drx_ql_reset_task(drx_ql_army_sl_task_4)%

;------------------------------------------------
; Military Darkscape Forest Brawl Storyline Task-

[drx_ql_army_sl_task_5]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = true
prior = 194
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_is_npc(agr_smart_terrain_1_6_army_mechanic_stalker) =drx_ql_actor_faction() =drx_ql_is_enemy(bandit) =is_factions_enemies(army:bandit) !squad_exist(drx_ql_designated_target_squad_bandit_darkscape_forest_1) !squad_exist(drx_ql_designated_target_squad_bandit_darkscape_forest_2) !squad_exist(drx_ql_designated_target_squad_bandit_darkscape_forest_3) !squad_exist(drx_ql_designated_target_squad_bandit_darkscape_forest_4) !squad_exist(drx_ql_attack_squad_army_darkscape_forest_1) !squad_exist(drx_ql_attack_squad_army_darkscape_forest_2)} true, false

title = drx_ql_army_sl_task_5_name
descr = drx_ql_army_sl_task_5_text
descr_1 = drx_ql_army_sl_task_5_text_1
descr_functor = drx_ql_bab_task_target
job_descr = drx_ql_army_sl_task_5_about
message = drx_ql_army_sl_task_5_message
goodbye = drx_ql_army_sl_task_5_goodbye
task_complete_descr = drx_ql_army_sl_task_5_finish

stage_complete = 3
target_functor = drx_ql_bab_task_target
status_functor = drx_ql_bab_task_status
status_functor_params = drx_ql_designated_target_squad_bandit_darkscape_forest_1, drx_ql_designated_target_squad_bandit_darkscape_forest_2, drx_ql_designated_target_squad_bandit_darkscape_forest_3, drx_ql_designated_target_squad_bandit_darkscape_forest_4
status_functor_rendezvous = ds_grverfer2
status_functor_rendezvous_dist = 100
status_functor_allied_squads = drx_ql_attack_squad_army_darkscape_forest_2, ds_grverfer2
status_functor_enemy_squads = drx_ql_designated_target_squad_bandit_darkscape_forest_1, ds2_st_hoofs, drx_ql_designated_target_squad_bandit_darkscape_forest_2, ds2_st_hoofs, drx_ql_designated_target_squad_bandit_darkscape_forest_3, ds_boars_nest, drx_ql_designated_target_squad_bandit_darkscape_forest_4, ds2_lager_st
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_5)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_5)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_5:ds_grverfer2)%
on_init = %=drx_ql_give_escort_task_companions(drx_ql_attack_squad_army_darkscape_forest_1)%
on_complete = %=drx_ql_reward_random(5000:9000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_5) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_darkscape_forest_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_darkscape_forest_2) =drx_ql_reset_task(drx_ql_army_sl_task_5)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_darkscape_forest_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_darkscape_forest_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_4) =drx_ql_fail_task(drx_ql_army_sl_task_5) =drx_ql_reset_task(drx_ql_army_sl_task_5)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_darkscape_forest_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_darkscape_forest_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit_darkscape_forest_4) =drx_ql_fail_task(drx_ql_army_sl_task_5) =drx_ql_reset_task(drx_ql_army_sl_task_5)%

;------------------------------------------------
; Military Defend the Base Storyline Task-

[drx_ql_army_sl_task_6]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = true
prior = 194
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_is_npc(agr_smart_terrain_1_6_near_2_military_colonel_kovalski) =drx_ql_actor_faction() =drx_ql_is_enemy(killer) =is_factions_enemies(army:killer) !squad_exist(drx_ql_designated_target_squad_killer_agroprom_1) !squad_exist(drx_ql_designated_target_squad_killer_agroprom_2) !squad_exist(drx_ql_designated_target_squad_killer_agroprom_3) !squad_exist(drx_ql_designated_target_squad_killer_agroprom_4) !squad_exist(drx_ql_attack_squad_army_agroprom_1) !squad_exist(drx_ql_attack_squad_army_agroprom_2)} true, false

title = drx_ql_army_sl_task_6_name
descr = drx_ql_army_sl_task_6_text
descr_functor = drx_ql_designated_target_task_target
job_descr = drx_ql_army_sl_task_6_about
task_complete_descr = drx_ql_army_sl_task_6_finish

stage_complete = 1
target = {=check_task_stage(drx_ql_army_sl_task_6:1)} agr_smart_terrain_1_6_near_2_military_colonel_kovalski, {=squad_exist(drx_ql_designated_target_squad_killer_agroprom_1)} drx_ql_designated_target_squad_killer_agroprom_1, {=squad_exist(drx_ql_designated_target_squad_killer_agroprom_2)} drx_ql_designated_target_squad_killer_agroprom_2, {=squad_exist(drx_ql_designated_target_squad_killer_agroprom_3)} drx_ql_designated_target_squad_killer_agroprom_3, {=squad_exist(drx_ql_designated_target_squad_killer_agroprom_4)} drx_ql_designated_target_squad_killer_agroprom_4
status_functor = drx_ql_designated_target_task_status
status_functor_params = drx_ql_designated_target_squad_killer_agroprom_1, drx_ql_designated_target_squad_killer_agroprom_2, drx_ql_designated_target_squad_killer_agroprom_3, drx_ql_designated_target_squad_killer_agroprom_4
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_6)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_6)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_6:agr_smart_terrain_7_5)%
on_init = %=create_squad(drx_ql_designated_target_squad_killer_agroprom_1:agr_smart_terrain_7_5) =create_squad(drx_ql_designated_target_squad_killer_agroprom_2:agr_smart_terrain_7_5) =create_squad(drx_ql_designated_target_squad_killer_agroprom_3:agr_smart_terrain_7_5) =create_squad(drx_ql_designated_target_squad_killer_agroprom_4:agr_smart_terrain_7_5) =create_squad(drx_ql_attack_squad_army_agroprom_1:agr_smart_terrain_4_6) =create_squad(drx_ql_attack_squad_army_agroprom_2:agr_smart_terrain_4_6)%
on_complete = %=drx_ql_reward_money(5000:9000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_6) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_agroprom_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_agroprom_2) =drx_ql_reset_task(drx_ql_army_sl_task_6)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_4) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_agroprom_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_agroprom_2) =drx_ql_fail_task(drx_ql_army_sl_task_6) =drx_ql_reset_task(drx_ql_army_sl_task_6)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_killer_agroprom_4) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_agroprom_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_agroprom_2) =drx_ql_fail_task(drx_ql_army_sl_task_6) =drx_ql_reset_task(drx_ql_army_sl_task_6)%

; -----------------------------------------------
; Military Jupiter UAV Memory Module Storyline Task-

[drx_ql_army_sl_task_7]

icon = ui_inGame2_Bespilotniy_razvedchik
storyline = true
prior = 139
weight = 2
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() -drx_ql_info_uav_module_task_finished -drx_ql_quest_item_memory_module_task_started !squad_exist(drx_ql_raid_companion_squad_army_1)} true, false

title = drx_ql_army_sl_task_7_name
descr = drx_ql_army_sl_task_7_text
descr_functor = drx_ql_float_item_task_target
job_descr = drx_ql_army_sl_task_7_about
task_complete_descr = drx_ql_army_sl_task_7_finish

stage_complete = 1
target_functor = drx_ql_float_item_task_target
status_functor = drx_ql_float_item_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_7)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_7)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_7:drx_ql_location_uav_memory_module:drx_ql_quest_item_memory_module)%
on_init = %=drx_ql_setup_float_task(drx_ql_army_sl_task_7:drx_ql_quest_item_memory_module:0:drx_ql_location_uav_memory_module) =drx_ql_give_escort_task_companions(drx_ql_raid_companion_squad_army_1) +drx_ql_quest_item_memory_module_task_started%
on_complete = %=drx_ql_reward_money(5000:7500) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =remove_item(drx_ql_quest_item_memory_module) =drx_ql_remove_story_squad(drx_ql_raid_companion_squad_army_1) =inc_task_stage(drx_ql_army_sl_task_7) -drx_ql_quest_item_memory_module_task_started +drx_ql_info_uav_module_task_finished =drx_ql_reset_task(drx_ql_army_sl_task_7)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_release_float_item(drx_ql_army_sl_task_7) =drx_ql_remove_story_squad(drx_ql_raid_companion_squad_army_1) -drx_ql_quest_item_memory_module_task_started =drx_ql_fail_task(drx_ql_army_sl_task_7) =drx_ql_reset_task(drx_ql_army_sl_task_7)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_release_float_item(drx_ql_army_sl_task_7) =drx_ql_remove_story_squad(drx_ql_raid_companion_squad_army_1) -drx_ql_quest_item_memory_module_task_started =drx_ql_fail_task(drx_ql_army_sl_task_7) =drx_ql_reset_task(drx_ql_army_sl_task_7)%

; -----------------------------------------------
; Military Sniper Storyline Task-

[drx_ql_army_sl_task_8]

icon = ui_inGame2_Odin_vistrel
storyline = true
prior = 145
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_is_npc(agr_smart_terrain_1_6_near_2_military_colonel_kovalski) =drx_ql_actor_faction() =drx_ql_find_assassination_target(army:drx_ql_army_sl_task_8)} true, false
sniper_task = true

title = drx_ql_army_sl_task_8_name
descr = drx_ql_army_sl_task_8_text
descr_functor = drx_ql_assassination_task_target
job_descr = drx_ql_army_sl_task_8_about
task_complete_descr = drx_ql_army_sl_task_8_finish

stage_complete = 1
target_functor = drx_ql_assassination_task_target
status_functor = drx_ql_assassination_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_8)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_8)} fail
on_job_descr = %=drx_ql_show_assassination_target(drx_ql_army_sl_task_8:true)%
on_init = %=drx_ql_give_assassination_target(drx_ql_army_sl_task_8)%

on_complete = %=drx_ql_reward_money(2500:4500) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_8) =drx_ql_reset_task(drx_ql_army_sl_task_8)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_army_sl_task_8) =drx_ql_reset_task(drx_ql_army_sl_task_8)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_army_sl_task_8) =drx_ql_reset_task(drx_ql_army_sl_task_8)%

;------------------------------------------------
; Military Limansk Outpost Storyline Task-

[drx_ql_army_sl_task_9]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = true
prior = 194
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() =drx_ql_is_npc(agr_smart_terrain_1_6_army_mechanic_stalker) =drx_ql_is_enemy(monolith) =is_factions_enemies(army:monolith) !squad_exist(drx_ql_designated_target_squad_monolith_limansk_sweep_1) !squad_exist(drx_ql_designated_target_squad_monolith_limansk_sweep_2) !squad_exist(drx_ql_designated_target_squad_monolith_limansk_sweep_3) !squad_exist(drx_ql_designated_target_squad_monolith_limansk_sweep_4) !squad_exist(drx_ql_attack_squad_army_limansk_sweep_1) !squad_exist(drx_ql_attack_squad_army_limansk_sweep_2)} true, false

title = drx_ql_army_sl_task_9_name
descr = drx_ql_army_sl_task_9_text
descr_functor = drx_ql_bab_task_target
job_descr = drx_ql_army_sl_task_9_about
message = drx_ql_army_sl_task_9_message
goodbye = drx_ql_army_sl_task_9_goodbye
task_complete_descr = drx_ql_army_sl_task_9_finish

stage_complete = 3
target_functor = drx_ql_bab_task_target
status_functor = drx_ql_bab_task_status
status_functor_params = drx_ql_designated_target_squad_monolith_limansk_sweep_1, drx_ql_designated_target_squad_monolith_limansk_sweep_2, drx_ql_designated_target_squad_monolith_limansk_sweep_3, drx_ql_designated_target_squad_monolith_limansk_sweep_4
status_functor_rendezvous = lim_smart_terrain_3
status_functor_rendezvous_dist = 60
status_functor_allied_squads = drx_ql_attack_squad_army_limansk_sweep_2, lim_smart_terrain_3
status_functor_enemy_squads = drx_ql_designated_target_squad_monolith_limansk_sweep_1, lim_smart_terrain_4, drx_ql_designated_target_squad_monolith_limansk_sweep_2, lim_smart_terrain_5, drx_ql_designated_target_squad_monolith_limansk_sweep_3, lim_smart_terrain_6, drx_ql_designated_target_squad_monolith_limansk_sweep_4, lim_smart_terrain_9
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_9)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_9)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_9:lim_smart_terrain_3)%
on_init = %=drx_ql_give_escort_task_companions(drx_ql_attack_squad_army_limansk_sweep_1)%
on_complete = %=drx_ql_reward_money(5000:9000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_9) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_limansk_sweep_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_limansk_sweep_2) =drx_ql_reset_task(drx_ql_army_sl_task_9)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_limansk_sweep_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_limansk_sweep_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_4) =drx_ql_fail_task(drx_ql_army_sl_task_9) =drx_ql_reset_task(drx_ql_army_sl_task_9)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_limansk_sweep_1) =drx_ql_remove_story_squad(drx_ql_attack_squad_army_limansk_sweep_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_1) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_2) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_3) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_monolith_limansk_sweep_4) =drx_ql_fail_task(drx_ql_army_sl_task_9) =drx_ql_reset_task(drx_ql_army_sl_task_9)%

; -----------------------------------------------
; Military Infiltrate Lab X-18 (Dark Valley) Storyline Task-

[drx_ql_army_sl_task_10]

icon = ui_inGame2_Laboratoriya_X8
storyline = true
prior = 165
weight = 3
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() +drx_ql_info_main_task_agr_u_done -drx_ql_info_main_task_labx18_done} true, false

important = true

title = drx_ql_army_sl_task_10_name
descr = drx_ql_army_sl_task_10_text
descr_functor = drx_ql_ug_fetch_task_target
job_descr = drx_ql_army_sl_task_10_about
task_complete_descr = drx_ql_army_sl_task_10_finish

stage_complete = 2
target_functor = drx_ql_ug_fetch_task_target
target_functor_params = val_space_restrictor_to_labx18
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_10)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_10)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_10:val_smart_terrain_9_6)%
on_init = %=drx_ql_setup_story_item_task(drx_ql_army_sl_task_10:main_story_2_lab_x18_documents) =drx_ql_create_squad(drx_ql_designated_target_squad_army_valley_x18:val_smart_terrain_1_2) =drx_ql_activate_teleport(val_space_restrictor_to_labx18)%
on_complete = %=drx_ql_reward_random(6500:9000) =complete_task_inc_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_army_valley_x18) =remove_item(main_story_2_lab_x18_documents) =inc_task_stage(drx_ql_army_sl_task_10) +drx_ql_info_main_task_labx18_done =drx_ql_reset_task(drx_ql_army_sl_task_10)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_army_valley_x18) =drx_ql_fail_task(drx_ql_army_sl_task_10) =drx_ql_reset_task(drx_ql_army_sl_task_10)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_army_valley_x18) =drx_ql_fail_task(drx_ql_army_sl_task_10) =drx_ql_reset_task(drx_ql_army_sl_task_10)%

; -----------------------------------------------
; Military Disable the Miracle Machine Storyline Task-

[drx_ql_army_sl_task_11]

icon = ui_iconsTotal_yan_kill_brain_task
storyline = true
prior = 165
weight = 3
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_is_npc(agr_smart_terrain_1_6_near_2_military_colonel_kovalski) =drx_ql_actor_faction() +drx_ql_info_main_task_labx18_done -drx_ql_info_main_task_labx16_done} true, false

important = true

title = drx_ql_army_sl_task_11_name
descr = drx_ql_army_sl_task_11_text
descr_functor = drx_ql_ug_fetch_task_target
job_descr = drx_ql_army_sl_task_11_about
task_complete_descr = drx_ql_army_sl_task_11_finish

stage_complete = 2
target_functor = drx_ql_ug_fetch_task_target
target_functor_params = yan_space_restrictor_to_x16
status_functor = drx_ql_miracle_machine_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_11)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_11)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_11:yan_smart_terrain_5_5)%
on_init = %=drx_ql_reward_psi_helmet() =drx_ql_activate_teleport(yan_space_restrictor_to_x16)%
on_complete = %=drx_ql_reward_random(6500:9000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_11) +drx_ql_info_main_task_labx16_done =drx_ql_reset_task(drx_ql_army_sl_task_11)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_army_sl_task_11) =drx_ql_reset_task(drx_ql_army_sl_task_11)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_army_sl_task_11) =drx_ql_reset_task(drx_ql_army_sl_task_11)%

; -----------------------------------------------
; Military Investigate Stingray 3 (Zaton, Southern Plateau) Storyline Task-

[drx_ql_army_sl_task_12]

icon = ui_inGame2_Put_na_plato
storyline = true
prior = 165
weight = 3
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() !drx_ql_is_enemy(stalker) =drx_ql_is_alive(zat_b18_noah) +drx_ql_info_main_task_x19_done -drx_ql_info_stingray_3_done -drx_ql_info_stingray_4_done} true, false

important = true

title = drx_ql_army_sl_task_12_name
descr = drx_ql_army_sl_task_12_text
descr_1 = drx_ql_army_sl_task_12_text_1
descr_functor = drx_ql_plateau_task_target
job_descr = drx_ql_army_sl_task_12_about
task_complete_descr = drx_ql_army_sl_task_12_finish

stage_complete = 3
target_functor = drx_ql_plateau_task_target
target_functor_params = zat_b20_smart_terrain
status_functor = drx_ql_plateau_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_12)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=check_task_stage(0) !drx_ql_is_alive(zat_b18_noah)} fail  ; Before meeting with Noah
condlist_3 = {=check_task_stage(0) =drx_ql_is_enemy(stalker)} fail  ; Before meeting with Noah
condlist_4 = {=drx_ql_wg_fail(drx_ql_army_sl_task_12)} fail
condlist_5 = {-drx_ql_info_play_noah_plateau_task_dialog -drx_ql_info_noah_fireball_given -drx_ql_info_pissed_off_noah} %=reward_random_item(af_fireball) +drx_ql_info_noah_fireball_given%
condlist_6 = {=actor_in_zone(zat_b20_sr_actor_cross_the_teleport)} %+drx_ql_info_plateau_teleport_completed%

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_12:zat_b28)%
on_init = %+drx_ql_info_play_noah_plateau_task_dialog -drx_ql_info_plateau_teleport_completed -drx_ql_info_noah_fireball_given -drx_ql_info_pissed_off_noah =drx_ql_setup_float_task(drx_ql_army_sl_task_12:drx_ql_quest_item_plateau_case:0:zat_b28)%
on_complete = %=drx_ql_reward_random(8500:11000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) +drx_ql_info_stingray_3_done -drx_ql_info_play_noah_plateau_task_dialog -drx_ql_info_pissed_off_noah =remove_item(drx_ql_quest_item_plateau_case) =inc_task_stage(drx_ql_army_sl_task_12) =drx_ql_reset_task(drx_ql_army_sl_task_12)%
on_fail = %=fail_task_dec_goodwill(50:army) -drx_ql_info_play_noah_plateau_task_dialog -drx_ql_info_pissed_off_noah =drx_ql_release_float_item(drx_ql_army_sl_task_12) =drx_ql_fail_task(drx_ql_army_sl_task_12) =drx_ql_reset_task(drx_ql_army_sl_task_12)%
on_cancel = %=fail_task_dec_goodwill(50:army) -drx_ql_info_play_noah_plateau_task_dialog -drx_ql_info_pissed_off_noah =drx_ql_release_float_item(drx_ql_army_sl_task_12) =drx_ql_fail_task(drx_ql_army_sl_task_12) =drx_ql_reset_task(drx_ql_army_sl_task_12)%

; -----------------------------------------------
; Military Investigate Stingray 4 (Jupiter, Jupiter Plant) Storyline Task-

[drx_ql_army_sl_task_13]

icon = ui_inGame2_Skat_1
storyline = true
prior = 195
weight = 3
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() +drx_ql_info_main_task_x19_done -drx_ql_info_stingray_4_done -drx_ql_quest_item_pilot_pda_task_started =drx_ql_min_stingrays_done() -hostage_companion_task_1_started -hostage_companion_task_1_hostage_rescued !squad_exist(hostage_companion_task_1)} true, false

important = true

title = drx_ql_army_sl_task_13_name
descr = drx_ql_army_sl_task_13_text
descr_functor = drx_ql_rescue_pilot_task_target
job_descr = drx_ql_army_sl_task_13_about
task_complete_descr = drx_ql_army_sl_task_13_finish

stage_complete = 3
target_functor = drx_ql_rescue_pilot_task_target
status_functor = drx_ql_rescue_pilot_task_status
status_functor_params = hostage_companion_task_1
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_13)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_13)} fail
condlist_3 = {+drx_ql_info_pilot_pda_found -drx_ql_info_pilot_interrogated !squad_exist(hostage_companion_task_1)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_army_sl_task_13:jup_b8_smart_terrain)%
on_init = %=drx_ql_setup_float_task(drx_ql_army_sl_task_13:drx_ql_quest_item_pilot_pda:25:jup_b8_smart_terrain) +drx_ql_quest_item_pilot_pda_task_started +hostage_companion_task_1_started -drx_ql_info_stingray_4_found -drx_ql_info_pilot_pda_found -drx_ql_info_pilot_interrogated -drx_ql_info_pilot_enemy -drx_ql_info_pilot_defected%
on_complete = %=drx_ql_reward_money(9500:11000) =complete_task_inc_goodwill(50:army) =remove_item(drx_ql_quest_item_pilot_pda) =drx_ql_remove_story_squad(hostage_companion_task_1) -hostage_companion_task_1_hostage_rescued -hostage_companion_task_1_started =inc_task_stage(drx_ql_army_sl_task_13) =unlock_smart(drx_ql_army_sl_task_13_id) -drx_ql_quest_item_pilot_pda_task_started +drx_ql_info_stingray_4_done =drx_ql_reset_task(drx_ql_army_sl_task_13)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_release_float_item(drx_ql_army_sl_task_13) -drx_ql_quest_item_pilot_pda_task_started =drx_ql_remove_story_squad(hostage_companion_task_1) -hostage_companion_task_1_hostage_rescued -hostage_companion_task_1_started =unlock_smart(drx_ql_army_sl_task_13_id) =drx_ql_fail_task(drx_ql_army_sl_task_13) =drx_ql_reset_task(drx_ql_army_sl_task_13)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_release_float_item(drx_ql_army_sl_task_13) -drx_ql_quest_item_pilot_pda_task_started =drx_ql_remove_story_squad(hostage_companion_task_1) -hostage_companion_task_1_hostage_rescued -hostage_companion_task_1_started =unlock_smart(drx_ql_army_sl_task_13_id) =drx_ql_fail_task(drx_ql_army_sl_task_13) =drx_ql_reset_task(drx_ql_army_sl_task_13)%

;------------------------------------------------
; Military Kuznetsov Dynamic Brawl Storyline Task-

[drx_ql_army_sl_task_14]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = true
prior = 194
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(100) =drx_ql_actor_faction() =drx_ql_is_npc(agr_smart_terrain_1_6_near_2_military_colonel_kovalski) =drx_ql_find_brawl_terrain(army:drx_ql_army_sl_task_14)} true, false

title = drx_ql_army_sl_task_14_name
descr = drx_ql_army_sl_task_14_text
descr_1 = drx_ql_army_sl_task_14_text_1
descr_functor = drx_ql_brawl_task_target
job_descr = drx_ql_army_sl_task_14_about
message = drx_ql_army_sl_task_14_message
goodbye = drx_ql_army_sl_task_14_goodbye
task_complete_descr = drx_ql_army_sl_task_14_finish

stage_complete = 3
target_functor = drx_ql_brawl_task_target
status_functor = drx_ql_brawl_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_army_sl_task_14)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_army_sl_task_14)} fail

on_job_descr = %=moon_cotz_show_brawl_task_info(drx_ql_army_sl_task_14)%
on_init = %=drx_ql_setup_brawl_task(drx_ql_army_sl_task_14:4:1) =drx_ql_give_escort_task_companions(drx_ql_brawl_squad_army_2)%
on_complete = %=drx_ql_reward_money(6500:9500) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_army_sl_task_14) =drx_ql_end_brawl_task(drx_ql_army_sl_task_14) =drx_ql_reset_task(drx_ql_army_sl_task_14)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_end_brawl_task(drx_ql_army_sl_task_14) =drx_ql_fail_task(drx_ql_army_sl_task_14) =drx_ql_reset_task(drx_ql_army_sl_task_14)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_end_brawl_task(drx_ql_army_sl_task_14) =drx_ql_fail_task(drx_ql_army_sl_task_14) =drx_ql_reset_task(drx_ql_army_sl_task_14)%

; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\


;//////////////////////////////////////////////////////////////////////////////////////////////////
;
; Military Simulation Tasks
;
;	Created by DoctorX
;	for DoctorX Questlines 2.0
;	September 10, 2019
;
;--------------------------------------------------------------------------------------------------

;------------------------------------------------
; Equipment Swap with Military Simulation Task-

[drx_ql_simulation_task_army_1]

icon = ui_iconsTotal_weapons
storyline = false
prior = 28
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction()} true, false

title = drx_ql_simulation_task_army_1_name
title_functor = drx_ql_fetch_task_target
descr = drx_ql_simulation_task_army_1_text
descr_functor = drx_ql_fetch_task_target
job_descr = drx_ql_simulation_task_army_1_about
fetch_descr = drx_ql_simulation_task_army_1_fetch_about
task_complete_descr = drx_ql_simulation_task_army_1_fetch_finish

stage_complete = 2
target_functor = drx_ql_fetch_task_target
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_1)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_1)} fail

on_job_descr = %=moon_cotz_show_fetch_task_info(drx_ql_simulation_task_army_1)%
fetch_func = %=drx_ql_setup_swap_task(drx_ql_simulation_task_army_1:500:12000:0.8)%
on_init = %=drx_ql_add_havfetch_task(drx_ql_simulation_task_army_1)%
on_complete = %=drx_ql_give_stored_reward(drx_ql_simulation_task_army_1) =remove_fetch_item(drx_ql_simulation_task_army_1_fetch) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_1) =drx_ql_reset_task(drx_ql_simulation_task_army_1)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_1) =drx_ql_reset_task(drx_ql_simulation_task_army_1)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_1) =drx_ql_reset_task(drx_ql_simulation_task_army_1)%

;------------------------------------------------
; Contraband Artefact for Military Simulation Task-

[drx_ql_simulation_task_army_2]

icon = ui_inGame2_Kontrakt_s_uchenimi
storyline = false
prior = 25
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction()} true, false

title = drx_ql_simulation_task_army_2_name
title_functor = drx_ql_fetch_task_target
descr = drx_ql_simulation_task_army_2_text
descr_functor = drx_ql_fetch_task_target
job_descr = drx_ql_simulation_task_army_2_about
fetch_descr = drx_ql_simulation_task_army_2_fetch_about
task_complete_descr = drx_ql_simulation_task_army_2_fetch_finish

stage_complete = 2
target_functor = drx_ql_fetch_task_target
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_2)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_2)} fail

on_job_descr = %=moon_cotz_show_fetch_task_info(drx_ql_simulation_task_army_2)%
fetch_func = %=drx_ql_setup_fetch_task(drx_ql_simulation_task_army_2:6000:15000:1:1:0:items_artefacts_list)%
on_init = %=drx_ql_add_havfetch_task(drx_ql_simulation_task_army_2)%
on_complete = %=drx_ql_fetch_reward_item(drx_ql_simulation_task_army_2:0.75:items_rifles_list) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_2) =drx_ql_reset_task(drx_ql_simulation_task_army_2)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_2) =drx_ql_reset_task(drx_ql_simulation_task_army_2)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_2) =drx_ql_reset_task(drx_ql_simulation_task_army_2)%

;------------------------------------------------
; Assassination on a Dare for Military Simulation Task-

[drx_ql_simulation_task_army_3]

icon = ui_inGame2_Odin_vistrel
storyline = false
prior = 45
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() =drx_ql_find_assassination_target(army:drx_ql_simulation_task_army_3)} true, false

title = drx_ql_simulation_task_army_3_name
descr = drx_ql_simulation_task_army_3_text
descr_functor = drx_ql_assassination_task_target
job_descr = drx_ql_simulation_task_army_3_about
task_complete_descr = drx_ql_simulation_task_army_3_finish

stage_complete = 1
target_functor = drx_ql_assassination_task_target
status_functor = drx_ql_assassination_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_3)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_3)} fail
on_job_descr = %=drx_ql_show_assassination_target(drx_ql_simulation_task_army_3:true)%
on_init = %=drx_ql_give_assassination_target(drx_ql_simulation_task_army_3)%

on_complete = %=drx_ql_reward_item(1500:4500:items_rifles_list) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_3) =drx_ql_reset_task(drx_ql_simulation_task_army_3)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_3) =drx_ql_reset_task(drx_ql_simulation_task_army_3)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_3) =drx_ql_reset_task(drx_ql_simulation_task_army_3)%

;------------------------------------------------
; Dangerous Mutant Sweep with Military Simulation Task-

[drx_ql_simulation_task_army_4]

icon = ui_inGame2_Mesta_evakuatsii
storyline = false
prior = 55
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() =is_night() -drx_ql_big_mutant_task_started =drx_ql_find_unoccupied_lair_local(drx_ql_simulation_task_army_4)} true, false

title = drx_ql_simulation_task_army_4_name
descr = drx_ql_simulation_task_army_4_text
descr_functor = drx_ql_big_mutant_task_target
job_descr = drx_ql_simulation_task_army_4_about
task_complete_descr = drx_ql_simulation_task_army_4_finish

stage_complete = 1
target_functor = drx_ql_big_mutant_task_target
status_functor = drx_ql_big_mutant_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_4)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_4)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_simulation_task_army_4)%
on_init = %=drx_ql_give_assault_target(drx_ql_simulation_task_army_4) =drx_ql_create_big_mutant_squad(drx_ql_simulation_task_army_4) =drx_ql_add_task_giver_companion(drx_ql_simulation_task_army_4) +drx_ql_big_mutant_task_started%
on_complete = %=drx_ql_reward_random(2500:4500) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_4) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_4) -drx_ql_big_mutant_task_started =drx_ql_reset_task(drx_ql_simulation_task_army_4)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_4) -drx_ql_big_mutant_task_started =drx_ql_fail_task(drx_ql_simulation_task_army_4) =drx_ql_reset_task(drx_ql_simulation_task_army_4)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_4) -drx_ql_big_mutant_task_started =drx_ql_fail_task(drx_ql_simulation_task_army_4) =drx_ql_reset_task(drx_ql_simulation_task_army_4)%

;------------------------------------------------
; Military Interdiction Simulation Task-

[drx_ql_simulation_task_army_5]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = false
prior = 85
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() =drx_ql_find_occupied_smart_local(army:drx_ql_simulation_task_army_5)} true, false

title = drx_ql_simulation_task_army_5_name
descr = drx_ql_simulation_task_army_5_text
descr_functor = drx_ql_assault_task_target
job_descr = drx_ql_simulation_task_army_5_about
task_complete_descr = drx_ql_simulation_task_army_5_finish

stage_complete = 1
target_functor = drx_ql_assault_task_target
status_functor = drx_ql_assault_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_5)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_5)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_simulation_task_army_5)%
on_init = %=drx_ql_give_assault_target(drx_ql_simulation_task_army_5) =drx_ql_add_task_giver_companion(drx_ql_simulation_task_army_5)%
on_complete = %=drx_ql_reward_money(4000:7500) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_5) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_5) =drx_ql_reset_task(drx_ql_simulation_task_army_5)%
on_fail = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_5) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_5) =drx_ql_reset_task(drx_ql_simulation_task_army_5)%
on_cancel = %=fail_task_dec_goodwill(50:army) =drx_ql_fail_task(drx_ql_simulation_task_army_5) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_5) =drx_ql_reset_task(drx_ql_simulation_task_army_5)%



; ¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯
; ¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯
; ¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯¯`·.¸¸.·´¯`·.¸¸.·´¯



; //||\\||//||\\||//||\\||//||\\||//||\\
;
; Rhons' Quest Expansion
;
; //||\\||//||\\||//||\\||//||\\||//||\\

;------------------------------------------------
; My Most Meaningful Military Memoirs Simulation Task-

[drx_ql_simulation_task_army_6]

icon = ui_inGame2_PD_Torgovets_informatsiey
storyline = false
prior = 29
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() -drx_ql_quest_item_notebook_task_started} true, false

title = drx_ql_simulation_task_army_6_name
descr = drx_ql_simulation_task_army_6_text
descr_functor = drx_ql_quest_stash_task_target
job_descr = drx_ql_simulation_task_army_6_about
task_complete_descr = drx_ql_simulation_task_army_6_finish

stage_complete = 1
target_functor = drx_ql_quest_stash_task_target
target_functor_params = drx_ql_quest_item_notebook
status_functor = drx_ql_quest_stash_task_status
status_functor_params = drx_ql_quest_item_notebook
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_6)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_6)} fail

on_job_descr = %=drx_ql_create_quest_stash(drx_ql_quest_item_notebook:drx_ql_simulation_task_army_6)%

on_init = %=moon_cotz_reenable_quest_stash() +drx_ql_quest_item_notebook_task_started%

on_complete = %=drx_ql_reward_random(5500:8000) =drx_ql_reward_stash() =complete_task_inc_goodwill(25:army) =remove_item(drx_ql_quest_item_notebook) =inc_task_stage(drx_ql_simulation_task_army_6) -drx_ql_quest_item_notebook_task_started =pstor_reset(drx_ql_quest_item_notebook_stash_id) =drx_ql_reset_task(drx_ql_simulation_task_army_6)%

on_fail = %=drx_ql_remove_quest_stash(drx_ql_quest_item_notebook) -drx_ql_quest_item_notebook_task_started =pstor_reset(drx_ql_quest_item_notebook_stash_id) =drx_ql_fail_task(drx_ql_simulation_task_army_6) =drx_ql_reset_task(drx_ql_simulation_task_army_6)%

on_cancel = %=drx_ql_remove_quest_stash(drx_ql_quest_item_notebook) -drx_ql_quest_item_notebook_task_started =pstor_reset(drx_ql_quest_item_notebook_stash_id) =drx_ql_fail_task(drx_ql_simulation_task_army_6) =drx_ql_reset_task(drx_ql_simulation_task_army_6)%

;------------------------------------------------
; Essential Military Supplies Simulation Task-

[drx_ql_simulation_task_army_7]

icon = ui_inGame2_D_Sisshik
storyline = false
prior = 20
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction()} true, false

title = drx_ql_simulation_task_army_7_name
title_functor = drx_ql_fetch_task_target
descr = drx_ql_simulation_task_army_7_text
descr_functor = drx_ql_fetch_task_target
job_descr = drx_ql_simulation_task_army_7_about
fetch_descr = drx_ql_simulation_task_army_7_fetch_about
task_complete_descr = drx_ql_simulation_task_army_7_fetch_finish

stage_complete = 2
target_functor = drx_ql_fetch_task_target
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_7)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_7)} fail
fetch_func = %=drx_ql_setup_fetch_task(drx_ql_simulation_task_army_7:800:1600:2:12:0:items_ammo_list:items_supplies_list)%

on_job_descr = %=moon_cotz_show_fetch_task_info(drx_ql_simulation_task_army_7)%

on_complete = %=drx_ql_fetch_reward_money(drx_ql_simulation_task_army_7:1.5) =drx_ql_reward_stash() =complete_task_inc_goodwill(25:army) =inc_task_stage(drx_ql_simulation_task_army_7) =drx_ql_reset_task(drx_ql_simulation_task_army_7)%

on_fail = %=drx_ql_fail_task(drx_ql_simulation_task_army_7) =drx_ql_reset_task(drx_ql_simulation_task_army_7)%

on_cancel = %=drx_ql_fail_task(drx_ql_simulation_task_army_7) =drx_ql_reset_task(drx_ql_simulation_task_army_7)%

;------------------------------------------------
; Military Guide Simulation Task-

[drx_ql_simulation_task_army_8]

icon = ui_inGame2_Karti_mestnosti
storyline = false
prior = 30
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() -drx_ql_guide_task_started =drx_ql_find_guide_target(drx_ql_simulation_task_army_8)} true, false
guide_task = true

title = drx_ql_simulation_task_army_8_name
descr = drx_ql_simulation_task_army_8_text
descr_functor = drx_ql_guide_task_target
job_descr = drx_ql_simulation_task_army_8_about
message = drx_ql_simulation_task_army_8_message
task_complete_descr = drx_ql_simulation_task_army_8_finish

stage_complete = 1
target_functor = drx_ql_guide_task_target
status_functor = drx_ql_guide_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_8)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_8)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_simulation_task_army_8)%


on_init = %=drx_ql_give_stored_smart_target(drx_ql_simulation_task_army_8) =drx_ql_add_task_giver_companion(drx_ql_simulation_task_army_8) +drx_ql_guide_task_started%

on_complete = %=drx_ql_give_stored_reward(drx_ql_simulation_task_army_8) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_8) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_8) -drx_ql_guide_task_started =drx_ql_reset_task(drx_ql_simulation_task_army_8)%

on_fail = %=fail_task_dec_goodwill(25:army) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_8) -drx_ql_guide_task_started =drx_ql_fail_task(drx_ql_simulation_task_army_8) =drx_ql_reset_task(drx_ql_simulation_task_army_8)%

on_cancel = %=fail_task_dec_goodwill(25:army) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_8) -drx_ql_guide_task_started =drx_ql_fail_task(drx_ql_simulation_task_army_8) =drx_ql_reset_task(drx_ql_simulation_task_army_8)%

;------------------------------------------------
; New Gun for a Soldier Simulation Task-

[drx_ql_simulation_task_army_9]

icon = ui_inGame2_Neizvestnoe_oruzhie
storyline = false
prior = 28
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction()} true, false

title = drx_ql_simulation_task_army_9_name
title_functor = drx_ql_fetch_task_target
descr = drx_ql_simulation_task_army_9_text
descr_functor = drx_ql_fetch_task_target
job_descr = drx_ql_simulation_task_army_9_about
fetch_descr = drx_ql_simulation_task_army_9_fetch_about
task_complete_descr = drx_ql_simulation_task_army_9_fetch_finish

stage_complete = 2
status_functor = drx_ql_fetch_task_status
target_functor = drx_ql_fetch_task_target
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_9)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_9)} fail
fetch_func = %=drx_ql_setup_fetch_task(drx_ql_simulation_task_army_9:1000:4500:1:1:0.5:items_rifles_list)%

on_job_descr = %=moon_cotz_show_fetch_task_info(drx_ql_simulation_task_army_9)%

on_init = %=drx_ql_add_havfetch_task(drx_ql_simulation_task_army_9)%

on_complete = %=drx_ql_fetch_reward_money(drx_ql_simulation_task_army_9:1.5) =drx_ql_reward_stash() =complete_task_inc_goodwill(25:army) =inc_task_stage(drx_ql_simulation_task_army_9) =drx_ql_reset_task(drx_ql_simulation_task_army_9)%

on_fail = %=drx_ql_fail_task(drx_ql_simulation_task_army_9) =drx_ql_reset_task(drx_ql_simulation_task_army_9)%

on_cancel = %=drx_ql_fail_task(drx_ql_simulation_task_army_9) =drx_ql_reset_task(drx_ql_simulation_task_army_9)%

;------------------------------------------------
; Military Dynamic Brawl Task

[drx_ql_simulation_task_army_10]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = false
prior = 94
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(50) =drx_ql_actor_faction() =drx_ql_find_brawl_terrain(army:drx_ql_simulation_task_army_10)} true, false

title = drx_ql_simulation_task_army_10_name
descr = drx_ql_simulation_task_army_10_text
descr_1 = drx_ql_simulation_task_army_10_text_1
descr_functor = drx_ql_brawl_task_target
job_descr = drx_ql_simulation_task_army_10_about
message = drx_ql_simulation_task_army_10_message
goodbye = drx_ql_simulation_task_army_10_goodbye
task_complete_descr = drx_ql_simulation_task_army_10_finish

stage_complete = 3
target_functor = drx_ql_brawl_task_target
status_functor = drx_ql_brawl_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_10)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_10)} fail

on_job_descr = %=moon_cotz_show_brawl_task_info(drx_ql_simulation_task_army_10)%

on_init = %=drx_ql_setup_brawl_task(drx_ql_simulation_task_army_10:4:2) =drx_ql_add_task_giver_companion(drx_ql_simulation_task_army_10)%

on_complete = %=drx_ql_reward_random(5000:9000) =drx_ql_reward_stash() =complete_task_inc_goodwill(75:army) =inc_task_stage(drx_ql_simulation_task_army_10) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_10) =drx_ql_end_brawl_task(drx_ql_simulation_task_army_10) =drx_ql_reset_task(drx_ql_simulation_task_army_10)%

on_fail = %=fail_task_dec_goodwill(25:army) =drx_ql_end_brawl_task(drx_ql_simulation_task_army_10) =drx_ql_fail_task(drx_ql_simulation_task_army_10) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_10) =drx_ql_reset_task(drx_ql_simulation_task_army_10)%

on_cancel = %=fail_task_dec_goodwill(25:army) =drx_ql_end_brawl_task(drx_ql_simulation_task_army_10) =drx_ql_fail_task(drx_ql_simulation_task_army_10) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_10) =drx_ql_reset_task(drx_ql_simulation_task_army_10)%

;------------------------------------------------
; Military Kill and Recover Task-

[drx_ql_simulation_task_army_11]

icon = ui_inGame2_Osobiy_zakaz
storyline = false
prior = 80
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() -drx_ql_quest_item_document_case_task_started =drx_ql_is_enemy(bandit) =is_factions_enemies(army:bandit) !squad_exist(drx_ql_designated_target_squad_bandit) =drx_ql_find_unoccupied_smart_terrain(drx_ql_simulation_task_army_11)} true, false

title = drx_ql_simulation_task_army_11_name
descr = drx_ql_simulation_task_army_11_text
descr_functor = drx_ql_interceptor_task_target
job_descr = drx_ql_simulation_task_army_11_about
task_complete_descr = drx_ql_simulation_task_army_11_finish

stage_complete = 1
target_functor = drx_ql_interceptor_task_target
status_functor = drx_ql_interceptor_task_status
status_functor_params = drx_ql_quest_item_document_case
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_11)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_11)} fail

on_job_descr = %=moon_cotz_show_stored_smart_target_location(drx_ql_simulation_task_army_11:nil:drx_ql_quest_item_document_case)%

on_init = %=drx_ql_give_stored_smart_target(drx_ql_simulation_task_army_11) =drx_ql_create_interceptor_squad(drx_ql_simulation_task_army_11:drx_ql_designated_target_squad_bandit) +drx_ql_quest_item_document_case_task_started%

on_complete = %=drx_ql_reward_money(8000:9500) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =remove_item(drx_ql_quest_item_document_case) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit) =inc_task_stage(drx_ql_simulation_task_army_11) -drx_ql_quest_item_document_case_task_started =drx_ql_reset_task(drx_ql_simulation_task_army_11)%

on_fail = %=fail_task_dec_goodwill(25:army) =remove_item(drx_ql_quest_item_document_case) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit) -drx_ql_quest_item_document_case_task_started =drx_ql_fail_task(drx_ql_simulation_task_army_11) =drx_ql_reset_task(drx_ql_simulation_task_army_11)%

on_cancel = %=fail_task_dec_goodwill(25:army) =remove_item(drx_ql_quest_item_document_case) =drx_ql_remove_story_squad(drx_ql_designated_target_squad_bandit) -drx_ql_quest_item_document_case_task_started =drx_ql_fail_task(drx_ql_simulation_task_army_11) =drx_ql_reset_task(drx_ql_simulation_task_army_11)%

;------------------------------------------------
; Collect Mutant Tissue Sample for Military Simulation Task-

[drx_ql_simulation_task_army_12]

icon = ui_inGame2_Logovo_krovososov
storyline = false
prior = 35
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction()} true, false

title = drx_ql_simulation_task_army_12_name
title_functor = drx_ql_fetch_task_target
descr = drx_ql_simulation_task_army_12_text
descr_functor = drx_ql_fetch_task_target
job_descr = drx_ql_simulation_task_army_12_about
fetch_descr = drx_ql_simulation_task_army_12_fetch_about
task_complete_descr = drx_ql_simulation_task_army_12_fetch_finish

stage_complete = 2
target_functor = drx_ql_fetch_task_target
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_12)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_12)} fail
fetch_func = %=drx_ql_setup_fetch_task(drx_ql_simulation_task_army_12:500:1250:1:1:0:items_mutant_parts_list)%

on_job_descr = %=moon_cotz_show_fetch_task_info(drx_ql_simulation_task_army_12)%

on_complete = %=drx_ql_fetch_reward_money(drx_ql_simulation_task_army_12:1.2) =drx_ql_reward_stash() =complete_task_inc_goodwill(25:army) =inc_task_stage(drx_ql_simulation_task_army_12) =drx_ql_reset_task(drx_ql_simulation_task_army_12)%

on_fail = %=drx_ql_fail_task(drx_ql_simulation_task_army_12) =drx_ql_reset_task(drx_ql_simulation_task_army_12)%

on_cancel = %=drx_ql_fail_task(drx_ql_simulation_task_army_12) =drx_ql_reset_task(drx_ql_simulation_task_army_12)%

;------------------------------------------------
; Military Mutant Meat Simulation Task-

[drx_ql_simulation_task_army_13]

icon = ui_inGame2_Pripasi
storyline = false
prior = 30
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction()} true, false

title = drx_ql_simulation_task_army_13_name
title_functor = drx_ql_fetch_task_target
descr = drx_ql_simulation_task_army_13_text
descr_functor = drx_ql_fetch_task_target
job_descr = drx_ql_simulation_task_army_13_about
fetch_descr = drx_ql_simulation_task_army_13_fetch_about
task_complete_descr = drx_ql_simulation_task_army_13_fetch_finish

stage_complete = 2
target_functor = drx_ql_fetch_task_target
status_functor = drx_ql_fetch_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_13)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_13)} fail
fetch_func = %=drx_ql_setup_fetch_task(drx_ql_simulation_task_army_13:110:300:1:6:0:items_mutant_meat_list)%

on_job_descr = %=moon_cotz_show_fetch_task_info(drx_ql_simulation_task_army_13)%

on_complete = %=drx_ql_fetch_reward_random(drx_ql_simulation_task_army_13:7) =drx_ql_reward_stash() =complete_task_inc_goodwill(25:army) =inc_task_stage(drx_ql_simulation_task_army_13) =drx_ql_reset_task(drx_ql_simulation_task_army_13)%

on_fail = %=drx_ql_fail_task(drx_ql_simulation_task_army_13) =drx_ql_reset_task(drx_ql_simulation_task_army_13)%

on_cancel = %=drx_ql_fail_task(drx_ql_simulation_task_army_13) =drx_ql_reset_task(drx_ql_simulation_task_army_13)%

;------------------------------------------------
; Zombied Bounty for Military Simulation Task-

[drx_ql_simulation_task_army_14]

icon = ui_inGame2_Odin_vistrel
storyline = false
prior = 45
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() =drx_ql_find_assassination_target(army:drx_ql_simulation_task_army_14:zombied)} true, false

title = drx_ql_simulation_task_army_14_name
descr = drx_ql_simulation_task_army_14_text
descr_functor = drx_ql_assassination_task_target
job_descr = drx_ql_simulation_task_army_14_about
task_complete_descr = drx_ql_simulation_task_army_14_finish

stage_complete = 1
target_functor = drx_ql_assassination_task_target
status_functor = drx_ql_assassination_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_14)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_14)} fail
on_job_descr = %=drx_ql_show_assassination_target(drx_ql_simulation_task_army_14:false)%
on_init = %=drx_ql_give_assassination_target(drx_ql_simulation_task_army_14)%

on_complete = %=drx_ql_reward_random(2500:3500) =drx_ql_reward_stash() =complete_task_inc_goodwill(25:army) =inc_task_stage(drx_ql_simulation_task_army_14) =drx_ql_reset_task(drx_ql_simulation_task_army_14)%

on_fail = %=drx_ql_fail_task(drx_ql_simulation_task_army_14) =drx_ql_reset_task(drx_ql_simulation_task_army_14)%

on_cancel = %=drx_ql_fail_task(drx_ql_simulation_task_army_14) =drx_ql_reset_task(drx_ql_simulation_task_army_14)%

;------------------------------------------------
; Military Stash Transfer Simulation Task-

[drx_ql_simulation_task_army_15]

icon = ui_inGame2_PD_Torgovets_informatsiey
storyline = false
prior = 29
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() -drx_ql_quest_item_pda_task_started} true, false

title = drx_ql_simulation_task_army_15_name
descr = drx_ql_simulation_task_army_15_text
descr_functor = drx_ql_quest_stash_task_target
job_descr = drx_ql_simulation_task_army_15_about
task_complete_descr = drx_ql_simulation_task_army_15_finish

stage_complete = 1
target_functor = drx_ql_quest_stash_task_target
target_functor_params = drx_ql_quest_item_pda
status_functor = drx_ql_quest_stash_task_status
status_functor_params = drx_ql_quest_item_pda
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_15)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_15)} fail

on_job_descr = %=drx_ql_create_quest_stash(drx_ql_quest_item_pda:drx_ql_simulation_task_army_15)%

on_init = %=moon_cotz_reenable_quest_stash() +drx_ql_quest_item_pda_task_started =give_actor(drx_ql_quest_item_stash_case) =drx_ql_add_task_giver_companion(drx_ql_simulation_task_army_15)%

on_complete = %=drx_ql_reward_random(9500:14000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_15) =remove_item(drx_ql_quest_item_pda) =remove_item(drx_ql_quest_item_stash_case) =inc_task_stage(drx_ql_simulation_task_army_15) -drx_ql_quest_item_pda_task_started =pstor_reset(drx_ql_quest_item_pda_stash_id) =drx_ql_reset_task(drx_ql_simulation_task_army_15)%

on_fail = %=drx_ql_remove_quest_stash(drx_ql_quest_item_pda) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_15) =remove_item(drx_ql_quest_item_stash_case) -drx_ql_quest_item_pda_task_started =pstor_reset(drx_ql_quest_item_pda_stash_id) =drx_ql_fail_task(drx_ql_simulation_task_army_15) =drx_ql_reset_task(drx_ql_simulation_task_army_15)%

on_cancel = %=drx_ql_remove_quest_stash(drx_ql_quest_item_pda) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_15) =remove_item(drx_ql_quest_item_stash_case) -drx_ql_quest_item_pda_task_started =pstor_reset(drx_ql_quest_item_pda_stash_id) =drx_ql_fail_task(drx_ql_simulation_task_army_15) =drx_ql_reset_task(drx_ql_simulation_task_army_15)%

;------------------------------------------------
; Capture for the Military Task-

[drx_ql_simulation_task_army_16]

icon = ui_inGame2_Odin_vistrel
storyline = false
prior = 47
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(75) =drx_ql_actor_faction() =drx_ql_is_enemy(stalker:csky:freedom:killer:bandit:monolith) =is_factions_enemies(army:stalker:csky:freedom:killer:bandit:monolith) =drx_ql_find_assassination_target(army:drx_ql_simulation_task_army_16:stalker:csky:freedom:killer:bandit:monolith)} true, false
prisoner_task = true

title = drx_ql_simulation_task_army_16_name
descr = drx_ql_simulation_task_army_16_text
descr_functor = drx_ql_prisoner_task_target
job_descr = drx_ql_simulation_task_army_16_about
task_complete_descr = drx_ql_simulation_task_army_16_finish

stage_complete = 2
target_functor = drx_ql_prisoner_task_target
status_functor = drx_ql_prisoner_task_status
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_16)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_16)} fail
on_job_descr = %=drx_ql_show_assassination_target(drx_ql_simulation_task_army_16:false)%
on_init = %=drx_ql_give_prisoner_target(drx_ql_simulation_task_army_16)%

on_complete = %=drx_ql_reward_random(9500:14000) =drx_ql_reward_stash() =complete_task_inc_goodwill(50:army) =inc_task_stage(drx_ql_simulation_task_army_16) =drx_ql_reset_prisoner_task(drx_ql_simulation_task_army_16) =drx_ql_remove_prisoner(drx_ql_simulation_task_army_16) =drx_ql_reset_task(drx_ql_simulation_task_army_16)%

on_fail = %=drx_ql_fail_task(drx_ql_simulation_task_army_16) =drx_ql_reset_prisoner_task(drx_ql_simulation_task_army_16) =drx_ql_reset_task(drx_ql_simulation_task_army_16)%

on_cancel = %=drx_ql_fail_task(drx_ql_simulation_task_army_16) =drx_ql_reset_prisoner_task(drx_ql_simulation_task_army_16) =drx_ql_reset_task(drx_ql_simulation_task_army_16)%

;------------------------------------------------
; Monolith Dynamic Ambush Task-

[drx_ql_simulation_task_army_17]

icon = ui_inGame2_Issledovanie_anomaliy
storyline = false
prior = 64
weight = 1
repeat_timeout = 259200
precondition = {=drx_ql_random_chance(50) =drx_ql_actor_faction() =drx_ql_is_enemy(stalker:csky:freedom:killer:bandit:monolith) =drx_ql_find_brawl_terrain_ambush(army:drx_ql_simulation_task_army_17:stalker:csky:freedom:killer:bandit:monolith)} true, false

title = drx_ql_simulation_task_army_17_name
descr = drx_ql_simulation_task_army_17_text
descr_1 = drx_ql_simulation_task_army_17_text_1
descr_functor = drx_ql_brawl_task_target_ambush
job_descr = drx_ql_simulation_task_army_17_about
message = drx_ql_simulation_task_army_17_message
task_complete_descr = drx_ql_simulation_task_army_17_finish

stage_complete = 2
target_functor = drx_ql_brawl_task_target_ambush
status_functor = drx_ql_brawl_task_status_ambush
condlist_0 = {!drx_ql_task_giver_alive(drx_ql_simulation_task_army_17)} fail
condlist_1 = {=drx_ql_is_enemy(army)} fail
condlist_2 = {=drx_ql_wg_fail(drx_ql_simulation_task_army_17)} fail

on_job_descr = %=moon_cotz_show_brawl_task_info(drx_ql_simulation_task_army_17)%

on_init = %=drx_ql_setup_brawl_task_ambush(drx_ql_simulation_task_army_17:4:4) =drx_ql_add_task_giver_companion(drx_ql_simulation_task_army_17) =reward_random_item(wpn_rpg7) =drx_ql_give_escort_task_companions(drx_ql_raid_companion_squad_army_2)%

on_complete = %=drx_ql_reward_random(14500:24000) =drx_ql_reward_stash() =reward_random_item(drug_anabiotic) =reward_random_item(medkit_army) =reward_random_item(medkit_scientic) =reward_random_item(antirad) =reward_random_item(drug_booster) =reward_random_item(drug_booster) =complete_task_inc_goodwill(100:army) =inc_task_stage(drx_ql_simulation_task_army_17) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_17) =drx_ql_remove_story_squad(drx_ql_raid_companion_squad_army_2) =drx_ql_end_brawl_task_ambush(drx_ql_simulation_task_army_17) =drx_ql_reset_task(drx_ql_simulation_task_army_17)%

on_fail = %=fail_task_dec_goodwill(25:army) =drx_ql_end_brawl_task_ambush(drx_ql_simulation_task_army_17) =drx_ql_fail_task(drx_ql_simulation_task_army_17) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_17) =drx_ql_remove_story_squad(drx_ql_raid_companion_squad_army_2) =drx_ql_reset_task(drx_ql_simulation_task_army_17)%

on_cancel = %=fail_task_dec_goodwill(75:army) =drx_ql_end_brawl_task_ambush(drx_ql_simulation_task_army_17) =drx_ql_fail_task(drx_ql_simulation_task_army_17) =drx_ql_remove_task_giver_companion(drx_ql_simulation_task_army_17) =drx_ql_remove_story_squad(drx_ql_raid_companion_squad_army_2) =drx_ql_reset_task(drx_ql_simulation_task_army_17)%



; \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
