﻿namespace = training_event
training_event.1000 = {
    type = character_event
	title = training_event.1000.t
	desc = training_event.1000.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}

	immediate = {
	}

	option = {
		name = training_event.1000.a
		random_list = {
			5 = {
				show_chance = yes
				desc = training_event.0001.a_success
				modifier = {
					add = 2
					has_trait = diligent
				}
				modifier = {
					target = scope:recipient
					has_trait = rowdy
					add = 2
				}
				modifier = {
					target = scope:recipient
					has_trait = brave
					add = 2
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait_rank = {
						trait = intellect_good
						rank = 1
					}
				}
				modifier = {
				target = scope:recipient
					add = 3
					has_trait_rank = {
						trait = intellect_good
						rank = 2
					}
				}
				modifier = {
				target = scope:recipient
					add = 4
					has_trait_rank = {
						trait = intellect_good
						rank = 3
					}
				}
				modifier = {
				target = scope:actor
					add = 1
					has_trait_rank = {
						trait = intellect_good
						rank = 1
					}
				}
				modifier = {
				target = scope:actor
					add = 2
					has_trait_rank = {
						trait = intellect_good
						rank = 2
					}
				}
				modifier = {
				target = scope:actor
					add = 3
					has_trait_rank = {
						trait = intellect_good
						rank = 3
					}
				}
				compare_modifier = {
					factor = prowess
					multiplier = 2
				}
				trigger_event = training_event.1001
				scope:recipient = {
					add_trait = blademaster_1
					add_martial_skill = 2
					add_prowess_skill = 1
				}
			}
			5 = {
				show_chance = yes
				desc = training_event.1000.a_failure
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = pensive
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = drunkard
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = depressed_1
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = ill
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait_rank = {
						trait = wounded
						rank = 1
					}
				}
				modifier = {
				target = scope:recipient
					add = 3
					has_trait_rank = {
						trait = wounded
						rank = 2
					}
				}
				modifier = {
				target = scope:recipient
					add = 4
					has_trait_rank = {
						trait = wounded
						rank = 3
					}
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait_rank = {
						trait = intellect_bad
						rank = 1
					}
				}
				modifier = {
				target = scope:recipient
					add = 3
					has_trait_rank = {
						trait = intellect_bad
						rank = 2
					}
				}
				modifier = {
				target = scope:recipient
					add = 4
					has_trait_rank = {
						trait = intellect_bad
						rank = 3
					}
				}
				trigger_event = training_event.1002
				add_prestige = minor_prestige_loss
				add_stress = 25
				scope:recipient = {
					IF = {
						limit = {
							OR = {
								has_trait = gregarious
								has_trait = charming
							}
						}
						add_trait = reveler_1
						add_character_flag = {
							flag = not_interested
							years = 100
						}
					}
					IF = {
						limit = {
							NOT = {
								OR = {
									has_trait = gregarious
									has_trait = charming
								}
							}
						}
						add_stress = 15
						add_prestige = minor_prestige_loss
					}
				}
				
			}
		}
	}
}

training_event.1001 = {
	type = character_event
	title = training_event.1001.t
	desc = training_event.1001.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}
	option = {
	name = training_event.1001.a
		show_as_tooltip = {
			scope:recipient = {
				add_trait = blademaster_1
			}
		}
	}
}

training_event.1002 = {
	type = character_event
	title = training_event.1002.t
	desc = training_event.1002.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}
	option = {
	name = training_event.1002.a
		show_as_tooltip = {
			scope:recipient = {
				add_trait = reveler_1
			}
		}
	}
}

training_event.2000 = {
	type = character_event
	title = training_event.2000.t
	desc = training_event.2000.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}
	option = {
	name = training_event.2000.a
	random_list = {
			5 = {
				show_chance = yes
				desc = training_event.2000.a_success
				modifier = {
					add = 2
					has_trait = diligent
				}
				modifier = {
					target = scope:recipient
					has_trait = rowdy
					add = 2
				}
				modifier = {
					target = scope:recipient
					has_trait = brave
					add = 2
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait_rank = {
						trait = intellect_good
						rank = 1
					}
				}
				modifier = {
				target = scope:recipient
					add = 3
					has_trait_rank = {
						trait = intellect_good
						rank = 2
					}
				}
				modifier = {
				target = scope:recipient
					add = 4
					has_trait_rank = {
						trait = intellect_good
						rank = 3
					}
				}
				modifier = {
				target = scope:actor
					add = 1
					has_trait_rank = {
						trait = intellect_good
						rank = 1
					}
				}
				modifier = {
				target = scope:actor
					add = 2
					has_trait_rank = {
						trait = intellect_good
						rank = 2
					}
				}
				modifier = {
				target = scope:actor
					add = 3
					has_trait_rank = {
						trait = intellect_good
						rank = 3
					}
				}
				compare_modifier = {
					factor = prowess
					multiplier = 2
				}
				trigger_event = training_event.2001
				scope:recipient = {
					remove_trait = blademaster_1
					add_trait = blademaster_2
					add_martial_skill = 4
					add_prowess_skill = 2
				}
			}
			20 = {
				show_chance = yes
				desc = training_event.2000.a_nothing
				trigger_event = training_event.2002
			}
			5 = {
				show_chance = yes
				desc = training_event.2000.a_failure
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = pensive
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = drunkard
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = depressed_1
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait = ill
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait_rank = {
						trait = wounded
						rank = 1
					}
				}
				modifier = {
				target = scope:recipient
					add = 3
					has_trait_rank = {
						trait = wounded
						rank = 2
					}
				}
				modifier = {
				target = scope:recipient
					add = 4
					has_trait_rank = {
						trait = wounded
						rank = 3
					}
				}
				modifier = {
				target = scope:recipient
					add = 2
					has_trait_rank = {
						trait = intellect_bad
						rank = 1
					}
				}
				modifier = {
				target = scope:recipient
					add = 3
					has_trait_rank = {
						trait = intellect_bad
						rank = 2
					}
				}
				modifier = {
				target = scope:recipient
					add = 4
					has_trait_rank = {
						trait = intellect_bad
						rank = 3
					}
				}
				trigger_event = training_event.2003
				add_prestige = minor_prestige_loss
				add_stress = 25
				scope:recipient = {
					add_stress = 15
					add_prestige = minor_prestige_loss
				}
			}
		}
	}
}

training_event.2001 = {
	type = character_event
	title = training_event.1001.t
	desc = training_event.1001.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}
	option = {
	name = training_event.1001.a
		show_as_tooltip = {
			scope:recipient = {
				add_trait = blademaster_2
			}
		}
	}
}

training_event.2002 = {
	type = character_event
	title = training_event.1002.t
	desc = training_event.1002.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}
	option = {
	name = training_event.1002.a
	}
}

training_event.2003 = {
	type = character_event
	title = training_event.1001.t
	desc = training_event.1001.desc
	theme = friendly
	left_portrait = {
		character = root
		triggered_animation = {
			animation = war_attacker
		}
	}
	right_portrait = {
		character = scope:recipient
		triggered_animation = {
			animation = war_defender
		}
	}
	option = {
	name = training_event.1001.a
		show_as_tooltip = {
			add_prestige = minor_prestige_loss
			add_stress = 25
			scope:recipient = {
				add_stress = 15
				add_prestige = minor_prestige_loss
			}
		}
	}
}