###########################
# Madagascar Decisions
###########################

political_actions = {
	MAG_claim_maf = {
		icon = generic_form_nation
		fire_only_once = yes
		allowed = { tag = MAG }
		visible = {
			has_global_flag = MAF_collapse
		}
		available = {
			has_global_flag = MAF_collapse
			OR = {
			has_completed_focus = MAG_traduitdelanuit
			has_completed_focus = MAG_lacroixdefeu
			has_completed_focus = MAG_themadagaskarplan
			}
			has_war = no
		}
		cost = 100
		ai_will_do = {
			factor = 0
		}
		remove_effect = {
		set_country_flag = MAG_claim_maf
		custom_effect_tooltip = KIK_gain_wargoals_tt
		every_country = {
			limit = { is_in_array = { global.MAF_collapse_tags = THIS } }
			ROOT = {
				create_wargoal = {
					type = annex_everything target = PREV
				}
			}
		}
		every_state = {
			limit = { has_state_flag = MAF_claim }
			ROOT = {
				add_state_claim = PREV
			}
		}
		hidden_effect = { add_state_claim = 925 }
		every_country = {
			limit = { is_subject_of = ROOT }
			ROOT = {
				annex_country = {
					target = PREV
					transfer_troops = yes
				}
			}
		}
		unlock_decision_tooltip = AFR_form_maf
		log = "[GetDateText]: [Root.GetName]: Decision MAG_claim_maf"
		}
	}
	MAG_form_maf = {
		icon = generic_form_nation
		fire_only_once = yes
		allowed = { tag = MAG }
		visible = {
			has_global_flag = MAF_collapse
			has_country_flag = MAG_claim_maf
			OR = {
			has_completed_focus = MAG_traduitdelanuit
			has_completed_focus = MAG_lacroixdefeu
			has_completed_focus = MAG_themadagaskarplan
			}
		}
		available = {
			has_global_flag = MAF_collapse
			OR = {
			has_completed_focus = MAG_traduitdelanuit
			has_completed_focus = MAG_lacroixdefeu
			has_completed_focus = MAG_themadagaskarplan
			}
			owns_state = 539
			owns_state = 1183
			owns_state = 965
			owns_state = 925
			owns_state = 660
			owns_state = 927
			owns_state = 558
			owns_state = 881
			has_war = no
		}
		days_remove = 10
		cost = 0
		ai_will_do = {
			factor = 0
		}
		remove_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision AFR_accept_bribes"
			custom_effect_tooltip = MAF_reform_mittelafrika_tt
			every_state = {
				limit = { has_state_flag = MAF_claim }
				ROOT = {
						add_state_core = PREV
				}
			}
			hidden_effect = { 925 = { add_core_of = MAG } }
			set_cosmetic_tag = NFA_MITTEL
		}
	}
	MAG_secure_heydrichs_rule = {

		allowed = { tag = MAG }

		activation = {
			has_country_flag = MAG_heydrich_timer_start_flag
		}

		available = {
			hidden_trigger = {
				always = no
			}
		}

		days_mission_timeout = 250
		is_good = no
		fire_only_once = yes

		cancel_trigger = {
			has_completed_focus = MAG_turn_watchdogs_away
		}

		timeout_effect = {
			log = "[GetDateText]: [Root.GetName]: Decision timeout MAG_secure_heydrichs_rule"
			custom_effect_tooltip = MAG_Heydrich_will_be_sacked
			hidden_effect = {
				complete_national_focus = MAG_thegeneralgouverneurdeparts
				set_country_flag = MAG_heydrich_fired
			}
		}
	}
}