decisions = {
	# Create Norse Warrior Lodge - Dead at start.
	create_warrior_lodge_norse = {
		only_playable = yes
		is_high_prio = yes
		
		potential = {
			NOT = {
				has_global_flag = flag_restored_warrior_lodge_norse
			}
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			has_dlc = "Holy Fury"
			age = 16
			NOT = { has_religion_feature = religion_peaceful }
			OR = { 
				religion = norse_pagan 
				religion = norse_pagan_reformed
			}
			NOT = { 
				warrior_lodge_norse = {
					society_has_members = yes								
				}
			}
		}
		
		allow = {
			is_in_society = no
			NOT = { trait = incapable }
			has_education_martial_trigger = yes
			higher_tier_than = DUKE
			martial = 15
			is_inaccessible_trigger = no
			scaled_wealth = 0.75
			prestige = 1500
		}
		
		effect = {
			scaled_wealth = -0.75
			prestige = -1500
			custom_tooltip = { text = create_warrior_lodge_norse_tooltip }
			hidden_tooltip = {
				set_global_flag = flag_restored_warrior_lodge_norse 
				join_society = warrior_lodge_norse
				set_society_grandmaster = yes # Set character as Grand Master
				add_society_currency_massive_effect = yes
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_norse }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_norse }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_norse }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_norse }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_norse }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_norse }
				any_vassal = {
					limit = {
						ai = yes
						can_join_society = warrior_lodge_norse
					}
					random = { chance = 75 join_society = warrior_lodge_norse }
				}
				any_neighbor_independent_ruler = {
					limit = {
						ai = yes
						can_join_society = warrior_lodge_norse
					}
					random = { chance = 35 join_society = warrior_lodge_norse }
				}
				any_player = {
					limit = {
						OR = {
							religion = norse_pagan_reformed
							religion = norse_pagan
							culture = norse
							culture = swedish
							culture = norwegian
							culture = danish
							is_within_diplo_range = ROOT
						}
					}
					narrative_event = { id = WL.1 }
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
}

decisions = {
	# Create Zun Warrior Lodge - Dead at start.
	create_warrior_lodge_zun = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 120 #check only once every 120 months.
		
		potential = {
			NOT = {
				has_global_flag = flag_restored_warrior_lodge_zun
			}
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			has_dlc = "Holy Fury"
			age = 16
			NOT = { has_religion_feature = religion_peaceful }
			OR = { 
				religion = zun_pagan 
				religion = zun_pagan_reformed
			}
			NOT = { 
				warrior_lodge_zun = {
					society_has_members = yes								
				}
			}
		}
		
		allow = {
			is_in_society = no
			NOT = { trait = incapable }
			has_education_martial_trigger = yes
			higher_tier_than = DUKE
			martial = 15
			is_inaccessible_trigger = no
			scaled_wealth = 0.75
			prestige = 1500
		}
		
		effect = {
			scaled_wealth = -0.75
			prestige = -1500
			custom_tooltip = { text = create_warrior_lodge_zun_tooltip }
			hidden_tooltip = {
				set_global_flag = flag_restored_warrior_lodge_zun
				join_society = warrior_lodge_zun
				set_society_grandmaster = yes # Set character as Grand Master
				add_society_currency_massive_effect = yes
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_zun }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_zun }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_zun }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_zun }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_zun }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_zun }
				any_vassal = {
					limit = {
						ai = yes
						can_join_society = warrior_lodge_zun
					}
					random = { chance = 75 join_society = warrior_lodge_zun }
				}
				any_neighbor_independent_ruler = {
					limit = {
						ai = yes
						can_join_society = warrior_lodge_zun
					}
					random = { chance = 35 join_society = warrior_lodge_zun }
				}
				any_player = {
					limit = {
						OR = {
							religion = zun_pagan_reformed
							religion = zun_pagan
							is_within_diplo_range = ROOT
						}
					}
					narrative_event = { id = WL.2 }
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
}

decisions = {
	# Creates Slavic Warrior Lodge - Dead at start.
	create_warrior_lodge_slavic = {
		only_playable = yes
		is_high_prio = yes
		ai_check_interval = 120 #check only once every 120 months.
		
		potential = {
			NOT = {
				has_global_flag = flag_restored_warrior_lodge_slavic
			}
			NOT = {
				has_alternate_start_parameter = { key = religion_names value = random }
			}
			has_dlc = "Holy Fury"
			age = 16
			NOT = { has_religion_feature = religion_peaceful }
			OR = { 
				religion = slavic_pagan 
				religion = slavic_pagan_reformed
			}
			NOT = { 
				warrior_lodge_slavic = {
					society_has_members = yes								
				}
			}
		}
		
		allow = {
			is_in_society = no
			NOT = { trait = incapable }
			has_education_martial_trigger = yes
			higher_tier_than = DUKE
			martial = 15
			is_inaccessible_trigger = no
			scaled_wealth = 0.75
			prestige = 1500
		}
		
		effect = {
			scaled_wealth = -0.75
			prestige = -1500
			custom_tooltip = { text = create_warrior_lodge_slavic_tooltip }
			hidden_tooltip = {
				set_global_flag = flag_restored_warrior_lodge_slavic
				join_society = warrior_lodge_slavic
				set_society_grandmaster = yes # Set character as Grand Master
				add_society_currency_massive_effect = yes
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_slavic }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_slavic }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_slavic }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_slavic }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_slavic }
					spawn_good_commander_effect = yes
					new_character = { join_society = warrior_lodge_slavic }
				any_vassal = {
					limit = {
						ai = yes
						can_join_society = warrior_lodge_slavic
					}
					random = { chance = 75 join_society = warrior_lodge_slavic }
				}
				any_neighbor_independent_ruler = {
					limit = {
						ai = yes
						can_join_society = warrior_lodge_slavic
					}
					random = { chance = 35 join_society = warrior_lodge_slavic }
				}
				any_player = {
					limit = {
						OR = {
							religion = slavic_pagan_reformed
							religion = slavic_pagan
							is_within_diplo_range = ROOT
						}
					}
					narrative_event = { id = WL.3 }
				}
			}
		}
		
		revoke_allowed = {
			always = no
		}
		
		ai_will_do = {
			factor = 1
		}
	}
}