﻿task_enforce_discipline = {
	default_task = yes
	position = councillor_raid_leader

	asset = {
		icon = "gfx/interface/icons/council_task_types/task_enforce_discipline.dds"
		background = "gfx/interface/buttons/button_round_bg.dds"
		frame = "gfx/interface/buttons/button_round_frame.dds"
		glow = "gfx/particles/halo.dds"
	}

	effect_desc = task_enforce_discipline_effect_desc

	task_type = task_type_general
	task_progress = task_progress_infinite

	council_owner_modifier = {
		name = task_enforce_discipline
		movement_speed_land_raiding = 1
		scale = task_enforce_discipline_raid_move_speed
	}

	council_owner_modifier = {
		name = task_enforce_discipline
		raid_speed = 1
		scale = task_enforce_discipline_raid_speed
	}

	council_owner_modifier = {
		name = task_enforce_discipline
		hostile_county_attrition_raiding = 1
		scale = task_enforce_discipline_raid_attrition
	}

	ai_will_do = {
		value = 1 # Always a good backup
	}
}

task_border_raids = {
	position = councillor_raid_leader

	asset = {
		icon = "gfx/interface/icons/council_task_types/task_border_raids.dds"
		background = "gfx/interface/buttons/button_round_bg.dds"
		frame = "gfx/interface/buttons/button_round_frame.dds"
		glow = "gfx/particles/halo.dds"
	}

	effect_desc = task_border_raids_effect_desc

	task_type = task_type_general
	task_progress = task_progress_percentage
	restart_on_finish = yes

	is_valid_showing_failures_only = {
		any_valid_border_raids_county = yes
	}

	council_owner_modifier = {
		name = task_border_raids
		levy_reinforcement_rate = 1
		scale = task_border_raids_levy_reinforcement_rate_penalty
	}

	on_finish_task = {
		trigger_event = { # task_border_raids Completion
			id = regula_council_event.3100
		}
	}

	progress = {
		value = task_border_raids_monthly_progress
	}

	ai_will_do = {
		value = 0 # AI should never do this.
	}
}

task_scout_targets = {
	position = councillor_raid_leader

	asset = {
		icon = "gfx/interface/icons/council_task_types/task_scout_targets.dds"
		background = "gfx/interface/buttons/button_round_bg.dds"
		frame = "gfx/interface/buttons/button_round_frame.dds"
		glow = "gfx/particles/halo.dds"
	}

	effect_desc = {
		triggered_desc = {
			trigger = {
				NOT = { exists = scope:county }
			}
			desc = task_scout_targets_effect_desc
		}
		triggered_desc = {
			trigger = {
				exists = scope:county
			}
			desc = task_scout_targets_contested_effect_desc
		}
	}

	task_type = task_type_county
	county_target = all
	task_progress = task_progress_percentage
	restart_on_finish = yes	# Task will repeat until target county has no valid scout targets left
	highlight_own_realm = no

	potential_county = {
		is_valid_scout_targets_county = yes
	}

	on_finish_task_county = {
		trigger_event = { # task_scout_targets Completion
			id = regula_council_event.3000
		}
	}

	progress = {
		value = task_scout_targets_monthly_progress
	}

	ai_will_do = {
		value = 0 # AI should never do this.
	}
}
