add_namespace = MAD
add_namespace = MAD_GER
add_namespace = MAD_USA
add_namespace = MAD_JAP
add_namespace = MAD_FRA
add_namespace = MAD_misc
add_namespace = MAD_vic
add_namespace = MAD_Maurice
add_namespace = MAD.debug
add_namespace = MAD_news

### DEBUG EVENTS ###

country_event = { # Madagaskar Intro Event
	id = MAD.debug.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.debug.1" }
	title = MAD.debug.1.t
	desc = MAD.debug.1.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.debug.1.a
		MAD_Pierre_Boisson = {
			promote_character = fascism_corporate_statism_subtype
		}
	}
}
### MISC EVENTS ###

country_event = { #
	id = MAD_misc.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_misc.1" }
	title = MAD_misc.1.t
	desc = MAD_misc.1.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes

	option = {
		name = MAD_misc.1.a

	}
}
country_event = { #
	id = MAD_misc.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_misc.2" }
	title = MAD_misc.2.t
	desc = MAD_misc.2.desc
	picture = GFX_report_event_MAD_beachhead

	is_triggered_only = yes

	option = {
		name = MAD_misc.2.a

	}
}
country_event = { #
	id = MAD_misc.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_misc.3" }
	title = MAD_misc.3.t
	desc = MAD_misc.3.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	is_triggered_only = yes

	option = {
		name = MAD_misc.3.a
		custom_effect_tooltip = MADCW_AKFM_Support_tt
		set_country_flag = USA_MADCW_supports_AKFM
		MAD = {
			add_to_variable	= { MADCW_locals_cont_v1 = 0.05 }
		}
	}
	option = {
		name = MAD_misc.3.b
	}
}

# post war fun events

country_event = { # USA-JAP-GER Malagasy Vic
	id = MAD_vic.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.1" }
	title = MAD_vic.1.t
	desc = MAD_vic.1.desc
	picture = GFX_report_event_MAD_malagasy_people

	is_triggered_only = yes

	option = {
		name = MAD_vic.1.a

	}
}

country_event = { # USA-JAP - PADESM Victory
	id = MAD_vic.101
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.101" }
	title = MAD_vic.101.t
	desc = MAD_vic.101.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = MAD_vic.101.a
		if = { # Yay, our guys won!
			limit = {
				tag = USA
			}
			set_temp_variable = { conclusion_weeks = 4 }
			set_temp_variable = { conclusion_bonus = 0.02 }
			USA_proxy_conclusion_effect = yes
		}
	}
}

country_event = { # USA - PADESM OFN Candidacy 
	id = MAD_vic.102
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.102" }
	title = MAD_vic.102.t
	desc = MAD_vic.102.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD_vic.102.a
		custom_effect_tooltip = MAD_vic.102.tt
	}
}

country_event = { # USA - Madagascar Joins the OFN 
	id = MAD_vic.103
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.103" }
	title = MAD_vic.103.t
	desc = MAD_vic.103.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD_vic.103.a
	}
}

country_event = { # USA - Raseta Elected
	id = MAD_vic.104
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.104" }
	title = MAD_vic.104.t
	desc = MAD_vic.104.desc
	picture = GFX_report_event_USA_cia

	is_triggered_only = yes

	option = {
		name = MAD_vic.104.a
		custom_effect_tooltip = MAD_vic.104.tt
		set_country_flag = USA_OP_THERM
	}
}

country_event = { # USA-JAP - TAFAMA Victory
	id = MAD_vic.105
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.105" }
	title = MAD_vic.105.t
	desc = MAD_vic.105.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD_vic.105.a
		if = { # At least it's not the Germans
			limit = {
				tag = USA
			}
			set_temp_variable = { conclusion_weeks = 4 }
			set_temp_variable = { conclusion_bonus = 0.010 }
			USA_proxy_conclusion_effect = yes
		}
	}
}

country_event = { # JAP - TAFAMA Sphere Membership
	id = MAD_vic.106
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.106" }
	title = MAD_vic.106.t
	desc = MAD_vic.106.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD_vic.106.a
		add_political_power = 75
		JAP_PM_increase_power_avg = yes
		JAP_PA_support_increase_med = yes

	}
}

country_event = { # USA-JAP - AKFM Victory
	id = MAD_vic.107
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.107" }
	title = MAD_vic.107.t
	desc = MAD_vic.107.desc
	picture = GFX_report_event_MAD_malagasy_people

	is_triggered_only = yes

	immediate = { set_country_flag = conclusion_victory }

	option = {
		name = MAD_vic.107.a
		if = { # At least it's not the Japanese or Germans
			limit = {
				tag = USA
			}
			set_temp_variable = { conclusion_weeks = 4 }
			set_temp_variable = { conclusion_bonus = 0.005 }
			USA_proxy_conclusion_effect = yes
		}
	}
}

country_event = { # USA-JAP-GER Malagasy Vic
	id = MAD_vic.108
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.108" }
	title = MAD_vic.108.t
	desc = MAD_vic.108.desc
	picture = GFX_report_event_MAD_malagasy_attack

	is_triggered_only = yes

	option = {
		name = MAD_vic.108.a

	}
}

country_event = { # USA-JAP-GER Malagasy Vic
	id = MAD_vic.109
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.109" }
	title = MAD_vic.109.t
	desc = MAD_vic.109.desc
	picture = GFX_report_event_MAD_malagasy_attack

	is_triggered_only = yes

	option = {
		name = MAD_vic.109.a

	}
}

country_event = { # USA-JAP-GER Malagasy Vic
	id = MAD_vic.110
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.110" }
	title = MAD_vic.110.t
	desc = MAD_vic.110.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD_vic.110.a

	}
}

country_event = { # USA-JAP-GER Malagasy Vic
	id = MAD_vic.111
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.111" }
	title = MAD_vic.111.t
	desc = MAD_vic.111.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD_vic.111.a

	}
}

country_event = { # USA - Operation Thermidor Coup
	id = MAD_vic.112
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.112" }
	title = MAD_vic.112.t
	desc = MAD_vic.112.desc
	picture = GFX_report_event_USA_cia

	is_triggered_only = yes

	option = {
		name = MAD_vic.112.a

	}
}

country_event = { # USA - Operation Thermidor Failure
	id = MAD_vic.113
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.113" }
	title = MAD_vic.113.t
	desc = MAD_vic.113.desc
	picture = GFX_report_event_USA_cia

	is_triggered_only = yes

	option = {
		name = MAD_vic.113.a

	}
}

country_event = { # USA-JAP-GER Colonial Vic
	id = MAD_vic.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.2" }
	title = MAD_vic.2.t
	desc = MAD_vic.2.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes

	option = {
		name = MAD_vic.2.a
		if = { # The German won completely
			limit = {
				tag = USA
			}
			set_temp_variable = { conclusion_weeks = 4 }
			set_temp_variable = { conclusion_bonus = 0.020 }
			USA_proxy_conclusion_effect = yes
		}
		if = {
			limit = {
				tag = GER
			}
			add_political_power = 50
		}
	}
}

country_event = { #
	id = MAD_vic.200
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_vic.200" }
	title = MAD_vic.200.t
	desc = MAD_vic.200.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes

	option = {
		name = MAD_vic.200.a

	}
}

# Maurice Chain

country_event = { # Bring Maurice to America! (USA, GER Event)
	id = MAD_Maurice.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.1" }
	title = MAD_Maurice.1.t
	desc = MAD_Maurice.1.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.1.a
		if = {
			limit = { tag = USA }
			hidden_effect = {
				USA = {
					country_event = {
						id = MAD_Maurice.2
						days = 12
					}
				}
				GER = {
					country_event = {
						id = MAD_Maurice.2
						days = 12
					}
				}
			}
		}
	}
}

country_event = { # Bring Maurice to America! (USA, GER Event)
	id = MAD_Maurice.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.2" }
	title = MAD_Maurice.2.t
	desc = MAD_Maurice.2.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.2.a
		if = {
			limit = {
				tag = USA
			}
			custom_effect_tooltip = USA_Maurice_InterceptHome
		}
		if = {
			limit = {
				tag = GER
			}
			custom_effect_tooltip = GER_Maurice_InterceptKill
		}
		set_global_flag = MAD_Maurice_Stage_2
	}
}

