###################################
#
# Events for Ninjas
#
# Id 9500-9749 is reserved
#
###################################
#
# Written by Niklas Strid

# FROM:		Ninja employer
# PREV:		Target character/province
# THIS:		Target employer	[can be same as PREV]

### On actions ###

# Assassinate
# Captured
character_event = {
	id = 9500
	desc = "EVTDESC9500"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -3
		FROM = { honor = -6 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 6
				set_character_flag = honor_6
				character_event = {
					id = 9518
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 3
	}
}

# Assassinate
# Backfired
character_event = {
	id = 9501
	desc = "EVTDESC9501"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -3
		FROM = { honor = -9 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 9
				set_character_flag = honor_9
				character_event = {
					id = 9519
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 3
	}
}


# Kidnap
# Captured
character_event = {
	id = 9502
	desc = "EVTDESC9502"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -2
		FROM = { honor = -4 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 4
				set_character_flag = honor_4
				character_event = {
					id = 9518
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 2
	}
}

# Kidnap
# Backfired
character_event = {
	id = 9503
	desc = "EVTDESC9503"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -2
		FROM = { honor = -6 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 6
				set_character_flag = honor_6
				character_event = {
					id = 9519
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 2
	}
}


# Free Hostage
# Captured
character_event = {
	id = 9504
	desc = "EVTDESC9504"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -2 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 2
				set_character_flag = honor_2
				character_event = {
					id = 9518
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Free Hostage
# Backfired
character_event = {
	id = 9505
	desc = "EVTDESC9505"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -3 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 3
				set_character_flag = honor_3
				character_event = {
					id = 9519
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}


# Undermine Honor
# Captured
character_event = {
	id = 9506
	desc = "EVTDESC9506"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -2 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 2
				set_character_flag = honor_2
				character_event = {
					id = 9518
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Undermine Honor
# Backfired
character_event = {
	id = 9507
	desc = "EVTDESC9507"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -3 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 3
				set_character_flag = honor_3
				character_event = {
					id = 9519
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}


# Weaken Defenses
# Captured
character_event = {
	id = 9508
	desc = "EVTDESC9508"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -2
		FROM = { honor = -4 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 4
				set_character_flag = honor_4
				character_event = {
					id = 9520
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 2
	}
}

# Weaken Defenses
# Backfired
character_event = {
	id = 9509
	desc = "EVTDESC9509"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -2
		FROM = { honor = -6 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 6
				set_character_flag = honor_6
				character_event = {
					id = 9521
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 2
	}
}


# Undermine Shinto Faction
# Captured
character_event = {
	id = 9510
	desc = "EVTDESC9510"
	
	is_triggered_only = yes
	
	trigger = {
		PREV = {
			has_building = shinto_shrine
		}
	}
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -2 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 2
				set_character_flag = honor_2
				character_event = {
					id = 9520
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Undermine Buddhist Faction
# Captured
character_event = {
	id = 9511
	desc = "EVTDESC9511"
	
	is_triggered_only = yes
	
	trigger = {
		PREV = {
			has_building = buddhist_temple
		}
	}

	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -2 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 2
				set_character_flag = honor_2
				character_event = {
					id = 9520
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Undermine Christian Faction
# Captured
character_event = {
	id = 9512
	desc = "EVTDESC9512"
	
	is_triggered_only = yes
	
	trigger = {
		PREV = {
			has_building = christian_church
		}
	}

	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -2 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 2
				set_character_flag = honor_2
				character_event = {
					id = 9520
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Undermine Shinto Faction
# Backfired
character_event = {
	id = 9513
	desc = "EVTDESC9513"
	
	is_triggered_only = yes
	
	trigger = {
		PREV = {
			has_building = shinto_shrine
		}
	}

	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -3 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 3
				set_character_flag = honor_3
				character_event = {
					id = 9521
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Undermine Buddhist Faction
# Backfired
character_event = {
	id = 9514
	desc = "EVTDESC9514"
	
	is_triggered_only = yes
	
	trigger = {
		PREV = {
			has_building = buddhist_temple
		}
	}

	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -3 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 3
				set_character_flag = honor_3
				character_event = {
					id = 9521
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}

# Undermine Christian Faction
# Backfired
character_event = {
	id = 9515
	desc = "EVTDESC9515"
	
	is_triggered_only = yes
	
	trigger = {
		PREV = {
			has_building = christian_church
		}
	}

	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1
		FROM = { honor = -3 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 3
				set_character_flag = honor_3
				character_event = {
					id = 9521
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1
	}
}


# Burn Manufactory
# Captured
character_event = {
	id = 9516
	desc = "EVTDESC9516"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1.5
		FROM = { honor = -3 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 3
				set_character_flag = honor_3
				character_event = {
					id = 9520
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1.5
	}
}

# Burn Manufactory
# Backfired
character_event = {
	id = 9517
	desc = "EVTDESC9517"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTANINJA"
		ai_chance = { factor = 50 }
		opinion = {
			modifier = ninja_discovered
			who = FROM
			years = 5
		}
		honor = -1.5
		FROM = { honor = -4.5 }	# For tooltip
		hidden_tooltip = {
			FROM = {
				honor = 4.5
				set_character_flag = honor_4_5
				character_event = {
					id = 9521
					days = 1
				}
			}
		}
	}
	option = {
		name = "EVTOPTBNINJA"
		ai_chance = { factor = 50 }
		honor = 1.5
	}
}


### Response to employer ###

# Captured - character
character_event = {
	id = 9518
	desc = "EVTDESC9518"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTNINJACAPTURED"
		if = {
			limit = { has_character_flag = honor_9 }
			clr_character_flag = honor_9
			honor = -9
		}
		if = {
			limit = { has_character_flag = honor_6 }
			clr_character_flag = honor_6
			honor = -6
		}
		if = {
			limit = { has_character_flag = honor_4_5 }
			clr_character_flag = honor_4_5
			honor = -4.5
		}
		if = {
			limit = { has_character_flag = honor_4 }
			clr_character_flag = honor_4
			honor = -4
		}
		if = {
			limit = { has_character_flag = honor_3 }
			clr_character_flag = honor_3
			honor = -3
		}
		if = {
			limit = { has_character_flag = honor_2 }
			clr_character_flag = honor_2
			honor = -2
		}
	}
}

# Backfired - character
character_event = {
	id = 9519
	desc = "EVTDESC9519"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTNINJABACKFIRED"
		if = {
			limit = { has_character_flag = honor_9 }
			clr_character_flag = honor_9
			honor = -9
		}
		if = {
			limit = { has_character_flag = honor_6 }
			clr_character_flag = honor_6
			honor = -6
		}
		if = {
			limit = { has_character_flag = honor_4_5 }
			clr_character_flag = honor_4_5
			honor = -4.5
		}
		if = {
			limit = { has_character_flag = honor_4 }
			clr_character_flag = honor_4
			honor = -4
		}
		if = {
			limit = { has_character_flag = honor_3 }
			clr_character_flag = honor_3
			honor = -3
		}
		if = {
			limit = { has_character_flag = honor_2 }
			clr_character_flag = honor_2
			honor = -2
		}
	}
}

# Captured - province
character_event = {
	id = 9520
	desc = "EVTDESC9520"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTNINJACAPTURED"
		if = {
			limit = { has_character_flag = honor_9 }
			clr_character_flag = honor_9
			honor = -9
		}
		if = {
			limit = { has_character_flag = honor_6 }
			clr_character_flag = honor_6
			honor = -6
		}
		if = {
			limit = { has_character_flag = honor_4_5 }
			clr_character_flag = honor_4_5
			honor = -4.5
		}
		if = {
			limit = { has_character_flag = honor_4 }
			clr_character_flag = honor_4
			honor = -4
		}
		if = {
			limit = { has_character_flag = honor_3 }
			clr_character_flag = honor_3
			honor = -3
		}
		if = {
			limit = { has_character_flag = honor_2 }
			clr_character_flag = honor_2
			honor = -2
		}
	}
}

# Backfired - province
character_event = {
	id = 9521
	desc = "EVTDESC9521"
	
	is_triggered_only = yes
	
	option = {
		name = "EVTOPTNINJABACKFIRED"
		if = {
			limit = { has_character_flag = honor_9 }
			clr_character_flag = honor_9
			honor = -9
		}
		if = {
			limit = { has_character_flag = honor_6 }
			clr_character_flag = honor_6
			honor = -6
		}
		if = {
			limit = { has_character_flag = honor_4_5 }
			clr_character_flag = honor_4_5
			honor = -4.5
		}
		if = {
			limit = { has_character_flag = honor_4 }
			clr_character_flag = honor_4
			honor = -4
		}
		if = {
			limit = { has_character_flag = honor_3 }
			clr_character_flag = honor_3
			honor = -3
		}
		if = {
			limit = { has_character_flag = honor_2 }
			clr_character_flag = honor_2
			honor = -2
		}
	}
}
