﻿#Scope is State when checked.

acquisition_of_wealth = {
	province = {
		monthly_local_governor_wage = 0.2
		local_tax_modifier = 0.1
		local_commerce_modifier = 0.1
	}

	chance = {
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = gluttonous }
		}
		modifier = {
			add = 15
			governor_or_ruler = { loyalty <= 40 }
		}
		modifier = {
			add = {
				value = governor_or_ruler.corruption
				divide = 2
			}
		}
	}
	on_action = religious_conversion_pulse
	#on_action = acquisition_of_wealth_pulse
}

religious_conversion = {
	province = {
		local_unrest = 1
	}
	chance = {
		modifier = {
			add = governor_or_ruler.zeal
		}
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = pious }
		}
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = zealous }
		}
		modifier = {
			factor = 0
			NOT = {
				governor_or_ruler = { has_religion = employer.religion }
			}
		}
		modifier = {
			factor = 0
		
			any_state_province = {
				count = all
				dominant_province_religion = root.governor_or_ruler.religion
			}
		}
	}

	on_action = religious_conversion_pulse

}

cultural_assimilation = {
	province = {
		local_unrest = 1
	}
	chance = {
		modifier = {
			add = governor_or_ruler.finesse
		}
		modifier = {
			factor = 0
			NOT = {
				governor_or_ruler = { has_culture = employer.culture }
			}
		}
		modifier = {
			factor = 0
			
			any_state_province = {
				count = all
				dominant_province_culture = root.governor_or_ruler.employer.culture
			}
		}
	}
	#on_action = culture_conversion_pulse
	on_action = religious_conversion_pulse
}

bleed_them_dry = {
	province = {
		local_population_growth = -0.05
		local_unrest = 2
		local_tax_modifier = 0.3
		local_commerce_modifier = 0.3
	}

	chance = {
	
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = miserly }
		}
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = shrewd }
		}
		modifier = {
			add = 10
			governor_or_ruler = { corruption >= 30 }
		}
		modifier = {
			factor = 0
			governor_or_ruler = { is_ruler = yes }
		}
	}
		on_action = religious_conversion_pulse
}

borderlands = {
	province = {
		local_manpower_modifier = 0.25
		local_defensive = 0.2
	}

	chance = {
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = suspicious }
		}
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = stubborn }
		}
	}
		on_action = religious_conversion_pulse
}

encourage_trade = {
	
	province = {
		local_commerce_modifier = 0.10
		local_state_trade_routes = 1
	}

	
	chance = {
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = silver_tongued }
		}
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = crafty }
		}
		modifier = {
			add = 10
			governor_or_ruler.employer = {
				is_republic = yes
			}
			governor_or_ruler = { party = mercantile_party }
		}
	}
	on_action = religious_conversion_pulse
}

social_mobility = {
	province = {
		local_citizen_output = -0.2
		
	}
	
	chance = {
		modifier = {
			factor = 0
		}
	}

	#on_action = social_mobility_pulse
	on_action = religious_conversion_pulse
}

local_autonomy = {
	province = {
		local_citizen_happyness = 0.25
		local_freemen_happyness = 0.25
		local_tribesmen_happyness = 0.25
		local_slaves_happyness = 0.25
	
	
		local_output_modifier = -0.75
		
	}

	
	chance = {
		modifier = {
			add = local_autonomy_svalue
		}
		modifier = {
			add = 5
			governor_or_ruler = { has_trait = submissive }
		}
		modifier = {
			add = 3
			governor_or_ruler = { has_trait = generous }
		}
		modifier = {
			add = 3
			governor_or_ruler = { has_trait = kindly }
		}
	}
		on_action = religious_conversion_pulse
}




civilization_effort = {
	province = {
		local_monthly_civilization = 0.5
	}

	chance = {
		modifier = {
			add = 10
			governor_or_ruler = { has_trait = intelligent }
		}
		modifier = {
			add = 10
			governor_or_ruler = { has_trait = polymath }
		}
		modifier = {
			add = 20
			any_state_province = {
				any_neighbor_province = {
					OR = {
						has_province_modifier = minor_barbarian_spawn_place
						has_province_modifier = generic_barbarian_spawn_place
						has_province_modifier = major_barbarian_spawn_place
					}
				}
			}
		}
		modifier = {
			add = -30
			governor_or_ruler.employer = {
				is_tribal = yes
				centralization <= 50
			}
		}
	}
	on_action = religious_conversion_pulse
	#on_action = civilization_effort_pulse

}

