﻿###########################
# House of the Dragon Events
###########################

add_namespace = hotd

# Taskforce established
country_event = {
	id = hotd.1
	title = hotd.1.t
	desc = hotd.1.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.1.a
		ai_chance = { factor = 90 }

#		set_global_flag = rst_formed
		set_country_flag = rst_formed

		hidden_effect = {
#			country_event = { days = 1 id = news.23 }
		}
	}
}

# Begin Necromacy research
country_event = {
	id = hotd.2
	title = hotd.2.t
	desc = hotd.2.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.2.a
		ai_chance = { factor = 90 }


		hidden_effect = {
			Root = { country_event = { id = hotd.3 days = 7 } } 
#			country_event = { days = 1 id = news.23 }
		}
	}

}

# Lets kiss some guinea pigs... err guards.
country_event = {
	id = hotd.3
	title = hotd.3.t
	desc = hotd.3.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.3.a
		ai_chance = { factor = 90 }

		add_manpower = -10

		hidden_effect = {

			Root = {
				country_event = { id = hotd.4 days = 20 } 
			}

#			country_event = { days = 1 id = news.23 }
		}
	}

#	option = {
#		name = hotd.3.b
#		ai_chance = { factor = 0 }

#		set_country_flag = rst_cancelled
#	}
}

