﻿enable_cheats_interaction = {
	category = interaction_cheat_main
	desc = enable_cheats_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			NOT = {
				has_character_flag = cheats_activated
			}
		}
	}
	
	on_send = {
		scope:actor = {
			add_character_flag = cheats_activated
		}
	}
}

disable_cheats_interaction = {
	category = interaction_cheat_main
	desc = disable_cheats_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			remove_character_flag = cheats_activated
		}
	}
}

cheat_gold_interaction = {
	category = interaction_cheat_main
	desc = cheat_gold_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_gold = 5000
		}
	}
}

cheat_prestige_interaction = {
	category = interaction_cheat_main
	desc = cheat_prestige_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_prestige = 1000
		}
	}
}

cheat_piety_interaction = {
	category = interaction_cheat_main
	desc = cheat_piety_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_piety = 1000
		}
	}
}

cheat_stress_interaction = {
	category = interaction_cheat_main
	desc = cheat_stress_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_stress = -100
		}
	}
}

cheat_tyranny_interaction = {
	category = interaction_cheat_main
	desc = cheat_tyranny_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = scope:recipient
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_tyranny = -100
		}
	}
}

cheat_stat_interaction = {
	category = interaction_cheat_main
	desc = cheat_stat_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			trigger_event = cheat.0001
		}
	}
}

cheat_education_interaction = {
	category = interaction_cheat_main
	desc = cheat_education_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			trigger_event = cheat.0010
		}
	}
}

cheat_lifestyle_interaction = {
	category = interaction_cheat_main
	desc = cheat_lifestyle_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			trigger_event = cheat.0020
		}
	}
}

cheat_trait_interaction = {
	category = interaction_cheat_main
	desc = cheat_trait_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			trigger_event = cheat.0100
		}
	}
}

cheat_marry_interaction = {
	category = interaction_cheat_main
	desc = cheat_marry_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			sex_opposite_of = scope:actor
			is_married = no
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			marry = scope:recipient
		}
	}
}

cheat_concubine_interaction = {
	category = interaction_cheat_main
	desc = cheat_concubine_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			sex_opposite_of = scope:actor
			is_concubine = no
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
			allowed_concubines = yes
			allowed_more_concubines = yes
		}
	}
	
	on_send = {
		scope:actor = {
			make_concubine = scope:recipient
		}
	}
}

cheat_befriend_interaction = {
	category = interaction_cheat_main
	desc = cheat_befriend_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			NOT = {
				has_relation_friend = scope:actor
			}
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			set_relation_friend = scope:recipient
		}
	}
}

cheat_lover_interaction = {
	category = interaction_cheat_main
	desc = cheat_lover_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			sex_opposite_of = scope:actor
			NOT = {
				has_relation_lover = scope:actor
			}
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			set_relation_lover = scope:recipient
		}
	}
}

cheat_impregnate_interaction = {
	category = interaction_cheat_main
	desc = cheat_impregnate_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			is_pregnant = no
			is_female = yes
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
			is_male = yes
		}
	}
	
	on_send = {
		scope:recipient = {
			make_pregnant = {
				father = scope:actor
				number_of_children = 1
			}
		}
	}
}

cheat_add_court_interaction = {
	category = interaction_cheat_main
	desc = cheat_add_court_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			NOT = {
				is_courtier_of = scope:actor
			}
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_courtier = scope:recipient
		}
	}
}

cheat_imprison_interaction = {
	category = interaction_cheat_main
	desc = cheat_imprison_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			NOT = {
				is_imprisoned_by = scope:actor
			}
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			imprison = {
				target = scope:recipient
				type = dungeon
			}
		}
	}
}

cheat_hook_interaction = {
	category = interaction_cheat_main
	desc = cheat_hook_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:actor = {
			add_hook = {
				target = scope:recipient
				type = strong_test_hook
			}
		}
	}
}

cheat_kill_interaction = {
	category = interaction_cheat_main
	desc = cheat_kill_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
		scope:recipient = { is_alive = yes }
	}
	
	on_send = {
		scope:recipient = {
			death = { killer = actor death_reason = death_mysterious }
		}
	}
}

cheat_change_faith_interaction = {
	category = interaction_cheat_main
	desc = cheat_change_faith_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			NOT = {
				scope:actor.faith = scope:recipient.faith
			}
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:recipient = {
			set_character_faith = scope:actor.faith
		}
	}
}

cheat_change_culture_interaction = {
	category = interaction_cheat_main
	desc = cheat_change_culture_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:recipient = {
			NOT = {
				scope:actor.culture = scope:recipient.culture
			}
		}
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	
	on_send = {
		scope:recipient = {
			set_culture = scope:actor.culture
		}
	}
}