country_event = { # Maurice Defects to America
	id = MAD_Maurice.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.3" }
	title = MAD_Maurice.3.t
	desc = MAD_Maurice.3.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.3.a
		if = {
			limit = {
				tag = USA
			}
			set_country_flag = MAD_ACHIEVE_MAURICE_DEFECT
			set_temp_variable = { Victory_ID = 32 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { Victory_Points = 1 }
			Cold_War_GUI_AddVictory = yes
		}
		else_if = {
			limit = {
				tag = GER
			}
			set_temp_variable = { Victory_ID = 32 }
			set_temp_variable = { Victory_Outcome = 1 }
			set_temp_variable = { Victory_Points = -1 }
			Cold_War_GUI_AddVictory = yes
		}
		clr_global_flag = MAD_Maurice_Decisions
	}
}

country_event = { # Maurice Defects to America
	id = MAD_Maurice.31
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.31" }
	title = MAD_Maurice.31.t
	desc = MAD_Maurice.31.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.31.a
		clr_global_flag = MAD_Maurice_Decisions
	}
}

country_event = { # Maurice is killed before defecting to America
	id = MAD_Maurice.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.4" }
	title = MAD_Maurice.4.t
	desc = MAD_Maurice.4.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.4.a
		if = {
			limit = {
				tag = USA
			}
			set_temp_variable = { Victory_ID = 33 }
			set_temp_variable = { Victory_Outcome = 1 }
			set_temp_variable = { Victory_Points = -1 }
			Cold_War_GUI_AddVictory = yes
		}
		else_if = {
			limit = {
				tag = GER
			}
			set_country_flag = MAD_ACHIEVE_MAURICE_DEATH
			set_temp_variable = { Victory_ID = 33 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { Victory_Points = 1 }
			Cold_War_GUI_AddVictory = yes
		}
		clr_global_flag = MAD_Maurice_Decisions
	}
}

country_event = { # Maurice is killed before defecting to America
	id = MAD_Maurice.41
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.41" }
	title = MAD_Maurice.41.t
	desc = MAD_Maurice.41.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.41.a
		if = {
			limit = { tag = USA }
			hidden_effect = {
				USA = { country_event = { id = MAD_Maurice.1 hours = 6 } }
				GER = { country_event = { id = MAD_Maurice.1 hours = 6 } }
			}
		}
	}
}

country_event = { # Maurice is killed before being intercepted by America
	id = MAD_Maurice.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.5" }
	title = MAD_Maurice.5.t
	desc = MAD_Maurice.5.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.5.a
		if = {
			limit = {
				tag = USA
			}
			set_temp_variable = { Victory_ID = 33 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -1 }
			Cold_War_GUI_AddVictory = yes
		}
		else_if = {
			limit = {
				tag = GER
			}
			set_country_flag = MAD_ACHIEVE_MAURICE_DEATH
			set_temp_variable = { Victory_ID = 33 }
			set_temp_variable = { Victory_Outcome = 4 }
			set_temp_variable = { Victory_Points = 1 }
			Cold_War_GUI_AddVictory = yes
		}
		clr_global_flag = MAD_Maurice_Decisions
	}
}

country_event = { # Maurice is killed before being intercepted by America
	id = MAD_Maurice.51
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.51" }
	title = MAD_Maurice.51.t
	desc = MAD_Maurice.51.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_Maurice.51.a
		clr_global_flag = MAD_Maurice_Decisions
	}
}

country_event = { # Maurice defects to Japan
	id = MAD_Maurice.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.6" }
	title = MAD_Maurice.6.t
	desc = MAD_Maurice.6.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes
	option = {
		name = MAD_Maurice.6.a
		set_country_flag = MAD_maurice_japan
		hidden_effect = {
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = MAD_news.6
					days = 5
				}
			}
		}
	}
	option = { # fuck off
		name = MAD_Maurice.6.b
		hidden_effect = {
			USA = {
				country_event = {
					id = MAD_Maurice.7
					days = 300
				}
			}
			GER = {
				country_event = {
					id = MAD_Maurice.7
					days = 300
				}
			}
			JAP = {
				country_event = {
					id = MAD_Maurice.7
					days = 300
				}
			}
		}
	}
}

country_event = { # Maurice IS GONE
	id = MAD_Maurice.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_Maurice.7" }
	title = MAD_Maurice.7.t
	desc = MAD_Maurice.7.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			if = {
				limit = {
					tag = USA
				}
				set_temp_variable = { Victory_ID = 32 }
				set_temp_variable = { Victory_Outcome = 3 }
				set_temp_variable = { Victory_Points = 0 }
				Cold_War_GUI_AddVictory = yes
			}
			else_if = {
				limit = {
					tag = GER
				}
				set_temp_variable = { Victory_ID = 32 }
				set_temp_variable = { Victory_Outcome = 3 }
				set_temp_variable = { Victory_Points = 0 }
				Cold_War_GUI_AddVictory = yes
			}
		}
	}
	option = {
		name = MAD_Maurice.7.a
	}
}

### GERMANY EVENTS ###
country_event = { # December '62 - French Empire: About Madagascar and the MvM and GMA
	id = MAD_GER.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.1" }
	title = MAD_GER.1.t
	desc = MAD_GER.1.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes
	fire_only_once = yes

	option = {
		name = MAD_GER.1.a
		hidden_effect = {
			country_event = {
				id = MAD_GER.2
				days = 52
			}
			USA = {
				country_event = {
					id = MAD_USA.1
					days = 35
				}
			}
			JAP = {
				country_event = {
					id = MAD_JAP.1
					days = 35
				}
			}
		}
	}
}
country_event = { # February '63 - Unrest in Tana: Reports from the GMA about island unrest
	id = MAD_GER.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.2" }
	title = MAD_GER.2.t
	desc = MAD_GER.2.desc
	picture = GFX_report_event_MAD_malagasy_attack

	is_triggered_only = yes

	option = {
		name = MAD_GER.2.a
		hidden_effect = {
			country_event = {
				id = MAD_GER.3
				days = 25
			}
			country_event = {
				id = MAD_GER.5
				days = 16
			}
			USA = {
				country_event = {
					id = MAD_USA.2
					days = 26
				}
			}
			JAP = {
				country_event = {
					id = MAD_JAP.2
					days = 20
				}
			}
		}
	}
}
country_event = { # March '63 - The Second Uprising: Police mutiny seizes Tana, govt collapses
	id = MAD_GER.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.3" }
	title = MAD_GER.3.t
	desc = MAD_GER.3.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	is_triggered_only = yes

	option = {
		name = MAD_GER.3.a
		custom_effect_tooltip = MAD_GER.3_tt
		TNO_fopo_add_madagascar_conflict_tab = yes

		if = {
			limit = {
				is_ai = yes
			}
			activate_mission = GER_ai_state_shift
		}

		set_temp_variable = { target = MDG }
		TNO_increase_volunteer_cap_1 = yes

		set_temp_variable = { Victory_ID = 26 }
		Cold_War_GUI_AddVictory = yes

		hidden_effect = {
			MAD_setup_civil_war = yes
			country_event = {
				id = MAD_GER.4
				days = 1
			}
			MAD = {
				country_event = {
					id = MAD.3
					days = 20
				}
			}
			USA = {
				country_event = {
					id = MAD_misc.1
					days = 1
				}
				country_event = {
					id = MAD_misc.2
					days = 16
				}
				country_event = {
					id = MAD_misc.3
					days = 40
				}
			}
			JAP = {
				country_event = {
					id = MAD_JAP.3
					days = 10
				}
				country_event = {
					id = MAD_misc.1
					days = 1
				}
				country_event = {
					id = MAD_misc.2
					days = 16
				}
				country_event = {
					id = MAD_misc.3
					days = 40
				}
			}
			GER = {
				country_event = {
					id = MAD_misc.1
					days = 1
				}
			}
		}
	}
}
country_event = { # April '63 - Escalation: Germania retroactively supports power seizure
	id = MAD_GER.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.4" }
	title = MAD_GER.4.t
	desc = MAD_GER.4.desc
	picture = GFX_report_event_MAD_emil_maurice_1

	is_triggered_only = yes

	immediate = {
		hidden_effect = {
			country_event = {
				id = MAD_GER.7
				days = 60
			}
		}
	}

	option = {
		name = MAD_GER.4.a
		custom_effect_tooltip = MAD_GER.4_tt
		# activate_mission = # 34 days from now the war of independence will begin
		MDG = {
			set_cosmetic_tag = MDG_GERMAN
			promote_character = MDG_Emil_Maurice
			# HERE GOES THE POLITICS CHANGE FOR COLONIAL MADAGASCAR
		}
		hidden_effect = {
			USA = {
				country_event = {
					id = MAD_USA.3
					days = 7
				}
			}
		}
	}
}
country_event = { # Flavor 1
	id = MAD_GER.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.5" }
	title = MAD_GER.5.t
	desc = MAD_GER.5.desc
	picture = GFX_report_event_MAD_malagasy_attack

	is_triggered_only = yes

	option = {
		name = MAD_GER.5.a
		hidden_effect = {
			country_event = {
				id = MAD_GER.6
				days = 5
			}
		}
	}
}
country_event = { # Flavor 2
	id = MAD_GER.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.6" }
	title = MAD_GER.6.t
	desc = MAD_GER.6.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes

	option = {
		name = MAD_GER.6.a
	}
}