# Lets do some graverobbing
country_event = {
	id = hotd.4
	title = hotd.4.t
	desc = hotd.4.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.4.a
		ai_chance = { factor = 90 }

		add_manpower = 6

		hidden_effect = {

			Root = {
				country_event = { id = hotd.5 days = 26 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

	option = {
		name = hotd.4.b
		ai_chance = { factor = 10 }

		set_country_flag = rst_cancelled

	}
}

# Graverob Rhaenyra
country_event = {
	id = hotd.5
	title = hotd.5.t
	desc = hotd.5.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.5.a
		ai_chance = { factor = 90 }

		hidden_effect = {

			Root = {
				country_event = { id = hotd.6 days = 13 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

#	option = {
#		name = hotd.5.b
#		ai_chance = { factor = 10 }

#		set_country_flag = rst_cancelled
#	}
}

# Don't mind the storm your grace
country_event = {
	id = hotd.6
	title = hotd.6.t
	desc = hotd.6.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.6.a
		ai_chance = { factor = 90 }

		random_owned_controlled_state = {
			prioritize = { 33 } #King's Landing
			
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.6
			}
		}
		random_owned_controlled_state = {
			
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.2
			}
		}

		hidden_effect = {
			Root = {
				country_event = { id = hotd.7 days = 6 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

}

# She's ALIVE SHE"S ALIVE!
country_event = {
	id = hotd.7
	title = hotd.7.t
	desc = hotd.7.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.7.a
		ai_chance = { factor = 90 }

		BRA = {
			TAR_rhaenyra_targaryen = {
				set_nationality = Root
			}
		}

		hidden_effect = {

			Root = {
				country_event = { id = hotd.8 days = 14 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

#	option = {
#		name = hotd.7.b
#		ai_chance = { factor = 10 }

#		BRA = {
#			TAR_rhaenyra_targaryen = {
#				set_nationality = Root
#			}
#		}

#		set_country_flag = rst_cancelled
#	}
}

# Rhaenyra calms down, where is Syrax?
country_event = {
	id = hotd.8
	title = hotd.8.t
	desc = hotd.8.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.8.a
		ai_chance = { factor = 90 }

		hidden_effect = {

			Root = {
				country_event = { id = hotd.9 days = 7 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

#	option = {
#		name = hotd.8.b
#		ai_chance = { factor = 0 }
#		set_country_flag = rst_cancelled
#	}
}

# We found SYRAX!
country_event = {
	id = hotd.9
	title = hotd.9.t
	desc = hotd.9.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.9.a
		ai_chance = { factor = 90 }

		hidden_effect = {
			Root = {
				country_event = { id = hotd.10 days = 23 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

#	option = {
#		name = hotd.9.b
#		ai_chance = { factor = 0 }

#		set_country_flag = rst_cancelled
#	}
}

# More complicated than it looks
country_event = {
	id = hotd.10
	title = hotd.10.t
	desc = hotd.10.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.10.a
		ai_chance = { factor = 90 }

		random_owned_controlled_state = {
			prioritize = { 33 } #King's Landing
			
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.8
			}
		}
		random_owned_controlled_state = {
			
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.4
			}
		}
		random_owned_controlled_state = {
#			prioritize = { 33 } #King's Landing
			
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.4
			}
		}
		random_owned_controlled_state = {
			
			limit = {
				industrial_complex > 0
			}
			damage_building = {
				type = industrial_complex
				damage = 0.1
			}
		}

		hidden_effect = {
			Root = {
				country_event = { id = hotd.11 days = 12 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

}

# Do we reunite Syrax and Rhaenyra? THINK REAL CAREFULLY!
country_event = {
	id = hotd.11
	title = hotd.11.t
	desc = hotd.11.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.11.a
		ai_chance = { factor = 90 }

		Root = {
			country_event = { id = hotd.12 days = 3 } 
		}

		hidden_effect = {
#			country_event = { days = 1 id = news.23 }
		}
	}

	option = {
		name = hotd.11.b
		ai_chance = { factor = 0 }

		set_country_flag = rst_cancelled

	}
}

# Rhenyra Dragonrider emerges
country_event = {
	id = hotd.12
	title = hotd.12.t
	desc = hotd.12.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.12.a
		ai_chance = { factor = 90 }

#		country_event = { id = hotd.13 } 

		hidden_effect = {
			Root = {
				country_event = { id = hotd.13 } 
			}
#			country_event = { days = 1 id = news.23 }
		}
	}

}

# Long live the Queen
country_event = {
	id = hotd.13
	title = hotd.13.t
	desc = hotd.13.d
	picture = GFX_report_event_physics_lab_01
	
	is_triggered_only = yes
	
	option = {
		name = hotd.13.a
		ai_chance = { factor = 90 }

		kill_country_leader = yes

		TAR_rhaenyra_targaryen = {
			promote_character = yes
#			promote_character = stalinism
		}

		set_party_name = {
   			ideology = communism
   			long_name = "House Targaryen of Dragonstone"
   			name = "House Targaryen"
		}

		hidden_effect = {

			set_politics = {
			
				ruling_party = communism			
				elections_allowed = no
			
			}
	
			add_popularity = {
				ideology = communism
				popularity = 0.95
			}

			country_event = { days = 1 id = news.2 }
		}
	}

}

# Rhaenyra offers alliance
country_event = {
	id = hotd.14
	title = hotd.14.t
	desc = hotd.14.d
	picture = GFX_report_event_soviet_tank_parade
	
	is_triggered_only = yes
	
	option = {
		name = hotd.14.a
		ai_chance = { factor = 60 }

		hidden_effect = {

		}
	}

	option = {
		name = hotd.14.a
		ai_chance = { factor = 90 }

		hidden_effect = {

		}
	}

	option = {
		name = hotd.14.a
		ai_chance = { factor = 10 }

		hidden_effect = {

		}
	}

}

# Offer accepted (Dany)
country_event = {
	id = hotd.15
	title = hotd.15.t
	desc = hotd.15.d
	picture = GFX_report_event_soviet_tank_parade
	
	is_triggered_only = yes
	
	option = {
		name = hotd.15.a
		ai_chance = { factor = 90 }

		Root = {
			annex_country = {
				target = SOV
				transfer_troops = yes
			} 
		}

		SOV = {
			every_unit_leader = {
				set_nationality = Root
			}
		}

		hidden_effect = {

		}
	}

}

# Offer accepted (Viserys)
country_event = {
	id = hotd.16
	title = hotd.16.t
	desc = hotd.16.d
	picture = GFX_report_event_soviet_tank_parade
	
	is_triggered_only = yes
	
	option = {
		name = hotd.16.a
		ai_chance = { factor = 90 }

		Root = {
			annex_country = {
				target = SOV
				transfer_troops = yes
			} 
		}

		SOV = {
			every_unit_leader = {
				set_nationality = Root
			}
		}

		hidden_effect = {

		}
	}

}

# Offer rejected
country_event = {
	id = hotd.17
	title = hotd.17.t
	desc = hotd.17.d
	picture = GFX_report_event_soviet_tank_parade
	
	is_triggered_only = yes
	
	option = {
		name = hotd.17.a
		ai_chance = { factor = 90 }

		create_wargoal = {
			type = annex_everything
			target = SOV
		}

		hidden_effect = {

		}
	}

}

