decisions = {
	create_new_brazil_apostolic = {
		is_high_prio = yes
		ai_check_interval = 1

		potential = {
			NOT = {
				has_game_rule = {
					name = empire_decisions
					value = off
				}
			}
			is_feudal = yes
			culture_group = portuguese
			OR = {
				religion = apostolic
				religion = celeste
			}
			e_new_brazil = {
				has_holder = no
			}
			NOR = {
				has_alternate_start_setting = {
					setting = dejure
					value = random
				}
				has_alternate_start_setting = {
					setting = title_names
					value = random
				}
				has_alternate_start_setting = {
					setting = title_names
					value = random_including_duchies
				}
			}
		}

		allow = {
			is_adult = yes
			independent = yes
			war = no
			NOT = {
				trait = incapable
			}
			wealth = 800
			realm_size = 175
			OR = {
				AND = {
					OR = {
						culture = brazilian
						trait = ambitious
						trait = proud
					}
					prestige = 6000
				}
				AND = {
					culture = brazilian
					OR = {
						trait = ambitious
						trait = proud
					}
					prestige = 4000
				}
				prestige = 8000
			}
		}

		effect = {
			activate_title = { title = e_new_brazil status = yes }
			wealth = -800
			primary_title = {
					e_new_brazil = {
						grant_title = ROOT
						copy_title_laws = PREV
					}
			}
			hidden_tooltip = {
				any_demesne_title = {
					limit = {
						tier = KING
						AND = {
							tier = EMPEROR
							NOT = { title = e_new_brazil }
						}
					}
					destroy_landed_title = THIS
				}
				if = {
					limit = {
						religion = apostolic
					}
					narrative_event = { id = newbrazil.1 }
                        	}
				if = {
					limit = {
						religion = celeste
					}
					narrative_event = { id = newbrazil.2 }
                        	}
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	create_new_brazil_other = {
		is_high_prio = yes
		ai_check_interval = 1

		potential = {
			is_feudal = yes
			culture_group = portuguese
			NOR = {
				religion = apostolic
				religion = celeste
			}
			e_new_brazil = {
				has_holder = no
			}
			NOR = {
				has_alternate_start_setting = {
					setting = dejure
					value = random
				}
				has_alternate_start_setting = {
					setting = title_names
					value = random
				}
				has_alternate_start_setting = {
					setting = title_names
					value = random_including_duchies
				}
			}
		}

		allow = {
			is_adult = yes
			independent = yes
			war = no
			NOT = {
				trait = incapable
			}
			wealth = 1000
			realm_size = 225
			OR = {
				AND = {
					OR = {
						culture = brazilian
						trait = ambitious
						trait = proud
					}
					prestige = 8000
				}
				AND = {
					culture = brazilian
					OR = {
						trait = ambitious
						trait = proud
					}
					prestige = 6000
				}
				prestige = 10000
			}
		}

		effect = {
			activate_title = { title = e_new_brazil status = yes }
			wealth = -1000
			primary_title = {
					e_new_brazil = {
						grant_title = ROOT
						copy_title_laws = PREV
					}
			}
			hidden_tooltip = {
				any_demesne_title = {
					limit = {
						tier = KING
						AND = {
							tier = EMPEROR
							NOT = { title = e_new_brazil }
						}
					}
					destroy_landed_title = THIS
				}
				narrative_event = { id = newbrazil.3 }
			}
		}

		ai_will_do = {
			factor = 1
		}
	}

	study_brazilian_tactics = {
		is_high_prio = no
		potential = {
			is_adult = yes
			is_landed = yes
			NOR = { 
				trait = master_of_flame
				trait = logistics_expert
				trait = levy_coordinator
				trait = sapper
			}
			NOT = { has_character_flag = brazil_education }
			culture_group = portuguese
		}

		allow = {
			wealth = 150
			custom_tooltip = {
				text = military_education
				OR = {
					trait = misguided_warrior
					trait = tough_soldier
					trait = skilled_tactician
					trait = brilliant_strategist
				}
			}
		}

		effect = {
			wealth = -100
			hidden_tooltip = {
				FROM = { set_character_flag = brazil_education }
				character_event = { id = newbrazil.6 }
			}
		}
		ai_will_do = {
			factor = 1
		}
	}
}