country_event = { # Blockade of the island
	id = MAD_GER.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.7" }
	title = MAD_GER.7.t
	desc = MAD_GER.7.desc
	picture = GFX_report_event_MAD_beachhead

	is_triggered_only = yes

	option = {
		name = MAD_GER.7.a
	}
}

country_event = { # Palace Coup, Maurice will be overthrown
	id = MAD_GER.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.8" }
	title = MAD_GER.8.t
	desc = MAD_GER.8.desc
	picture = GFX_report_event_MAD_emil_maurice_1

	trigger = {
		OR = {
			country_exists = MDG
			NOT = { # so it can't happen after the CW
				MAD = {
					has_country_leader = {
						character = MDG_Generalburo_Madagassische
						ruling_only = yes
					}
				}
			}
		}
	}
	is_triggered_only = yes

	option = {
		name = MAD_GER.8.a
		hidden_effect = {
			MDG = {
				promote_character = MDG_Erhard_Milch
			}
		}
	}
}

country_event = { # Madagascar Palace Coup, Maurice gone
	id = MAD_GER.9
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.9" }
	title = MAD_GER.9.t
	desc = MAD_GER.9.desc
	picture = GFX_report_event_MAD_emil_maurice_1

	trigger = {
		OR = {
			country_exists = MDG
			NOT = { # so it can't happen after the CW
				MAD = {
					has_country_leader = {
						character = MDG_Generalburo_Madagassische
						ruling_only = yes
					}
				}
			}
		}
	}
	is_triggered_only = yes

	option = {
		name = MAD_GER.9.a
		hidden_effect = {
		}
	}
}

country_event = { #
	id = MAD_GER.10
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_GER.10" }
	title = MAD_GER.10.t
	desc = MAD_GER.10.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	trigger = {
		NOT = {
			has_global_flag = german_civil_war_goeringvic
		}
	}

	is_triggered_only = yes

	option = {
		name = MAD_GER.10.a
		custom_effect_tooltip = GER_Maurice_Decisions_TT
	}
}

### USA EVENTS ###
country_event = { # January '63 - Malagasy Lobby: About PADESM and the exiles in FFR
	id = MAD_USA.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_USA.1" }
	title = MAD_USA.1.t
	desc = MAD_USA.1.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD_USA.1.a
	}
}
country_event = { # March '63 - Homecoming: CIA meet with PADESM in FFR about uprising
	id = MAD_USA.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_USA.2" }
	title = MAD_USA.2.t
	desc = MAD_USA.2.desc
	picture = GFX_report_event_MAD_malagasy_people

	is_triggered_only = yes

	option = {
		name = MAD_USA.2.a
		TNO_fopo_add_madagascar_conflict_tab = yes
		if = {
			limit = {
				is_ai = yes
			}
			activate_mission = USA_ai_state_shift
		}

		set_temp_variable = { Victory_ID = 26 }
		Cold_War_GUI_AddVictory = yes
	}
}
country_event = { # April '63 - Airlift: Massive supply to PADESM allies via SAF
	id = MAD_USA.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_USA.3" }
	title = MAD_USA.3.t
	desc = MAD_USA.3.desc
	picture = GFX_report_event_MAD_malagasy_people

	is_triggered_only = yes

	option = {
		name = MAD_USA.3.a
		# enables decisions to supply PADESM
	}
}

country_event = { # Maurice arrested in South Africa
	id = MAD_USA.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_USA.4" }
	title = MAD_USA.4.t
	desc = MAD_USA.4.desc
	picture = GFX_report_event_MAD_emil_maurice_2

	is_triggered_only = yes

	option = {
		name = MAD_USA.4.a
		set_global_flag = MAD_Maurice_Decisions
		custom_effect_tooltip = USA_CIA_Maurice_Decisions_TT
	}
}

### JAPAN EVENTS ###
country_event = { # January '63 - National Exiles: About TAFAMA and Malagasy nationalism
	id = MAD_JAP.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_JAP.1" }
	title = MAD_JAP.1.t
	desc = MAD_JAP.1.desc
	picture = GFX_report_event_MAD_malagasy_people

	is_triggered_only = yes

	option = {
		name = MAD_JAP.1.a
	}
}
country_event = { # March '63 - Inside Man: Police in Tana pass info about impending mutiny
	id = MAD_JAP.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_JAP.2" }
	title = MAD_JAP.2.t
	desc = MAD_JAP.2.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	is_triggered_only = yes

	option = {
		name = MAD_JAP.2.a
	}
}
country_event = { # April '63 - Landfall: Japanese agents land in Madagascar
	id = MAD_JAP.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_JAP.3" }
	title = MAD_JAP.3.t
	desc = MAD_JAP.3.desc
	picture = GFX_report_event_MAD_beachhead

	is_triggered_only = yes

	option = {
		name = MAD_JAP.3.a
		TNO_fopo_add_madagascar_conflict_tab = yes
		if = {
			limit = {
				is_ai = yes
			}
			activate_mission = JAP_ai_state_shift
		}
		set_temp_variable = { target = MAD }
		TNO_increase_volunteer_cap_1 = yes

		set_temp_variable = { Victory_ID = 26 }
		Cold_War_GUI_AddVictory = yes
	}
}


### SKELETON EVENTS ###

country_event = { # Boisson yeeted
	id = MAD.2
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.2" }
	title = MAD.2.t
	desc = MAD.2.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.2.a
	}
}

country_event = { # TAFAMA Consolidates
	id = MAD.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.3" }
	title = MAD.3.t
	desc = MAD.3.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.3.a
		promote_character = MAD_Governing_Council
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		set_party_name = {
			ideology = despotism
			long_name = MAD_despotism_tafama_party_long
			name = MAD_despotism_tafama_party
		}
		set_popularities = {
			despotism = 45
			paternalism = 0
			liberal_conservatism = 20
			progressivism = 25
			socialist = 10
		}
	}
}

country_event = { # TAFAMA collapses
	id = MAD.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.4" }
	title = MAD.4.t
	desc = MAD.4.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.4.a

	}
}

country_event = { # Deadlock, Socialists seize
	id = MAD.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.5" }
	title = MAD.5.t
	desc = MAD.5.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.5.a
		promote_character = {
			character = MAD_Central_Committee
			ideology = socialist_left_wing_nationalism_subtype
		}
		set_cosmetic_tag = MAD_akfm
		set_country_flag = MAD_akfm_path
		set_politics = {
			ruling_party = socialist
			elections_allowed = no
		}
		set_popularities = {
			progressivism = 10
			socialist = 40
			communist = 50
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
		econ_type_change = yes

		JAP = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 3 }
			set_temp_variable = { Victory_Points = 0 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		USA = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 3 }
			set_temp_variable = { Victory_Points = 0 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		GER = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}

		USA = {
			country_event = {
				id = MAD_vic.107
				days = 1
			}
		}
		JAP = {
			country_event = {
				id = MAD_vic.107
				days = 1
			}
		}
		country_event = { id = MAD.6 days = 60 }
	}
}


