###################################
#
# Civil War Events
#
# Id 45000 - 45999 reserved
#
###################################

# Faction Revolt - Great numbers of Rebels flock to your banner
character_event = {
	id = 45000
	desc = "EVTDESC45000"
	picture = "GFX_evt_battle"
	border = "GFX_event_normal_frame_war"
	
	is_triggered_only = yes
	
	trigger = {
		war_with = FROM
	}
	
	option = {
		name = "EXCELLENT"
		
		hidden_tooltip = {
			FROM = {
				character_event = { id = 45001 }
			}
		}
		
		capital_scope = {
			tooltip = {
				ROOT = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.05
						attrition = 1.0
					}
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.05
						attrition = 1.0
					}
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.05
						attrition = 1.0
					}
				}
			}
			
			hidden_tooltip = {
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 23
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.05
						earmark = faction_revolters
						attrition = 1.0
					}
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 30
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.05
						earmark = faction_revolters
						attrition = 1.0
					}
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 31
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.05
						earmark = faction_revolters
						attrition = 1.0
					}
				}
			}
		}
	}
}

# Faction Revolt - Rebels flock to rebel leader's banner
character_event = {
	id = 45001
	desc = "EVTDESC45001"
	picture = "GFX_evt_battle"
	border = "GFX_event_normal_frame_war"
	
	is_triggered_only = yes
	
	trigger = {
		ai = no
	}
	
	option = {
		name = "EVTOPTA45001"
	}
}


# Faction Revolt - Loyalists flock to your banner
character_event = {
	id = 45002
	desc = "EVTDESC45002"
	picture = "GFX_evt_battle"
	border = "GFX_event_normal_frame_war"

	war = yes
	
	is_triggered_only = yes
	
	trigger = {
		any_war = {
			defender = { character = ROOT }
			attacker = {
				liege_before_war = { character = ROOT }
			}
		}
	}
	
	option = {
		name = "EXCELLENT"
		
		hidden_tooltip = {
			any_war = {
				limit = {
					defender = { character = ROOT }
					attacker = {
						liege_before_war = { character = ROOT }
					}
				}
				any_attacker = {
					character_event = { id = 45003 }
				}
			}
		}
		
		capital_scope = {
			tooltip = {
				ROOT = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = ROOT
						match_mult = 0.038
						attrition = 1.0
					}
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = ROOT
						match_mult = 0.038
						attrition = 1.0
					}
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = ROOT
						match_mult = 0.038
						attrition = 1.0
					}
				}
			}
			
			hidden_tooltip = {
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 23
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = ROOT
						match_mult = 0.038
						earmark = faction_loyalists
						attrition = 1.0
					}
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 30
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = ROOT
						match_mult = 0.038
						earmark = faction_loyalists
						attrition = 1.0
					}
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 31
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = ROOT
						match_mult = 0.038
						earmark = faction_loyalists
						attrition = 1.0
					}
				}
			}
		}
	}
}

# Faction Revolt - Loyalists flock to the liege's banner
character_event = {
	id = 45003
	desc = "EVTDESC45003"
	picture = "GFX_evt_battle"
	border = "GFX_event_normal_frame_war"
	
	is_triggered_only = yes
	
	trigger = {
		ai = no
	}
	
	option = {
		name = "EVTOPTA45003"
	}
}

# Faction Revolt - A smaller number of Rebels flock to your banner
character_event = {
	id = 45004
	desc = "EVTDESC45000"
	picture = "GFX_evt_battle"
	border = "GFX_event_normal_frame_war"
	
	is_triggered_only = yes
	
	trigger = {
		war_with = FROM
	}
	
	option = {
		name = "EXCELLENT"
		
		hidden_tooltip = {
			FROM = {
				character_event = { id = 45001 }
			}
		}
		
		capital_scope = {
			tooltip = {
				ROOT = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.025
						attrition = 1.0
					}
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.025
						attrition = 1.0
					}
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.025
						attrition = 1.0
					}
				}
			}
			
			hidden_tooltip = {
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 23
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.025
						earmark = faction_revolters
						attrition = 1.0
					}
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 30
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.025
						earmark = faction_revolters
						attrition = 1.0
					}
				}
				create_character = {
					random_traits = yes
					dynasty = none
					religion = ROOT
					culture = ROOT
					female = no
					age = 31
					attributes = {
						martial = 5
					}
					trait = tough_soldier
				}
				new_character = {
					spawn_unit = {
						province = PREV
						owner = ROOT
						match_character = FROM
						match_mult = 0.025
						earmark = faction_revolters
						attrition = 1.0
					}
				}
			}
		}
	}
}
