###########################
# Wargoal Justification Events
###########################

add_namespace = war_justification 

# Fascists vs Neutrals
country_event = {
	id = war_justification.1
	title = war_justification.1.t
	desc = war_justification.1.d
	picture = GFX_report_event_fascist_speech  
	
	is_triggered_only = yes

	trigger = {
		has_government = fascism
		FROM = { has_government = neutrality }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.1.a
		FROM = { country_event = { id = war_justification.201 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Fascists vs Democrats
country_event = {
	id = war_justification.2
	title = war_justification.2.t
	desc = war_justification.2.d
	picture = GFX_report_event_communist_leader
	
	is_triggered_only = yes
	
	trigger = {
		has_government = fascism
		FROM = { has_government = democratic }
		NOT = { has_country_flag = war_justification_last_event_political }
	}

	option = {
		name = war_justification.2.a
		FROM = { country_event = { id = war_justification.202 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Fascists vs Communists
country_event = {
	id = war_justification.3
	title = war_justification.3.t
	desc = war_justification.3.d
	picture = GFX_report_event_communists_cheer
	
	is_triggered_only = yes
	
	trigger = {
		has_government = fascism
		FROM = { has_government = communism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}

	option = {
		name = war_justification.3.a
		FROM = { country_event = { id = war_justification.203 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Fascists vs Fascists
country_event = {
	id = war_justification.4
	title = war_justification.4.t
	desc = war_justification.4.d
	picture = GFX_report_event_fascist_speech
	
	is_triggered_only = yes

	trigger = {
		has_government = fascism
		FROM = { has_government = fascism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.4.a
		FROM = { country_event = { id = war_justification.204 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Communists vs Neutrals
country_event = {
	id = war_justification.5
	title = war_justification.5.t
	desc = war_justification.5.d
	picture = GFX_report_event_nra_march
	
	is_triggered_only = yes

	trigger = {
		has_government = communism
		FROM = { has_government = neutrality }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.5.a
		FROM = { country_event = { id = war_justification.205 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Communists vs Democrats
country_event = {
	id = war_justification.6
	title = war_justification.6.t
	desc = war_justification.6.d
	picture = GFX_report_event_pla_in_beijing
	
	is_triggered_only = yes

	trigger = {
		has_government = communism
		FROM = { has_government = democratic }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.6.a
		FROM = { country_event = { id = war_justification.206 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Communists vs Communists
country_event = {
	id = war_justification.7
	title = war_justification.7.t
	desc = war_justification.7.d
	picture = GFX_report_event_american_hunger_march
	
	is_triggered_only = yes

	trigger = {
		has_government = communism
		FROM = { has_government = communism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.7.a
		FROM = { country_event = { id = war_justification.207 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Communists vs Fascists
country_event = {
	id = war_justification.8
	title = war_justification.8.t
	desc = war_justification.8.d
	picture = GFX_report_event_communist_leader
	
	is_triggered_only = yes

	trigger = {
		has_government = communism
		FROM = { has_government = fascism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.8.a
		FROM = { country_event = { id = war_justification.208 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Democrats vs Neutrals
country_event = {
	id = war_justification.9
	title = war_justification.9.t
	desc = war_justification.9.d
	picture = GFX_report_event_communist_leader
	
	is_triggered_only = yes

	trigger = {
		has_government = democratic
		FROM = { has_government = neutrality }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.9.a
		FROM = { country_event = { id = war_justification.209 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Democrats vs Democrats
country_event = {
	id = war_justification.10
	title = war_justification.10.t
	desc = war_justification.10.d
	picture = GFX_report_event_soldiers_marching
	
	is_triggered_only = yes

	trigger = {
		has_government = democratic
		FROM = { has_government = democratic }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.10.a
		FROM = { country_event = { id = war_justification.210 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Democrats vs Communists
country_event = {
	id = war_justification.11
	title = war_justification.11.t
	desc = war_justification.11.d
	picture = GFX_report_event_crowd_in_prague
	
	is_triggered_only = yes

	trigger = {
		has_government = democratic
		FROM = { has_government = communism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.11.a
		FROM = { country_event = { id = war_justification.211 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Democrats vs Fascists
country_event = {
	id = war_justification.12
	title = war_justification.12.t
	desc = war_justification.12.d
	picture = GFX_report_event_fascists_posing
	
	is_triggered_only = yes

	trigger = {
		has_government = democratic
		FROM = { has_government = fascism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.12.a
		FROM = { country_event = { id = war_justification.212 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Neutrals vs Neutrals
country_event = {
	id = war_justification.13
	title = war_justification.13.t
	desc = war_justification.13.d
	picture = GFX_report_event_soldiers_marching
	
	is_triggered_only = yes

	trigger = {
		has_government = neutrality
		FROM = { has_government = neutrality }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.13.a
		FROM = { country_event = { id = war_justification.213 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Neutrals vs Democrats
country_event = {
	id = war_justification.14
	title = war_justification.14.t
	desc = war_justification.14.d
	picture = GFX_report_event_tanks_vietnam
	
	is_triggered_only = yes

	trigger = {
		has_government = neutrality
		FROM = { has_government = democratic }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.14.a
		FROM = { country_event = { id = war_justification.214 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Neutrals vs Communists
country_event = {
	id = war_justification.15
	title = war_justification.15.t
	desc = war_justification.15.d
	picture = GFX_report_event_tanks_mexico_city
	
	is_triggered_only = yes

	trigger = {
		has_government = neutrality
		FROM = { has_government = communism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.15.a
		FROM = { country_event = { id = war_justification.215 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Neutrals vs Fascists
country_event = {
	id = war_justification.16
	title = war_justification.16.t
	desc = war_justification.16.d
	picture = GFX_report_event_pla_in_beijing
	
	is_triggered_only = yes

	trigger = {
		has_government = neutrality
		FROM = { has_government = fascism }
		NOT = { has_country_flag = war_justification_last_event_political }
	}
	
	option = {
		name = war_justification.16.a
		FROM = { country_event = { id = war_justification.216 } }
		set_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Generic: Neighbor
country_event = {
	id = war_justification.17
	title = war_justification.17.t
	desc = war_justification.17.d
	picture = GFX_report_event_riot_police_poland
	
	is_triggered_only = yes

	trigger = {
		is_neighbor_of = FROM
		NOT = { has_country_flag = war_justification_last_event_neighbor }
	}
	
	option = {
		name = war_justification.17.a
		FROM = { country_event = { id = war_justification.217 } }
		set_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Generic: Mobilized Nation
country_event = {
	id = war_justification.18
	title = war_justification.18.t
	desc = war_justification.18.d
	picture = GFX_report_event_korean_war_march
	
	is_triggered_only = yes

	trigger = {
		FROM = {
			OR = {
				has_idea = low_economic_mobilisation
				has_idea = partial_economic_mobilisation
				has_idea = war_economy
				has_idea = tot_economic_mobilisation
				has_idea = totaler_krieg_economy
			}
		}
		NOT = { has_country_flag = war_justification_last_event_mobilized }
	}
	
	option = {
		name = war_justification.18.a
		FROM = { country_event = { id = war_justification.218 } }
		set_country_flag = war_justification_last_event_mobilized
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_borderthreat
	}
}

# Generic: Enemy Troops at the Border
country_event = {
	id = war_justification.19
	title = war_justification.19.t
	desc = war_justification.19.d
	picture = GFX_report_event_soldiers_marching
	
	is_triggered_only = yes

	trigger = {
		FROM = {
			is_neighbor_of = ROOT
			any_owned_state = {
				any_neighbor_state = { is_owned_by = ROOT }
				FROM = {
					divisions_in_state = {
						state = PREV
						size > 1
					}
				}	
			}
		}
		NOT = { has_country_flag = war_justification_last_event_borderthreat }
	}
	
	option = {
		name = war_justification.19.a
		FROM = { country_event = { id = war_justification.219 } }
		set_country_flag = war_justification_last_event_borderthreat
		clr_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
	}
}

# Generic: Any War
country_event = {
	id = war_justification.20
	title = war_justification.20.t
	desc = war_justification.20.d
	picture = GFX_report_event_tanks_vietnam
	
	is_triggered_only = yes

	trigger = {
		has_country_flag = war_justification_last_event_generic
	}
	
	option = {
		name = war_justification.20.a
		FROM = { country_event = { id = war_justification.220 } }
		set_country_flag = war_justification_last_event_generic
		clr_country_flag = war_justification_last_event_borderthreat
		clr_country_flag = war_justification_last_event_political
		clr_country_flag = war_justification_last_event_neighbor
		clr_country_flag = war_justification_last_event_mobilized
	}
}

# Fascists vs Neutrals (Target)
country_event = {
	id = war_justification.201
	title = war_justification.201.t
	desc = war_justification.201.d
	picture = GFX_report_event_fascist_speech
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.201.a
	}
}

# Fascists vs Democrats (Target)
country_event = {
	id = war_justification.202
	title = war_justification.202.t
	desc = war_justification.202.d
	picture = GFX_report_event_communist_leader
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.202.a
	}
}

# Fascists vs Communists (Target)
country_event = {
	id = war_justification.203
	title = war_justification.203.t
	desc = war_justification.203.d
	picture = GFX_report_event_communists_cheer
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.203.a
	}
}

# Fascists vs Fascists (Target)
country_event = {
	id = war_justification.204
	title = war_justification.204.t
	desc = war_justification.204.d
	picture = GFX_report_event_fascist_speech
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.204.a
	}
}

# Communists vs Neutrals (Target)
country_event = {
	id = war_justification.205
	title = war_justification.205.t
	desc = war_justification.205.d
	picture = GFX_report_event_nra_march
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.205.a
	}
}

# Communists vs Democrats (Target)
country_event = {
	id = war_justification.206
	title = war_justification.206.t
	desc = war_justification.206.d
	picture = GFX_report_event_pla_in_beijing
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.206.a
	}
}

# Communists vs Communists (Target)
country_event = {
	id = war_justification.207
	title = war_justification.207.t
	desc = war_justification.207.d
	picture = GFX_report_event_american_hunger_march
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.207.a
	}
}

# Communists vs Fascists (Target)
country_event = {
	id = war_justification.208
	title = war_justification.208.t
	desc = war_justification.208.d
	picture = GFX_report_event_communist_leader
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.208.a
	}
}

# Democrats vs Neutrals (Target)
country_event = {
	id = war_justification.209
	title = war_justification.209.t
	desc = war_justification.209.d
	picture = GFX_report_event_communist_leader
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.209.a
	}
}

# Democrats vs Democrats (Target)
country_event = {
	id = war_justification.210
	title = war_justification.210.t
	desc = war_justification.210.d
	picture = GFX_report_event_soldiers_marching
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.210.a
	}
}

# Democrats vs Communists (Target)
country_event = {
	id = war_justification.211
	title = war_justification.211.t
	desc = war_justification.211.d
	picture = GFX_report_event_crowd_in_prague
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.211.a
	}
}

# Democrats vs Fascists (Target)
country_event = {
	id = war_justification.212
	title = war_justification.212.t
	desc = war_justification.212.d
	picture = GFX_report_event_fascists_posing
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.212.a
	}
}

# Neutrals vs Neutrals (Target)
country_event = {
	id = war_justification.213
	title = war_justification.213.t
	desc = war_justification.213.d
	picture = GFX_report_event_soldiers_marching
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.213.a
	}
}

# Neutrals vs Democrats (Target)
country_event = {
	id = war_justification.214
	title = war_justification.214.t
	desc = war_justification.214.d
	picture = GFX_report_event_tanks_vietnam
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.214.a
	}
}

# Neutrals vs Communists (Target)
country_event = {
	id = war_justification.215
	title = war_justification.215.t
	desc = war_justification.215.d
	picture = GFX_report_event_tanks_mexico_city
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.215.a
	}
}

# Neutrals vs Fascists (Target)
country_event = {
	id = war_justification.216
	title = war_justification.216.t
	desc = war_justification.216.d
	picture = GFX_report_event_pla_in_beijing
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.216.a
	}
}

# Generic: Neighbor (Target)
country_event = {
	id = war_justification.217
	title = war_justification.217.t
	desc = war_justification.217.d
	picture = GFX_report_event_riot_police_poland
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.217.a
	}
}

# Generic: Mobilized Nation (Target)
country_event = {
	id = war_justification.218
	title = war_justification.218.t
	desc = war_justification.218.d
	picture = GFX_report_event_korean_war_march
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.218.a
	}
}

# Generic: Enemy Troops at the Border (Target)
country_event = {
	id = war_justification.219
	title = war_justification.219.t
	desc = war_justification.219.d
	picture = GFX_report_event_soldiers_marching
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.219.a
	}
}


# Generic: Any War (Target)
country_event = {
	id = war_justification.220
	title = war_justification.220.t
	desc = war_justification.220.d
	picture = GFX_report_event_tanks_vietnam
	
	is_triggered_only = yes
	
	option = {
		name = war_justification.220.a
	}
}

# Wargoal Expired
country_event = {
	id = war_justification.301
	title = war_justification.301.t
	desc = war_justification.301.d
	picture = GFX_report_event_iww_demonstration
	
	is_triggered_only = yes

	trigger = {
		has_war = no
		NOT = {
			AND = {
				original_tag = ENG
				has_completed_focus = ENG_enforce_the_naval_treaties
			}
		}
	}
	
	option = {
		name = war_justification.301.a
		trigger = { has_government = democratic }
	}

	option = {
		name = war_justification.301.b
		trigger = { has_government = communism }
	}

	option = {
		name = war_justification.301.c
		trigger = {
			OR = {
				has_government = fascism
				has_government = neutrality
			}
		}
	}
}