country_event = { # Deadlock, Socialists seize
	id = MAD.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.6" }
	title = MAD.6.t
	desc = MAD.6.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.6.a
		random_list = {
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = { rule = MAD_SOCIALIST_LEADER option = MAD_SOCIALIST_LEADER_RAVOAJANAHARY }
						has_game_rule = { rule = MAD_SOCIALIST_LEADER option = MAD_SOCIALIST_LEADER_RABESAHALA }
					}
				}
				promote_character = {
					character = MAD_Didier_Ratsiraka
					ideology = socialist_left_wing_nationalism_subtype
				}
			}
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = { rule = MAD_SOCIALIST_LEADER option = MAD_SOCIALIST_LEADER_RATSIRAKA }
						has_game_rule = { rule = MAD_SOCIALIST_LEADER option = MAD_SOCIALIST_LEADER_RABESAHALA }
					}
				}
				promote_character = MAD_Charles_Ravoajanahary
				if = {
					limit = {
						CAO = { # PACMEA has formed
							has_country_flag = HAS_ECON_SPHERE
						}
					}
					econ_join_sphere_CAO = yes
				}
			}
			40 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = { rule = MAD_SOCIALIST_LEADER option = MAD_SOCIALIST_LEADER_RATSIRAKA }
						has_game_rule = { rule = MAD_SOCIALIST_LEADER option = MAD_SOCIALIST_LEADER_RAVOAJANAHARY }
					}
				}
				set_politics = {
					ruling_party = communist
					elections_allowed = no
				}
				promote_character = MAD_Gisele_Rabesahala
			}
		}
	}
}

country_event = { # PADESM Victory
	id = MAD.20
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.20" }
	title = MAD.20.t
	desc = MAD.20.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.20.a
		set_cosmetic_tag = MAD_padesm
		set_country_flag = MAD_padesm_path
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_padesm_party_long
			name = MAD_paternalism_padesm_party
		}
		MAD_Norbert_Zafimahova = {
			promote_character = paternalism_provisional_government_subtype
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		country_event = {
			id = MAD.21
			days = 80
		}
		set_popularities = {
			paternalism = 45
			liberal_conservatism = 20
			progressivism = 25
			socialist = 10
		}
		JAP = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		USA = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { Victory_Points = 100 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		GER = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 1 }
			set_temp_variable = { Victory_Points = -100 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		set_country_flag = MAD_ACHIEVEMENT_US_VICTORY
		econ_join_sphere_USA = yes
		USA = {
			country_event = {
				id = MAD_vic.101
				days = 1
			}
			country_event = {
				id = MAD_vic.102
				days = 40
			}
		}
		NZL = {
			add_to_variable = { NZL_World_Stage_var = 1 }
			if = { limit = { NOT = { has_country_flag = NZL_first_election } }
			add_to_variable = { NZ_Election_var = 2 } }
			set_country_flag = NZL_Madagascar_First
			if = {
				limit = {
					has_country_flag = NZL_first_election 
					NOT = { has_country_flag = NZL_Madagascar_First }
					has_country_leader = { character = NZL_Keith_Holyoake ruling_only = yes }
				}
			add_to_variable = { NZ_Election_var = 2 } 
			}
			NZ_Skeleton_Effect = yes
		}
		JAP = {
			country_event = {
				id = MAD_vic.101
				days = 1
			}
		}
	}
}

country_event = { # PADESM Elections
	id = MAD.21
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.21" }
	title = MAD.21.t
	desc = MAD.21.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.21.a
		random_list = {
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_ELECTION
							option = MAD_PADESM_ELECTION_PROGRESSIVISM
						}
						has_game_rule = {
							rule = MAD_PADESM_ELECTION
							option = MAD_PADESM_ELECTION_SOCIALIST
						}
					}
				}
				set_politics = {
					ruling_party = liberal_conservatism
					last_election = "1963.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				MAD_Philibert_Tsiranana = {
					promote_character = liberal_conservatism_big_tent_subtype
				}
				country_event = {
					id = MAD.29
					days = 50
				}
				country_event = {
					id = MAD.28
					days = 1825
				}
				set_popularities = {
					paternalism = 10
					liberal_conservatism = 40
					progressivism = 15
					socialist = 35
				}
				set_party_name = {
					ideology = socialist
					long_name = MAD_FIPIMA_party_long
					name = MAD_FIPIMA_party
				}
				set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Capitalism }
				econ_type_change = yes
			}
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_ELECTION
							option = MAD_PADESM_ELECTION_LIBERAL_CONSERVATISM
						}
						has_game_rule = {
							rule = MAD_PADESM_ELECTION
							option = MAD_PADESM_ELECTION_SOCIALIST
						}
					}
				}
				set_politics = {
					ruling_party = progressivism
					last_election = "1963.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				country_event = {
					id = MAD.28
					days = 1825
				}
				country_event = {
					id = MAD.29
					days = 50
				}
				set_popularities = {
					paternalism = 10
					liberal_conservatism = 15
					progressivism = 40
					socialist = 35
				}
				set_party_name = {
					ideology = socialist
					long_name = MAD_FIPIMA_party_long
					name = MAD_FIPIMA_party
				}
				set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Capitalism }
				econ_type_change = yes
			}
			40 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_ELECTION
							option = MAD_PADESM_ELECTION_PROGRESSIVISM
						}
						has_game_rule = {
							rule = MAD_PADESM_ELECTION
							option = MAD_PADESM_ELECTION_LIBERAL_CONSERVATISM
						}
					}
				}
				set_politics = {
					ruling_party = socialist
					last_election = "1963.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				set_popularities = {
					paternalism = 10
					liberal_conservatism = 15
					progressivism = 15
					socialist = 60
				}
				country_event = { id = MAD.23 days = 400 }
				MAD_Joseph_Raseta = {
					promote_character = socialist_revolutionary_frontism_subtype
				}
				set_party_name = {
					ideology = socialist
					long_name = MAD_FIPIMA_party_long
					name = MAD_FIPIMA_party
				}
				set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
				econ_type_change = yes
				USA = {
					country_event = {
						id = MAD_vic.104
					}
				}
			}
		}
	}
}

country_event = { # Raseta communism
	id = MAD.23
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.23" }
	title = MAD.23.t
	desc = MAD.23.desc
	picture = GFX_report_event_MAD_antanarivo_2
	is_triggered_only = yes
	trigger = {
		NOT = { has_country_flag = MAD_thermidor_incoming }
	}

	option = {
		name = MAD.23.a
		set_cosmetic_tag = MAD_tafama
		MAD_Joseph_Raseta = {
			promote_character = communist_national_communism_subtype
		}
		set_party_name = {
			ideology = communist
			long_name = MAD_FIPIMA_party_long
			name = MAD_FIPIMA_party
		}
		set_politics = {
			ruling_party = communist
			last_election = "1963.8.8"
			election_frequency = 60
			elections_allowed = yes
		}
		set_popularities = {
			paternalism = 10
			socialist = 30
			communist = 60
		}
		econ_leave_sphere = yes
		USA = {
			clr_country_flag = USA_OP_THERM
			country_event = {
				id = MAD_vic.113
			}
		}
		JAP = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		USA = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		GER = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 1 }
			set_temp_variable = { Victory_Points = -100 }
			Cold_War_GUI_ManipulateVictory = yes
		}
	}
}

country_event = { # military coup
	id = MAD.24
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.24" }
	title = MAD.24.t
	desc = MAD.24.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.24.a
		MAD_Gabriel_Ramanantsoa = {
			promote_character = despotism_military_junta_subtype
		}
		set_party_name = {
			ideology = despotism
			long_name = MAD_despotism_military_party_long
			name = MAD_despotism_military_party
		}
		set_country_flag = USA_MAD_coup_shit
		set_politics = {
			ruling_party = despotism
			elections_allowed = no
		}
		set_popularities = {
			despotism = 60
			paternalism = 10
			liberal_conservatism = 15
			progressivism = 15
			socialist = 0
		}
		set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Dirigisme }
		econ_subtype_change = yes
		USA = { add_to_faction = MAD }
		add_to_array = { global.OFN_members = MAD }
		add_ideas = OFN_Dependent_Member
		JAP = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		USA = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 4 }
			set_temp_variable = { Victory_Points = 50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		GER = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 1 }
			set_temp_variable = { Victory_Points = -100 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		USA = {
			country_event = {
				id = MAD_vic.112
			}
		}
	}
}

