cheat_invasion_king = {
	name = CB_NAME_INVASION_
	war_name = WAR_NAME_INVASION_
	sprite = 17
	hostile_against_others = yes
	truce_days = 0
	apply_short_occ_mod = no
	is_permanent = yes
	can_call_vassals = yes
	check_de_jure_tier = KING
	can_ask_to_join_war = yes
	
	
	sort_priority = 2000
	
	can_use = {
		ROOT = {
			ai = no
		    has_character_flag = cheat_cb_king 
		}
	}
 	
	on_success = {
		ROOT = {
			prestige = 300
			
			hidden_tooltip = {
				occupy_minors_of_occupied_settlements = FROM
				gain_all_occupied_titles = { who = FROM type = invasion }
				
				if = {
					limit = {
						has_nickname = no
					}
					random_list = {
						10 = { give_nickname = nick_the_great }
						10 = { give_nickname = nick_the_victorious }
						10 = { give_nickname = nick_the_fearless }
						10 = { give_nickname = nick_the_brave }
					}
				}
			}
		}
		any_attacker = {
			limit = { character = ROOT }
			participation_scaled_prestige = 200
		}
		any_attacker = {
			limit = { NOT = { character = ROOT } }
			hidden_tooltip = { participation_scaled_prestige = 200 }
		}
		FROM = {
			prestige = -100
		}
	}
	on_success_title = {
		custom_tooltip = {
			text = tribal_invasion_succ_tip
			hidden_tooltip = {
				ROOT = {
					gain_all_occupied_titles = { who = FROM type = invasion }
					gain_settlements_under_title = {
						title = PREV
						enemy = FROM
					}
					any_demesne_title = {
						limit = { tier = baron }
						remove_holding_modifier = recently_conquered
						remove_holding_modifier = new_administration
						refill_holding_levy = yes
					}
				}
			}
		}
	}
	attacker_ai_victory_worth = {
		factor = 100
	}
	
	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1
	}
	
	defender_ai_defeat_worth = {
		factor = 100
	}
}

cheat_invasion_emperor = {
	name = CB_NAME_INVASION_
	war_name = WAR_NAME_INVASION_
	sprite = 17
	hostile_against_others = yes
	truce_days = 0
	apply_short_occ_mod = no
	is_permanent = yes
	can_call_vassals = yes
	check_de_jure_tier = EMPEROR
	can_ask_to_join_war = yes
	
	
	sort_priority = 2000
	
	can_use = {
		ROOT = {
			ai = no
		    has_character_flag = cheat_cb_emperor 
		}
	}
 
	on_success = {
		ROOT = {
			prestige = 300
			
			hidden_tooltip = {
				occupy_minors_of_occupied_settlements = FROM
				gain_all_occupied_titles = { who = FROM type = invasion }
				
				if = {
					limit = {
						has_nickname = no
					}
					random_list = {
						10 = { give_nickname = nick_the_great }
						10 = { give_nickname = nick_the_victorious }
						10 = { give_nickname = nick_the_fearless }
						10 = { give_nickname = nick_the_brave }
					}
				}
			}
		}
		any_attacker = {
			limit = { character = ROOT }
			participation_scaled_prestige = 200
		}
		any_attacker = {
			limit = { NOT = { character = ROOT } }
			hidden_tooltip = { participation_scaled_prestige = 200 }
		}
		FROM = {
			prestige = -100
		}
	}
	on_success_title = {
		custom_tooltip = {
			text = tribal_invasion_succ_tip
			hidden_tooltip = {
				ROOT = {
					gain_all_occupied_titles = { who = FROM type = invasion }
					gain_settlements_under_title = {
						title = PREV
						enemy = FROM
					}
					any_demesne_title = {
						limit = { tier = baron }
						remove_holding_modifier = recently_conquered
						remove_holding_modifier = new_administration
						refill_holding_levy = yes
					}
				}
			}
		}
	}
	attacker_ai_victory_worth = {
		factor = 100
	}
	
	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 # always accept
	}
	
	defender_ai_defeat_worth = {
		factor = 100
	}
}

cheat_invasion_duke = {
	name = CB_NAME_INVASION_
	war_name = WAR_NAME_INVASION_
	sprite = 17
	hostile_against_others = yes
	truce_days = 0
	apply_short_occ_mod = no
	is_permanent = yes
	can_call_vassals = yes
	check_de_jure_tier = DUKE
	can_ask_to_join_war = yes
	
	
	sort_priority = 2000
	
	can_use = {
		ROOT = {
			ai = no
		    has_character_flag = cheat_cb_duke
		}
	}
 	
	on_success = {
		ROOT = {
			prestige = 300
			
			hidden_tooltip = {
				occupy_minors_of_occupied_settlements = FROM
				gain_all_occupied_titles = { who = FROM type = invasion }
				
				if = {
					limit = {
						has_nickname = no
					}
					random_list = {
						10 = { give_nickname = nick_the_great }
						10 = { give_nickname = nick_the_victorious }
						10 = { give_nickname = nick_the_fearless }
						10 = { give_nickname = nick_the_brave }
					}
				}
			}
		}
		any_attacker = {
			limit = { character = ROOT }
			participation_scaled_prestige = 200
		}
		any_attacker = {
			limit = { NOT = { character = ROOT } }
			hidden_tooltip = { participation_scaled_prestige = 200 }
		}
		FROM = {
			prestige = -100
		}
	}
	on_success_title = {
		custom_tooltip = {
			text = tribal_invasion_succ_tip
			hidden_tooltip = {
				ROOT = {
					gain_all_occupied_titles = { who = FROM type = invasion }
					gain_settlements_under_title = {
						title = PREV
						enemy = FROM
					}
					any_demesne_title = {
						limit = { tier = baron }
						remove_holding_modifier = recently_conquered
						remove_holding_modifier = new_administration
						refill_holding_levy = yes
					}
				}
			}
		}
	}
	attacker_ai_victory_worth = {
		factor = 100
	}
	
	attacker_ai_defeat_worth = {
		factor = 100
	}

	defender_ai_victory_worth = {
		factor = -1 
	}
	
	defender_ai_defeat_worth = {
		factor = 100
	}
}