cheat_find_secrets_interaction = {
	category = interaction_cheat_main
	desc = cheat_find_secrets_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
	}
	#Taken from 00_debug_interactions.txt. Thanks to paradox for leaving this in the debug mode.
	#No way I would have managed to make this while still figuring out the all the ways modding this game is differant.
	on_send = {
		scope:recipient.top_liege = {
			hidden_effect = {
				# Start by adding all realm characters and neighbouring realm characters to a list
				add_to_list = secret_setup
				every_vassal_or_below = {
					add_to_list = secret_setup
					every_courtier_or_guest = {
						add_to_list = secret_setup
					}
				}
				every_neighboring_top_liege_realm_owner = {
					add_to_list = secret_setup
					every_vassal_or_below = {
						add_to_list = secret_setup
						every_courtier_or_guest = {
							add_to_list = secret_setup
						}
					}
				}
				every_in_list = { # Give everyone in the list a 50% chance of getting a secret
					list = secret_setup
					random_list = {
						60 = { give_random_likely_secret_effect = yes }
						60 = { }
					}
				}
				random_in_list = { # Reveal one secret to the character the decision is used on, from the same realm
					list = secret_setup
					limit = {
						top_liege = scope:recipient.top_liege
						any_secret = {
							NOT = { is_known_by = scope:recipient }
						}
					}
					random_secret = {
						limit = {
							NOT = { is_known_by = scope:recipient }
						}
						reveal_to = scope:recipient
					}
				}
				random_in_list = { # Reveal one secret to the character the decision is used on, NOT from the same realm
					list = secret_setup
					limit = {
						NOT = { top_liege = scope:recipient.top_liege }
						any_secret = {
							NOT = { is_known_by = scope:recipient }
						}
					}
					random_secret = {
						limit = {
							NOT = { is_known_by = scope:recipient }
						}
						reveal_to = scope:recipient
					}
				}
				every_in_list = { # Everyone in the list has a chance to get to know of a secret anyone else has in the list
					list = secret_setup
					save_scope_as = reveal_to_me
					random = {
						chance = 75
						random_in_list = {
							list = secret_setup
							limit = {
								any_secret = {
									NOT = { is_known_by = scope:reveal_to_me }
								}
							}
							random_secret = {
								limit = {
									NOT = { is_known_by = scope:reveal_to_me }
								}
								reveal_to = scope:reveal_to_me
							}
						}
					}
				}
				random_in_list = { # Imprison someone with a secret you know about
					list = secret_setup
					limit = {
						any_secret = {
							is_known_by = scope:recipient
						}
						NOT =  { this = scope:recipient }
						is_foreign_court_guest = no
					}
					save_scope_as = prisoner_secret
					scope:recipient = {
						imprison = {
							target = scope:prisoner_secret
							type = dungeon
						}
					}
				}
				random_in_list = { # Imprison someone who has a secret you don't know about
					list = secret_setup
					limit = {
						any_secret = {
							NOT = { is_known_by = scope:recipient }
						}
						NOT =  { this = scope:recipient }
						is_foreign_court_guest = no
					}
					save_scope_as = prisoner_secret
					scope:recipient = {
						imprison = {
							target = scope:prisoner_secret
							type = dungeon
						}
					}
				}
			}
		}
	}
}

cheat_claim_interaction = {
	category = interaction_cheat_main
	desc = cheat_claim_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
			NOT = {
				has_claim_on = landed_title
			}
		}
		scope:recipient = { is_landed = yes }
	}
	
	on_send = {
		scope:actor = {
			make_claim_strong = scope:recipient.primary_title
		}
	}
}

cheat_take_title_interaction = {
	category = interaction_cheat_main
	desc = cheat_take_title_interaction_desc
	common_interaction = yes

	auto_accept = yes
	use_diplomatic_range = no
	ignores_pending_interaction_block = yes
	
	is_shown = {
		NOT = { scope:actor = scope:recipient }
		scope:actor = {
			is_ai = no
			has_character_flag = cheats_activated
		}
		scope:recipient = { is_landed = yes }
	}
	#Taken from 00_test_interactions.txt. Thanks to paradox for leaving this in the debug mode.
	#No way I would have managed to make this while still figuring out the all the ways modding this game is differant.
	on_send = { 
		create_title_and_vassal_change = change
		scope:change = {
			set_title_and_vassal_change_type = conquest
		}

		scope:recipient.primary_title = {
			change_title_holder = {
				holder = scope:actor
				change = scope:change
			}
		}
		resolve_title_and_vassal_change = scope:change
	}
}