country_event = { # monima victory 1968-ish
	id = MAD.28
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.28" }
	title = MAD.28.t
	desc = MAD.28.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.28.a
		random_list = {
			25 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_LIBTSIRANANA
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_ZAFIMAHOV
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_PATTSIRANANA
						}
					}
				}
				MAD_Monja_Jaona = {
					promote_character = paternalism_social_nationalism_subtype
				}
				set_party_name = {
					ideology = paternalism
					long_name = MAD_paternalism_monima_party_long
					name = MAD_paternalism_monima_party
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_psd_party_long
					name = MAD_progressivism_psd_party
				}
				set_politics = {
					ruling_party = paternalism
					last_election = "1968.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				set_popularities = {
					paternalism = 40
					liberal_conservatism = 25
					progressivism = 20
					socialist = 15
				}
			}
			25 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_JAONA
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_ZAFIMAHOV
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_PATTSIRANANA
						}
					}
				}
				MAD_Monja_Jaona = {
					promote_character = paternalism_social_nationalism_subtype
				}
				MAD_Philibert_Tsiranana = {
					promote_character = liberal_conservatism_big_tent_subtype
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_psd_party_long
					name = MAD_progressivism_psd_party
				}
				set_politics = {
					ruling_party = liberal_conservatism
					last_election = "1968.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				set_popularities = {
					paternalism = 25
					liberal_conservatism = 40
					progressivism = 15
					socialist = 20
				}
			}
			25 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_JAONA
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_LIBTSIRANANA
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_PATTSIRANANA
						}
					}
				}
				MAD_Norbert_Zafimahova = {
					promote_character = progressivism_reformist_socialism_subtype
				}
				set_country_leader_description = {
					ideology = progressivism
					desc = POLITICS_NORBERT_ZAFIMAHOVA_PSD_DESC
				}
				MAD_Monja_Jaona = {
					promote_character = paternalism_social_nationalism_subtype
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_psd_party_long
					name = MAD_progressivism_psd_party
				}
				set_politics = {
					ruling_party = progressivism
					last_election = "1968.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				set_popularities = {
					paternalism = 25
					liberal_conservatism = 15
					progressivism = 40
					socialist = 20
				}
			}
			25 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_JAONA
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_LIBTSIRANANA
						}
						has_game_rule = {
							rule = MAD_PADESM_SECOND_ELECTION
							option = MAD_PADESM_SECOND_ELECTION_ZAFIMAHOV
						}
					}
				}
				MAD_Philibert_Tsiranana = {
					promote_character = paternalism_anocracy_subtype
				}
				MAD_Jacques_Rabemananjara = {
					promote_character = progressivism_reformist_socialism_subtype
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_psd_party_long
					name = MAD_progressivism_psd_party
				}
				set_politics = {
					ruling_party = paternalism
					last_election = "1968.8.8"
					election_frequency = 60
					elections_allowed = yes
				}
				set_popularities = {
					paternalism = 65
					progressivism = 15
					socialist = 20
				}
			}
		}
	}
}

country_event = { # padesm parties join ofn
	id = MAD.29
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.29" }
	title = MAD.29.t
	desc = MAD.29.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.29.a
		USA = { add_to_faction = MAD }
		add_to_array = { global.OFN_members = MAD }
		add_ideas = OFN_Dependent_Member
		hidden_effect = {
			USA = {
				country_event = {
					id = MAD_vic.103
				}
				country_event = {
					id = MAD_vic.108
					days = 600
				}
				country_event = {
					id = MAD_vic.109
					days = 900
				}
				country_event = {
					id = MAD_vic.110
					days = 1300
				}
			}
		}
	}
}

country_event = { # TAFAMA Victory
	id = MAD.30
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.30" }
	title = MAD.30.t
	desc = MAD.30.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.30.a
		set_cosmetic_tag = MAD_tafama
		set_country_flag = MAD_tafama_path
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_tafama_party_long
			name = MAD_paternalism_tafama_party
		}
		MAD_Gilles_Andriamahazo = {
			promote_character = paternalism_provisional_government_subtype
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		country_event = {
			id = MAD.39
			days = 30
		}
		country_event = {
			id = MAD.31
			days = 50
		}
		set_popularities = {
			paternalism = 55
			liberal_conservatism = 15
			progressivism = 15
			despotism = 15
		}
		JAP = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 5 }
			set_temp_variable = { Victory_Points = 100 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		USA = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 2 }
			set_temp_variable = { Victory_Points = -50 }
			Cold_War_GUI_ManipulateVictory = yes
		}
		GER = {
			set_temp_variable = { Victory_ID = 26 }
			set_temp_variable = { Victory_Outcome = 1 }
			set_temp_variable = { Victory_Points = -100 }
			Cold_War_GUI_ManipulateVictory = yes
		}

		econ_join_sphere_JAP = yes

		USA = {
			country_event = {
				id = MAD_vic.105
				days = 1
			}
		}
		JAP = {
			country_event = {
				id = MAD_vic.105
				days = 1
			}
			country_event = {
				id = MAD_vic.106
				days = 30
			}
		}
	}
}

country_event = { # TAFAMA Collapses Trell
	id = MAD.31
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.31" }
	title = MAD.31.t
	desc = MAD.31.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.31.a
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_RATSIMANDRAVA }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_JAONA }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_RABEMANANJARA }
				}
			}
		}
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_ind_party_long
			name = MAD_paternalism_ind_party
		}
		MAD_Gilles_Andriamahazo = {
			promote_character = paternalism_provisional_government_subtype
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		country_event = {
			id = MAD.32
			days = 60
		}
		set_popularities = {
			paternalism = 40
			liberal_conservatism = 15
			progressivism = 15
			despotism = 30
		}
	}
	option = {
		name = MAD.31.b
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_ANDRIAMAHAZO }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_JAONA }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_RABEMANANJARA }
				}
			}
		}
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_afp_party_long
			name = MAD_paternalism_afp_party
		}
		MAD_Richard_Ratsimandrava = {
			promote_character = paternalism_transitioning_democracy_subtype
		}
		country_event = {
			id = MAD.33
			days = 60
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		set_popularities = {
			paternalism = 40
			liberal_conservatism = 15
			progressivism = 15
			despotism = 30
		}
	}
	option = {
		name = MAD.31.c
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_ANDRIAMAHAZO }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_RATSIMANDRAVA }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_RABEMANANJARA }
				}
			}
		}
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_monima_party_long
			name = MAD_paternalism_monima_party
		}
		add_country_leader_role = {
			character = MAD_Monja_Jaona
			promote_leader = yes
			country_leader = {
				desc = "POLITICS_MONJA_JAONA_DESC_PADSEM"
				ideology = paternalism_transitioning_democracy_subtype
				expire = "1999.2.6"
				traits = { }
				id = -1
			}
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		country_event = {
			id = MAD.34
			days = 60
		}
		set_popularities = {
			paternalism = 60
			liberal_conservatism = 25
			progressivism = 15
			despotism = 0
		}
	}
	option = {
		name = MAD.31.d
		ai_chance = {
			factor = 1
			modifier = {
				factor = 0
				OR = {
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_ANDRIAMAHAZO }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_RATSIMANDRAVA }
					has_game_rule = { rule = MAD_TAFAMA_COLLAPSE_AFTERMATH option = MAD_TAFAMA_COLLAPSE_AFTERMATH_JAONA }
				}
			}
		}
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_ma_party_long
			name = MAD_paternalism_ma_party
		}
		MAD_Jacques_Rabemananjara = {
			promote_character = paternalism_transitioning_democracy_subtype
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		country_event = {
			id = MAD.35
			days = 60
		}
		set_popularities = {
			paternalism = 60
			liberal_conservatism = 25
			progressivism = 15
			despotism = 0
		}
	}
}

country_event = { # Gilles Self-coup
	id = MAD.32
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.32" }
	title = MAD.32.t
	desc = MAD.32.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.32.a
		set_party_name = {
			ideology = despotism
			long_name = MAD_despotism_military_party_long
			name = MAD_despotism_military_party
		}
		add_country_leader_role = {
			character = MAD_Gilles_Andriamahazo
			promote_leader = yes
			country_leader = {
				desc = "POLITICS_GILLES_ANDRIAMAHAZO_DESC"
				ideology = despotism_military_junta_subtype
				expire = "1999.2.6"
				traits = { }
				id = -1
			}
		}
		set_politics = {
			ruling_party = despotism
			elections_allowed = no
		}
		set_popularities = {
			paternalism = 15
			liberal_conservatism = 15
			progressivism = 15
			despotism = 55
		}
	}
}

country_event = { # Richard dpd
	id = MAD.33
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.33" }
	title = MAD.33.t
	desc = MAD.33.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.33.a
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_afp_party_long
			name = MAD_paternalism_afp_party
		}
		add_country_leader_role = {
			character = MAD_Richard_Ratsimandrava
			promote_leader = yes
			country_leader = {
				desc = "POLITICS_RICHARD_RATSIMANDRAVA_DESC"
				ideology = paternalism_anocracy_subtype
				expire = "1999.2.6"
				traits = { }
				id = -1
			}
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		country_event = {
			id = MAD.36
			days = 1825
		}
		set_popularities = {
			paternalism = 50
			liberal_conservatism = 10
			progressivism = 10
			despotism = 30
		}
	}
}

country_event = { # Monja socnat
	id = MAD.34
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.34" }
	title = MAD.34.t
	desc = MAD.34.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.34.a
		set_party_name = {
			ideology = paternalism
			long_name = MAD_paternalism_monima_party_long
			name = MAD_paternalism_monima_party
		}
		MAD_Monja_Jaona = {
			promote_character = paternalism_social_nationalism_subtype
		}
		set_politics = {
			ruling_party = paternalism
			elections_allowed = no
		}
		set_popularities = {
			paternalism = 60
			liberal_conservatism = 25
			progressivism = 15
			despotism = 0
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Capitalism }
		econ_type_change = yes
		country_event = {
			id = MAD.37
			days = 1825
		}
	}
}

country_event = { # Jacques libcon
	id = MAD.35
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.35" }
	title = MAD.35.t
	desc = MAD.35.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.35.a
		set_party_name = {
			ideology = liberal_conservatism
			long_name = MAD_liberal_conservatism_ma_party_long
			name = MAD_liberal_conservatism_ma_party
		}
		MAD_Jacques_Rabemananjara = {
			promote_character = liberal_conservatism_big_tent_subtype
		}
		set_politics = {
			ruling_party = liberal_conservatism
			elections_allowed = no
		}
		set_popularities = {
			paternalism = 20
			liberal_conservatism = 50
			progressivism = 30
			despotism = 0
		}
		set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Capitalism }
		econ_type_change = yes
		country_event = {
			id = MAD.37
			days = 1825
		}
	}
}

country_event = { # 1968 TAFAMA Elections Auth
	id = MAD.36
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.36" }
	title = MAD.36.t
	desc = MAD.36.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.36.a
		random_list = {
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_DESPO
						}
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_PAT
						}
					}
				}
				set_party_name = {
					ideology = paternalism
					long_name = MAD_paternalism_afp_party_long
					name = MAD_paternalism_afp_party
				}
				set_party_name = {
					ideology = despotism
					long_name = MAD_despotism_military_party_long
					name = MAD_despotism_military_party
				}
				add_country_leader_role = {
					character = MAD_Richard_Ratsimandrava
					promote_leader = yes
					country_leader = {
						desc = "POLITICS_RICHARD_RATSIMANDRAVA_DESC"
						ideology = paternalism_anocracy_subtype
						expire = "1999.2.6"
						traits = { }
						id = -1
					}
				}
				set_politics = {
					ruling_party = paternalism
					elections_allowed = no
				}
				set_popularities = {
					paternalism = 50
					liberal_conservatism = 10
					progressivism = 10
					despotism = 30
				}
			}
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_DESPO
						}
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_AUTH
						}
					}
				}
				set_party_name = {
					ideology = paternalism
					long_name = MAD_paternalism_monima_party_long
					name = MAD_paternalism_monima_party
				}
				set_party_name = {
					ideology = despotism
					long_name = MAD_despotism_military_party_long
					name = MAD_despotism_military_party
				}
				MAD_Monja_Jaona = {
					promote_character = paternalism_social_nationalism_subtype
				}
				set_politics = {
					ruling_party = paternalism
					elections_allowed = no
				}
				set_popularities = {
					paternalism = 60
					liberal_conservatism = 25
					progressivism = 15
					despotism = 0
				}
			}
			40 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_AUTH
						}
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_PAT
						}
					}
				}
				set_party_name = {
					ideology = despotism
					long_name = MAD_despotism_military_party_long
					name = MAD_despotism_military_party
				}
				MAD_Richard_Ratsimandrava = {
					promote_character = despotism_military_junta_subtype
				}
				set_politics = {
					ruling_party = despotism
					elections_allowed = no
				}
				set_popularities = {
					paternalism = 15
					liberal_conservatism = 15
					progressivism = 15
					despotism = 55
				}
			}
		}
	}
}

country_event = { # 1968 TAFAMA Elections Dem
	id = MAD.37
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.37" }
	title = MAD.37.t
	desc = MAD.37.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.37.a
		random_list = {
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_PAT
						}
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_PRO
						}
					}
				}
				set_party_name = {
					ideology = liberal_conservatism
					long_name = MAD_liberal_conservatism_ma_party_long
					name = MAD_liberal_conservatism_ma_party
				}
				set_party_name = {
					ideology = paternalism
					long_name = MAD_paternalism_monima_party_long
					name = MAD_paternalism_monima_party
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_ma_party_long
					name = MAD_progressivism_ma_party
				}
				MAD_Jacques_Rabemananjara = {
					promote_character = liberal_conservatism_big_tent_subtype
				}
				set_politics = {
					ruling_party = liberal_conservatism
					elections_allowed = no
				}
				set_popularities = {
					paternalism = 20
					liberal_conservatism = 50
					progressivism = 30
					despotism = 0
				}
			}
			30 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_LIB
						}
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_PRO
						}
					}
				}
				set_party_name = {
					ideology = liberal_conservatism
					long_name = MAD_liberal_conservatism_ma_party_long
					name = MAD_liberal_conservatism_ma_party
				}
				set_party_name = {
					ideology = paternalism
					long_name = MAD_paternalism_monima_party_long
					name = MAD_paternalism_monima_party
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_ma_party_long
					name = MAD_progressivism_ma_party
				}
				MAD_Monja_Jaona = {
					promote_character = paternalism_social_nationalism_subtype
				}
				set_politics = {
					ruling_party = paternalism
					elections_allowed = no
				}
				set_popularities = {
					paternalism = 60
					liberal_conservatism = 25
					progressivism = 15
					despotism = 0
				}
			}
			40 = {
				modifier = {
					factor = 0
					OR = {
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_LIB
						}
						has_game_rule = {
							rule = MAD_TAFAMA_ELECTION
							option = MAD_TAFAMA_ELECTION_PAT
						}
					}
				}
				set_party_name = {
					ideology = liberal_conservatism
					long_name = MAD_liberal_conservatism_ma_party_long
					name = MAD_liberal_conservatism_ma_party
				}
				set_party_name = {
					ideology = paternalism
					long_name = MAD_paternalism_monima_party_long
					name = MAD_paternalism_monima_party
				}
				set_party_name = {
					ideology = progressivism
					long_name = MAD_progressivism_ma_party_long
					name = MAD_progressivism_ma_party
				}
				MAD_Jacques_Rabemananjara = {
					promote_character = progressivism_reformist_socialism_subtype
				}
				set_politics = {
					ruling_party = progressivism
					elections_allowed = no
				}
				set_popularities = {
					paternalism = 15
					liberal_conservatism = 25
					progressivism = 50
					despotism = 10
				}
			}
		}
	}
}

country_event = { # tafama parties join the sphere
	id = MAD.39
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.39" }
	title = MAD.39.t
	desc = MAD.39.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = {
		name = MAD.39.a
		JAP = { add_to_faction = MAD }
		add_ideas = Sphere_Coequal

		JAP = {
			country_event = {
				id = MAD_vic.108
				days = 600
			}
			country_event = {
				id = MAD_vic.109
				days = 900
			}
			country_event = {
				id = MAD_vic.111
				days = 1300
			}
		}
	}
}

country_event = { # OIL CRISIS CRISIS
	id = MAD.400
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.400" }
	title = MAD.400.t
	desc = MAD.400.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = {
		name = MAD.400.a
		hidden_effect = {
			if = {
				limit = {
					MAD = { is_in_faction_with = USA }
				}
				USA = { country_event = { id = MAD.401 days = 4 } }
			}
			if = {
				limit = {
					MAD = { is_in_faction_with = JAP }
				}
				JAP = { country_event = { id = MAD.402 days = 4 } }
			}
		}
	}
}

country_event = { # Appeal to OFN
	id = MAD.401
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.401" }
	title = MAD.401.t
	desc = MAD.401.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = { # ok
		name = MAD.401.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				has_game_rule = {
					rule = MAD_OIL_CRISIS
					option = MAD_OIL_CRISIS_NOPE
				}
			}
		}
		set_temp_variable = { temp_econ_spending_amount = 0.21 }
		econ_spend_money_once_effect_raw_money = yes
		hidden_effect = {
			country_event = { id = MAD.404 days = 50 } # reforms
		}
	}

	option = {
		name = MAD.401.b
		set_country_flag = MADOC_did_nothing
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				has_game_rule = {
					rule = MAD_OIL_CRISIS
					option = MAD_OIL_CRISIS_REFORM
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					MAD = {
						OR = {
							has_government = fascism
							has_government = ultranationalism
							has_government = despotism
							has_government = paternalism
							has_government = conservatism
						}
					}
				}
				country_event = { id = MAD.405 days = 50 } # crushed
			}
			else = {
				country_event = { id = MAD.406 days = 50 } # overthrown
			}
		}
	}
}

country_event = { # Appeal to Sphere
	id = MAD.402
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.402" }
	title = MAD.402.t
	desc = MAD.402.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = { # ok
		name = MAD.402.a
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				has_game_rule = {
					rule = MAD_OIL_CRISIS
					option = MAD_OIL_CRISIS_NOPE
				}
			}
		}
		set_temp_variable = { temp_econ_spending_amount = 0.21 }
		econ_spend_money_once_effect_raw_money = yes
		hidden_effect = {
			country_event = { id = MAD.404 days = 50 } # reforms
		}
	}

	option = {
		name = MAD.402.b
		set_country_flag = MADOC_did_nothing
		ai_chance = {
			base = 1
			modifier = {
				factor = 0
				has_game_rule = {
					rule = MAD_OIL_CRISIS
					option = MAD_OIL_CRISIS_REFORM
				}
			}
		}
		hidden_effect = {
			if = {
				limit = {
					MAD = {
						OR = {
							has_government = fascism
							has_government = ultranationalism
							has_government = despotism
							has_government = paternalism
							has_government = conservatism
						}
					}
				}
				country_event = { id = MAD.405 days = 50 } # crushed
			}
			else = {
				country_event = { id = MAD.406 days = 50 } # overthrown
			}
		}
	}
}

country_event = { # worsens
	id = MAD.403
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.403" }
	title = MAD.403.t
	desc = MAD.403.desc
	picture = GFX_report_event_MAD_malagasy_people

	is_triggered_only = yes

	option = { # ok
		name = MAD.403.a
		trigger = { has_country_flag = MADOC_did_nothing }
	}
	option = { # ok
		name = MAD.403.b
		trigger = { NOT = { has_country_flag = MADOC_did_nothing } }

		set_temp_variable = { temp_econ_spending_amount = 0.06 }
		econ_spend_money_once_effect_raw_money = yes
	}
}

country_event = { # Reform
	id = MAD.404
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.404" }
	title = MAD.404.t
	desc = MAD.404.desc
	picture = GFX_report_event_MAD_tananarive

	is_triggered_only = yes

	option = { # ok
		name = MAD.404.a

	}
}

country_event = { # Suppressed
	id = MAD.405
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.405" }
	title = MAD.405.t
	desc = MAD.405.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	is_triggered_only = yes

	option = { # ok
		name = MAD.405.a

	}
}

country_event = { # Rotaka
	id = MAD.406
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.406" }
	title = MAD.406.t
	desc = MAD.406.desc
	picture = GFX_report_event_MAD_malagasy_revolution
	is_triggered_only = yes
	immediate = {
		hidden_effect = {
			MAD = {
				if = {
					limit = { is_in_faction_with = USA }
					remove_from_array = { global.OFN_members = MAD }
					leave_faction = yes
					econ_leave_sphere = yes
				}
				if = {
					limit = { is_in_faction_with = JAP }
					remove_ideas = Sphere_Economic_Dependent
					leave_faction = yes
					econ_leave_sphere = yes
				}
				set_party_name = {
					ideology = communist
					long_name = MAD_communist_oc_party_long
					name = MAD_communist_oc_party
				}
				set_politics = {
					ruling_party = communist
					elections_allowed = no
				}
				promote_character = {
					character = MAD_Central_Committee
					ideology = communist_marxism_leninism_subtype
				}
				set_country_leader_portrait = {
					portrait = "gfx/leaders/MAD/Portrait_Madagascar_Central_Committee_of_the_AREMA.png"
				}
				set_popularities = {
					communist = 100
				}
				set_cosmetic_tag = MAD_arema
				set_country_flag = MAD_arema_path
				set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
				econ_type_change = yes
				country_event = { id = MAD.407 days = 80 }
			}
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = MAD_news.8
					days = 1
				}
			}
		}
	}
	option = { # ok
		name = MAD.406.a
	}
}

country_event = { # Advance
	id = MAD.407
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.407" }
	title = MAD.407.t
	desc = MAD.407.desc
	picture = GFX_report_event_MAD_antanarivo_2

	is_triggered_only = yes

	option = { # ok
		name = MAD.407.a
		promote_character = {
			character = MAD_Didier_Ratsiraka
			ideology = communist_marxism_leninism_subtype
		}
	}
}

country_event = { #
	id = MAD.501
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.501" }
	title = MAD.501.t
	desc = MAD.501.desc
	picture = GFX_report_event_MAD_milch_bro_2

	is_triggered_only = yes

	option = {
		name = MAD.501.a
		hidden_effect = { GER = { country_event = { id = MAD.502 days = 6 } } }
		set_country_flag = madoc_SUPPLY1
		set_temp_variable = { temp_econ_spending_amount = 0.34 }
		econ_spend_money_once_effect_raw_money = yes
	}
	option = {
		name = MAD.501.b
		hidden_effect = { GER = { country_event = { id = MAD.502 days = 6 } } }
	}
}

country_event = { #
	id = MAD.502
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.502" }
	title = MAD.502.t
	desc = MAD.502.desc
	picture = GFX_report_event_MAD_milch_bro_1

	is_triggered_only = yes

	option = {
		name = MAD.502.a
		hidden_effect = { GER = { country_event = { id = MAD.503 days = 6 } } }
		set_country_flag = madoc_SUPPLY2
		set_temp_variable = { temp_econ_spending_amount = 0.15 }
		econ_spend_money_once_effect_raw_money = yes
	}
	option = {
		name = MAD.502.b
		hidden_effect = { GER = { country_event = { id = MAD.503 days = 6 } } }
	}
}

country_event = { #
	id = MAD.503
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.503" }
	title = MAD.503.t
	desc = MAD.503.desc
	picture = GFX_report_event_MAD_milch_bro_1

	is_triggered_only = yes

	option = {
		name = MAD.503.a
		hidden_effect = {
			GER = {
				random_list = {
					50 = {
						modifier = {
							factor = 3
							GER = { has_country_flag = madoc_SUPPLY1 }
						}
						modifier = {
							factor = 2
							GER = { has_country_flag = madoc_SUPPLY2 }
						}
						modifier = {
							factor = 0
							has_game_rule = {
								rule = MAD_GER_CRISIS
								option = MAD_GER_CRISIS_REVOLUTION
							}
						}
						country_event = { id = MAD.504 days = 6 }
					}
					50 = {
						modifier = {
							factor = 0
							has_game_rule = {
								rule = MAD_GER_CRISIS
								option = MAD_GER_CRISIS_NOPE
							}
						}
						country_event = { id = MAD.505 days = 6 }
					}
				}
			}
		}
	}
}

country_event = { #
	id = MAD.504
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.504" }
	title = MAD.504.t
	desc = MAD.504.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	is_triggered_only = yes

	option = {
		name = MAD.504.a
	}
}

country_event = { #
	id = MAD.505
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.505" }
	title = MAD.505.t
	desc = MAD.505.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	is_triggered_only = yes

	option = {
		name = MAD.505.a
		hidden_effect = { GER = { country_event = { id = MAD.506 days = 6 } } }
	}
}

country_event = { #
	id = MAD.506
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.506" }
	title = MAD.506.t
	desc = MAD.506.desc
	picture = GFX_report_event_MAD_malagasy_revolution

	immediate = {
		hidden_effect = {
			set_autonomy = {
				target = MAD
				autonomy_state = autonomy_free
			}
			every_country = {
				limit = { is_ai = no }
				news_event = {
					id = MAD_news.7
					days = 1
				}
			}
			MAD = {
				if = {
					limit = { is_in_faction_with = GER }
					remove_ideas = Pakt_Military_Authority
					leave_faction = yes
					econ_leave_sphere = yes
					if = {
						limit = { GER = { has_country_leader = { character = GER_albert_speer ruling_only = yes } } }
						remove_ideas = {
							GER_SGR_safe_seas
						}
						leave_zollverein = yes
					}
				}
				set_party_name = {
					ideology = communist
					long_name = MAD_communist_oc_party_long
					name = MAD_communist_oc_party
				}
				set_politics = {
					ruling_party = communist
					elections_allowed = no
				}
				promote_character = {
					character = MAD_Central_Committee
					ideology = communist_marxism_leninism_subtype
				}
				set_country_leader_portrait = {
					portrait = "gfx/leaders/MAD/Portrait_Madagascar_Central_Committee_of_the_AREMA.png"
				}
				set_popularities = {
					communist = 100
				}
				set_cosmetic_tag = MAD_arema
				set_country_flag = MAD_arema_path
				set_temp_variable = { TNO_economy_type_temp = token:Econ_Type_Planned }
				econ_type_change = yes
				country_event = { id = MAD.407 days = 80 }
				remove_ideas = {
					MAD_last_french_colony
					MAD_military_commission_for_madagascar
					MAD_disloyal_gendarmerie
					MAD_secret_societies
					MDG_generalburo
					MDG_neverending_supply_crisis
					MDG_secret_societies
				}
			}
		}
	}
	is_triggered_only = yes

	option = {
		name = MAD.506.a
	}
}

country_event = { # GER legal madagascar annex
	id = MAD.600
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.600" }
	title = MAD.600.t
	desc = MAD.600.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes

	option = {
		name = MAD.600.a
		GER = { set_country_flag = GER_Madagascar_annexation }
		hidden_effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				country_event = {
					id = goering.56
					days = 6
				}
			}
			else = {
				country_event = {
					id = MAD.602
					days = 6
				}
			}
		}
	}
}

country_event = { # ER illegal madagascar anne
	id = MAD.601
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.601" }
	title = MAD.601.t
	desc = MAD.601.desc
	picture = GFX_report_event_MAD_colonial_madagascar

	is_triggered_only = yes

	option = {
		name = MAD.601.a
		GER = { set_country_flag = GER_Madagascar_annexation }
		hidden_effect = {
			if = {
				limit = {
					has_global_flag = german_civil_war_goeringvic
				}
				country_event = {
					id = goering.56
					days = 6
				}
			}
			else = {
				country_event = {
					id = MAD.602
					days = 6
				}
			}
		}
	}
}

country_event = { # milch appointed.... wow
	id = MAD.602
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD.602" }
	title = MAD.602.t
	desc = MAD.602.desc
	picture = GFX_report_event_MAD_milch_bro_2

	is_triggered_only = yes

	option = {
		name = MAD.602.a
		hidden_effect = {
			MAD = {
				drop_cosmetic_tag = yes
				remove_faction_status = yes
				add_ideas = Pakt_Military_Authority
				set_cosmetic_tag = MAD_GERMAN
				econ_join_sphere_GER = yes
				promote_character = MDG_Erhard_Milch
				if = {
					limit = { has_global_flag = german_civil_war_speervic }
					join_zollverein = yes
				}
				set_temp_variable = { TNO_economy_subtype_temp = token:Econ_Subtype_Colonial_Economy_Corporatism }
				econ_subtype_change = yes
			}
			GER = {
				add_to_faction = MAD
				transfer_state = 706
				transfer_state = 707

				#covered by speer and bormann decision so the player gets the chance to do something
				#set_temp_variable = { SeaZone_ID = 6 } # 6; Indian Ocean
				#Cold_War_GUI_PowerProjection_AddSeaZone = yes
			}

			GER = {
				country_event = {
					id = MAD_vic.108
					days = 600
				}
				country_event = {
					id = MAD_vic.200
					days = 900
				}
			}
			MAD = {
				get_current_government_type = yes
				save_party_popularities = yes
			}
			GER = {
				set_autonomy = {
					target = MAD
					autonomy_state = autonomy_military_government
				}
			}
			MAD = {
				restore_previous_government_type = yes
				apply_party_popularities = yes
			}
		}
	}
}

#

news_event = { # Malagasy Uprising
	id = MAD_news.1
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.1" }
	title = MAD_news.1.t
	desc = MAD_news.1.desc
	picture = GFX_news_event_MAD_madagaskar_civil_war

	is_triggered_only = yes
	option = {
		name = MAD_news.1.a
		if = {
			limit = {
				OR = {
					tag = USA
					tag = JAP
				}
			}
			custom_effect_tooltip = MAD_news.1_tt
		}
	}
}

news_event = { # Rebel Victory
	id = MAD_news.3
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.3" }
	title = MAD_news.3.t
	desc = MAD_news.3.desc
	picture = GFX_news_event_MAD_malagasy_victory

	is_triggered_only = yes
	option = {
		name = MAD_news.3.a
	}
}

news_event = { # Colonial Victory
	id = MAD_news.4
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.4" }
	title = MAD_news.4.t
	desc = MAD_news.4.desc
	picture = GFX_news_event_MAD_colony_victory

	is_triggered_only = yes
	option = {
		name = MAD_news.4.a
	}
}

news_event = { # Maurice mexico
	id = MAD_news.5
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.5" }
	title = MAD_news.5.t
	desc = MAD_news.5.desc
	picture = GFX_news_event_MAD_maurice_escape

	is_triggered_only = yes
	option = {
		name = MAD_news.5.a
	}
}

news_event = { # Maurice japan
	id = MAD_news.6
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.6" }
	title = MAD_news.6.t
	desc = MAD_news.6.desc
	picture = GFX_news_event_MAD_maurice_escape

	is_triggered_only = yes
	option = {
		name = MAD_news.6.a
	}
}

news_event = { # revolution
	id = MAD_news.7
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.7" }
	title = MAD_news.7.t
	desc = MAD_news.7.desc
	picture = GFX_news_event_MAD_revolution

	is_triggered_only = yes
	option = {
		name = MAD_news.7.a_GER
		trigger = { tag = GER }
	}
	option = {
		name = MAD_news.7.a
		trigger = { NOT = { tag = GER } }
	}
}
news_event = { # revolution
	id = MAD_news.8
	immediate = { log = "[GetDateText]: [Root.GetName]: event MAD_news.8" }
	title = MAD_news.8.t
	desc = MAD_news.8.desc
	picture = GFX_news_event_MAD_revolution

	is_triggered_only = yes
	option = {
		name = MAD_news.8.a_GER
		trigger = { tag = GER }
	}
	option = {
		name = MAD_news.8.a
		trigger = { NOT = { tag = GER } }
	}
}
