## Hides all of these options ##

remove_WB_flag_options = {
	is_shown = {
		is_player = yes
		has_global_variable = show_WB_flag_options_var
		NOT = { has_global_variable = remove_all_WB_flag_options_var }
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
	}
	
	when_taken = {
		set_global_variable = remove_all_WB_flag_options_var
		remove_global_variable = show_WB_flag_options_var
		
		custom_tooltip = WB_remove_them_all_tt
	}
	
	ai_chance = {
		base = 0
	}		
}

## Inspired by Doodles' flag descisions in their mod

hide_WB_flag_options = {
	is_shown = {
		is_player = yes
		has_global_variable = show_WB_flag_options_var
		NOT = { has_global_variable = remove_all_WB_flag_options_var }
	}
	
	possible = {
		custom_tooltip = WB_override_tt
	}
	
	when_taken = {
		remove_global_variable = show_WB_flag_options_var
		
		if = {
			limit = {
				NOT = { exists = c:NGF }
				has_global_variable = show_WB_NGF_options_var
			}
			remove_global_variable = show_WB_NGF_options_var
		}
		else_if = {
			limit = {
				NOT = { exists = c:SGF }
				has_global_variable = show_WB_SGF_options_var
			}
			remove_global_variable = show_WB_SGF_options_var
		}
		else_if = {
			limit = {
				NOT = { exists = c:GER }
				has_global_variable = show_WB_Germany_options_var
			}
			remove_global_variable = show_WB_Germany_options_var
		}
		else_if = {
			limit = {
				NOT = { exists = c:ITA }
				has_global_variable = show_WB_Italy_options_var
			}
			remove_global_variable = show_WB_Italy_options_var
		}
	}
	
	ai_chance = {
		base = 0
	}		
}

show_WB_flag_options = {
	is_shown = {
		is_player = yes
        NOT = { has_global_variable = show_WB_flag_options_var }
		NOT = { has_global_variable = remove_all_WB_flag_options_var }
	}
	
	possible = {
		custom_tooltip = WB_override_tt
	}
	
	when_taken = {
		set_global_variable = show_WB_flag_options_var
		custom_tooltip = WB_options_tt
		
		if = {
			limit = {
				AND = {
					exists = c:FRA
					this = c:FRA
				}
			}
			custom_tooltip = WB_france_tt
		}
		
		else_if = {
			limit = {
				AND = {
					exists = c:ALD
					this = c:ALD
				}
			}
			custom_tooltip = WB_algeria_tt
		}
		else_if = {
			limit = {
				NAND = {
					exists = c:ALD
					this = c:ALD
				}
				OR = {
					has_variable = algeria_constantine_var
					has_variable = algeria_ait_abbas_var
					has_variable = WB_is_Touggourt_var
				}
			}
			custom_tooltip = WB_algerian_states_tt
		}
		else_if = {
			limit = {
				AND = {
					exists = c:BEL
					this = c:BEL
				}
			}
			custom_tooltip = WB_belgium_tt
		}
		else_if = {
			limit = {
				OR = {
					country_has_primary_culture = cu:anglo_canadian
					country_has_primary_culture = cu:franco_canadian
				}
			}
			custom_tooltip = WB_canadian_states_tt
		}
		else_if = {
			limit = {
				country_has_primary_culture = cu:australian
			}
			custom_tooltip = WB_australian_states_tt
		}
		else_if = {
			limit = {
				AND = {
						exists = c:ROM
						this = c:ROM
					}
			}
			custom_tooltip = WB_romania_tt
		}
		
		else_if = {
			limit = {
				AND = {
						exists = c:KUK
						this = c:KUK
						c:KUK = {
							OR = {
								was_formed_from = ROM
								has_variable = WB_is_Wallachia_var
								has_variable = WB_is_Moldavia_var
							}
						}
					}
			}
			custom_tooltip = WB_romania_KUK_tt
		}
		
		if = {
			limit = {
				OR = {
					AND = {
						exists = c:HAN
						c:HAN = {
							OR = {
								coa_dictatorship_trigger = yes
								coa_fascist_trigger = yes
							}
						}
					}
					AND = {
						exists = c:NGF
						c:NGF = {
							has_variable = WB_is_Hanover_var
							OR = {
								coa_dictatorship_trigger = yes
								coa_fascist_trigger = yes
							}
						}
					}
					AND = {
						exists = c:GER
						c:GER = {
							has_variable = WB_is_Hanover_var
							OR = {
								coa_dictatorship_trigger = yes
								coa_fascist_trigger = yes
							}
						}
					}
				}
			}
			custom_tooltip = WB_hanover_alts_tt
		}
		
		else = {
			custom_tooltip = WB_other_options_tt		
		}
	}
	
	ai_chance = {
		base = 0
	}		
}

## Belgium Options ##

WB_BEL_toggle_chibis_off = {
	is_shown = {
		is_player = yes
		exists = c:BEL
		this = c:BEL
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:BEL = {
			NOT = {
				has_variable = WB_belgium_no_chibis_var
			}
		}
	}
	
	when_taken = {
		c:BEL = {
			set_variable = WB_belgium_no_chibis_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_BEL_toggle_chibis_on = {
	is_shown = {
		is_player = yes
		exists = c:BEL
		this = c:BEL
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:BEL = {
			has_variable = WB_belgium_no_chibis_var
		}
	}
	
	when_taken = {
		c:BEL = {
			remove_variable = WB_belgium_no_chibis_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## Romania Options ##

WB_ROM_duo_toggle_on = {
	is_shown = {
		is_player = yes
		exists = c:ROM
		this = c:ROM
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:ROM = {
			NOT = {
				has_variable = WB_ROM_duo_var
			}
		}
	}
	
	when_taken = {
		c:ROM = {
			set_variable = WB_ROM_duo_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_ROM_duo_toggle_off = {
	is_shown = {
		is_player = yes
		exists = c:ROM
		this = c:ROM
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:ROM = {
			has_variable = WB_ROM_duo_var
		}
	}
	
	when_taken = {
		c:ROM = {
			remove_variable = WB_ROM_duo_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_ROM_duo_toggle_on_KUK = {
	is_shown = {
		is_player = yes
		exists = c:KUK
		this = c:KUK
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:KUK = {
			OR = {
				was_formed_from = ROM
				has_variable = WB_is_Wallachia_var
				has_variable = WB_is_Moldavia_var
			}
			NOT = {
				has_variable = WB_ROM_duo_var
			}
		}
	}
	
	when_taken = {
		c:KUK = {
			set_variable = WB_ROM_duo_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_ROM_duo_toggle_off_KUK = {
	is_shown = {
		is_player = yes
		exists = c:KUK
		this = c:KUK
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:KUK = {
			OR = {
				was_formed_from = ROM
				has_variable = WB_is_Wallachia_var
				has_variable = WB_is_Moldavia_var
			}
			has_variable = WB_ROM_duo_var
		}
	}
	
	when_taken = {
		c:KUK = {
			remove_variable = WB_ROM_duo_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}


## France monarchist flags ##

WB_FRA_remove_portrait_variables = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		AND = {
			exists = c:FRA
			this = c:FRA
		}
		
		c:FRA = { has_law = law_type:law_monarchy }
		c:FRA = { has_variable = WB_july_revolution_flag_var }
	}
	
	when_taken = {
		c:FRA = {
			remove_variable = WB_july_revolution_flag_var
			remove_variable = WB_orleanist_flag_var
			remove_variable = WB_bonapartist_flag_var
			remove_variable = WB_bourbon_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_FRA_toggle_orleanist_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		AND = {
			exists = c:FRA
			this = c:FRA
		}
		
		c:FRA = { has_law = law_type:law_monarchy }
		
		c:FRA = {
			NOR = {
				has_variable = WB_july_revolution_flag_var
				has_variable = WB_orleanist_flag_var
				has_variable = WB_bonapartist_flag_var
				has_variable = WB_bourbon_flag_var
			}
		}
	}
	
	when_taken = {
		c:FRA = {
			set_variable = WB_orleanist_flag_var
			
			remove_variable = WB_july_revolution_flag_var
			remove_variable = WB_bonapartist_flag_var
			remove_variable = WB_bourbon_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_FRA_toggle_bonapartist_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		AND = {
			exists = c:FRA
			this = c:FRA
		}
		
		c:FRA = { has_law = law_type:law_monarchy }
		c:FRA = { has_variable = WB_orleanist_flag_var }
	}
	
	when_taken = {
		c:FRA = {
			set_variable = WB_bonapartist_flag_var
			
			remove_variable = WB_orleanist_flag_var
			remove_variable = WB_bourbon_flag_var
			remove_variable = WB_july_revolution_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_FRA_toggle_bourbon_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		AND = {
			exists = c:FRA
			this = c:FRA
		}
		
		c:FRA = { has_law = law_type:law_monarchy }
		c:FRA = { has_variable = WB_bonapartist_flag_var }
	}
	
	when_taken = {
		c:FRA = {
			set_variable = WB_bourbon_flag_var
			
			remove_variable = WB_bonapartist_flag_var
			remove_variable = WB_july_revolution_flag_var
			remove_variable = WB_orleanist_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_FRA_toggle_july_rev_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		AND = {
			exists = c:FRA
			this = c:FRA
		}
		
		c:FRA = { has_law = law_type:law_monarchy }
		c:FRA = { has_variable = WB_bourbon_flag_var }
	}
	
	when_taken = {
		c:FRA = {
			set_variable = WB_july_revolution_flag_var
			
			remove_variable = WB_orleanist_flag_var
			remove_variable = WB_bonapartist_flag_var
			remove_variable = WB_bourbon_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## Algeria Options ##

WB_ALD_toggle_portrait_variables = {
	is_shown = {
		is_player = yes
		exists = c:ALD
		this = c:ALD
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:ALD = {
			OR = {
				has_variable = algeria_constantine_var
				has_variable = algeria_ait_abbas_var
				has_variable = WB_is_Touggourt_var
			}
			
			OR = {
				has_variable = algeria_deylik_restored
				has_variable = algeria_barbary_restored
			}
		}
		
		NOR = {
			has_variable = WB_force_constantine_deylik
			has_variable = WB_force_kabylia_barbary
			has_variable = WB_force_touggourt_barbary
		}
		
	}
	
	when_taken = {
		if = {
			limit = {
				c:ALD = {
					has_variable = algeria_barbary_restored
					has_variable = algeria_ait_abbas_var
				}
			}
			c:ALD = { set_variable = WB_force_kabylia_barbary }
		}
		else_if = {
			limit = {
				c:ALD = {
					has_variable = algeria_barbary_restored
					has_variable = WB_is_Touggourt_var
				}
			}
			c:ALD = { set_variable = WB_force_touggourt_barbary }
		}
		else = {
			c:ALD = { set_variable = WB_force_constantine_deylik }		
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_ALD_remove_portrait_variables = {
	is_shown = {
		is_player = yes
		exists = c:ALD
		this = c:ALD
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:ALD = {
			OR = {
				has_variable = algeria_constantine_var
				has_variable = algeria_ait_abbas_var
				has_variable = WB_is_Touggourt_var
			}
			
			OR = {
				has_variable = WB_force_constantine_deylik
				has_variable = WB_force_kabylia_barbary
				has_variable = WB_force_touggourt_barbary
			}
		}
		
	}
	
	when_taken = {
		c:ALD = {
			remove_variable = WB_force_constantine_deylik
			remove_variable = WB_force_kabylia_barbary
			remove_variable = WB_force_touggourt_barbary
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## Canada Options ##

WB_CAN_toggle_que_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			NOR = {
				has_variable = WB_is_Quebec_var
				has_variable = WB_is_HBC_var
				has_variable = WB_is_Cascadia_var
				has_variable = WB_is_New_Brunswick_var
				has_variable = WB_is_Nova_Scotia_var
				has_variable = WB_is_Newfoundland_var
			}
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_Quebec_var
			
			remove_variable = WB_is_HBC_var
			remove_variable = WB_is_Cascadia_var
			remove_variable = WB_is_New_Brunswick_var
			remove_variable = WB_is_Nova_Scotia_var
			remove_variable = WB_is_Newfoundland_var
			remove_variable = WB_is_WU_Canada_var
		}
		
		custom_tooltip = WB_frances_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_CAN_toggle_hbc_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			has_variable = WB_is_Quebec_var
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_HBC_var
			
			remove_variable = WB_is_Cascadia_var
			remove_variable = WB_is_New_Brunswick_var
			remove_variable = WB_is_Nova_Scotia_var
			remove_variable = WB_is_Newfoundland_var
			remove_variable = WB_is_WU_Canada_var
			remove_variable = WB_is_Quebec_var
		}
		
		custom_tooltip = WB_hbc_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_CAN_toggle_org_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			has_variable = WB_is_HBC_var
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_Cascadia_var
			
			remove_variable = WB_is_New_Brunswick_var
			remove_variable = WB_is_Nova_Scotia_var
			remove_variable = WB_is_Newfoundland_var
			remove_variable = WB_is_WU_Canada_var
			remove_variable = WB_is_Quebec_var
			remove_variable = WB_is_HBC_var
		}
		
		custom_tooltip = WB_cascadia_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_CAN_toggle_nbs_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			has_variable = WB_is_Cascadia_var
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_New_Brunswick_var
			
			remove_variable = WB_is_Nova_Scotia_var
			remove_variable = WB_is_Newfoundland_var
			remove_variable = WB_is_WU_Canada_var
			remove_variable = WB_is_Quebec_var
			remove_variable = WB_is_HBC_var
			remove_variable = WB_is_Cascadia_var
		}
		
		custom_tooltip = WB_new_brunswick_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_CAN_toggle_nvs_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			has_variable = WB_is_New_Brunswick_var
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_Nova_Scotia_var
			
			remove_variable = WB_is_Newfoundland_var
			remove_variable = WB_is_WU_Canada_var
			remove_variable = WB_is_Quebec_var
			remove_variable = WB_is_HBC_var
			remove_variable = WB_is_Cascadia_var
			remove_variable = WB_is_New_Brunswick_var
		}
		
		custom_tooltip = WB_farewell_nvs_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_CAN_toggle_new_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			has_variable = WB_is_Nova_Scotia_var
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_Newfoundland_var
			
			remove_variable = WB_is_WU_Canada_var
			remove_variable = WB_is_Quebec_var
			remove_variable = WB_is_HBC_var
			remove_variable = WB_is_Cascadia_var
			remove_variable = WB_is_New_Brunswick_var
			remove_variable = WB_is_Nova_Scotia_var
		}
		
		custom_tooltip = WB_new_doggos_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_CAN_toggle_default_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:CAN
				this = c:CAN
			}
			
			AND = {
				exists = c:CAN
				c:CAN = { is_subject_of = ROOT }
			}
		}
		
		c:CAN = {
			has_variable = WB_is_Newfoundland_var
		}
	}
	
	when_taken = {
		c:CAN = {
			set_variable = WB_is_WU_Canada_var
			
			remove_variable = WB_is_Quebec_var
			remove_variable = WB_is_HBC_var
			remove_variable = WB_is_Cascadia_var
			remove_variable = WB_is_New_Brunswick_var
			remove_variable = WB_is_Nova_Scotia_var
			remove_variable = WB_is_Newfoundland_var
		}
		
		custom_tooltip = WB_englands_daughter_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

## Australia Options

WB_AST_toggle_nzl_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:AST
				this = c:AST
			}
			
			AND = {
				exists = c:AST
				c:AST = { is_subject_of = ROOT }
			}
		}
		
		c:AST = {
			NOR = {
				has_variable = WB_is_New_Zealand_var
				has_variable = WB_is_Western_Australia_var
				has_variable = WB_is_South_Australia_var
				has_variable = WB_is_Tasmania_var
			}
		}
	}
	
	when_taken = {
		c:AST = {
			set_variable = WB_is_New_Zealand_var
			
			remove_variable = WB_is_Western_Australia_var
			remove_variable = WB_is_South_Australia_var
			remove_variable = WB_is_Tasmania_var
			remove_variable = WB_is_WU_Australia_var
		}
		
		custom_tooltip = WB_englands_daughter_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_AST_toggle_was_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:AST
				this = c:AST
			}
			
			AND = {
				exists = c:AST
				c:AST = { is_subject_of = ROOT }
			}
		}
		
		c:AST = {
			has_variable = WB_is_New_Zealand_var
		}
	}
	
	when_taken = {
		c:AST = {
			set_variable = WB_is_Western_Australia_var
			
			remove_variable = WB_is_South_Australia_var
			remove_variable = WB_is_Tasmania_var
			remove_variable = WB_is_WU_Australia_var
			remove_variable = WB_is_New_Zealand_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_AST_toggle_sas_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:AST
				this = c:AST
			}
			
			AND = {
				exists = c:AST
				c:AST = { is_subject_of = ROOT }
			}
		}
		
		c:AST = {
			has_variable = WB_is_Western_Australia_var
		}
	}
	
	when_taken = {
		c:AST = {
			set_variable = WB_is_South_Australia_var
			
			remove_variable = WB_is_Tasmania_var
			remove_variable = WB_is_WU_Australia_var
			remove_variable = WB_is_New_Zealand_var
			remove_variable = WB_is_Western_Australia_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_AST_toggle_tas_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:AST
				this = c:AST
			}
			
			AND = {
				exists = c:AST
				c:AST = { is_subject_of = ROOT }
			}
		}
		
		c:AST = {
			has_variable = WB_is_South_Australia_var
		}
	}
	
	when_taken = {
		c:AST = {
			set_variable = WB_is_Tasmania_var
			
			remove_variable = WB_is_WU_Australia_var
			remove_variable = WB_is_New_Zealand_var
			remove_variable = WB_is_Western_Australia_var
			remove_variable = WB_is_South_Australia_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_AST_toggle_default_portrait = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		OR = {
			AND = {
				exists = c:AST
				this = c:AST
			}
			
			AND = {
				exists = c:AST
				c:AST = { is_subject_of = ROOT }
			}
		}
		
		c:AST = {
			has_variable = WB_is_Tasmania_var
		}
	}
	
	when_taken = {
		c:AST = {
			set_variable = WB_is_WU_Australia_var
			
			remove_variable = WB_is_New_Zealand_var
			remove_variable = WB_is_Western_Australia_var
			remove_variable = WB_is_South_Australia_var
			remove_variable = WB_is_Tasmania_var
		}
		
		custom_tooltip = WB_englands_daughter_tt
	}
	
	ai_chance = {
		base = 0
	}	
}


## Italy Options ##

show_WB_Italy_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		NOT = { has_global_variable = show_WB_Italy_options_var }
		
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
	}
	
	possible = {
		custom_tooltip = {
			text = WB_Italy_must_exists_tt
			exists = c:ITA
		}
		custom_tooltip = WB_Italians_must_be_real_tt
	}
	
	when_taken = {
		set_global_variable = show_WB_Italy_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

hide_WB_Italy_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
	}
	
	when_taken = {
		remove_global_variable = show_WB_Italy_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

WB_force_default_Italy_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
	}
	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Sardinia_Piedmont_var
			
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Lombardia_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Lombardia_var }
		}
	}
	
	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Lombardia_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Lucca_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Lucca_var }
		}
	}
	
	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Lucca_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Modena_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Modena_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Modena_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Papal_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Papal_States_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Papal_States_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Parma_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Parma_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Parma_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Trieste_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Trieste_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Trieste_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Tuscany_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Tuscany_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Tuscany_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Two_Sicilies_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Two_Sicilies_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Two_Sicilies_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Venice_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Venice_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Italy_options_var
		
		exists = c:ITA
		
		c:ITA = {
			NOT = { has_variable = WB_is_Venice_var }
		}
	}
	

	
	when_taken = {
		c:ITA = {
			set_variable = WB_is_Venice_var
			
			remove_variable = WB_is_Sardinia_Piedmont_var
			remove_variable = WB_is_Two_Sicilies_var
			remove_variable = WB_is_Papal_States_var
			remove_variable = WB_is_Tuscany_var
			remove_variable = WB_is_Modena_var
			remove_variable = WB_is_Lucca_var
			remove_variable = WB_is_Parma_var
			remove_variable = WB_is_Lombardia_var
			remove_variable = WB_is_Trieste_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## North German Federation Options ##

show_WB_NGF_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_Italy_options_var }
		
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:NGF
	}
	
	possible = {
		exists = c:NGF
	}
	
	when_taken = {
		set_global_variable = show_WB_NGF_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

hide_WB_NGF_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_NGF_options_var
		
		exists = c:NGF
	}
	
	when_taken = {
		remove_global_variable = show_WB_NGF_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

WB_remove_NGF_portrait_variables = {

	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_NGF_options_var
		
		exists = c:NGF
		
		c:NGF = {
			OR = { 
				has_variable = WB_is_Prussia_var
				has_variable = WB_is_Hanover_var
			}
		}
	}
	
	when_taken = {
		c:NGF = {	
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_NGF_force_Prussia_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_NGF_options_var
		
		exists = c:NGF
		
		c:NGF = {
			NOT = { has_variable = WB_is_Prussia_var }
		}
	}
	
	when_taken = {
		c:NGF = {
			set_variable = WB_is_Prussia_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_NGF_force_Hanover_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_NGF_options_var
		
		exists = c:NGF
		
		c:NGF = {
			NOT = { has_variable = WB_is_Hanover_var }
		}
	}
	
	when_taken = {
		c:NGF = {
			set_variable = WB_is_Hanover_var
			
			remove_variable = WB_is_Prussia_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## South German Federation Options ##

show_WB_SGF_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_Italy_options_var }
		
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:SGF
	}
	
	possible = {
		exists = c:SGF
	}
	
	when_taken = {
		set_global_variable = show_WB_SGF_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

hide_WB_SGF_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_SGF_options_var
		
		exists = c:SGF
	}
	
	when_taken = {
		remove_global_variable = show_WB_SGF_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

WB_remove_SGF_portrait_variables = {

	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_SGF_options_var
		
		exists = c:SGF
		
		c:SGF = {
			OR = { 
				has_variable = WB_is_Austria_var
				has_variable = WB_is_Bavaria_var
			}
		}
	}
	
	when_taken = {
		c:SGF = {
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Bavaria_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_SGF_force_Austria_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_SGF_options_var
		
		exists = c:SGF
		
		c:SGF = {
			NOT = { has_variable = WB_is_Austria_var }
		}
	}
	

	
	when_taken = {
		c:SGF = {
			set_variable = WB_is_Austria_var
		
			remove_variable = WB_is_Bavaria_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}



WB_SGF_force_Bavaria_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_SGF_options_var
		
		exists = c:SGF
		
		c:SGF = {
			NOT = { has_variable = WB_is_Bavaria_var }
		}
	}
	

	
	when_taken = {
		c:SGF = {
			set_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Austria_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## Germany Options ##

show_WB_Germany_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		NOT = { has_global_variable = show_WB_Germany_options_var }
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
	}
	
	possible = {
		custom_tooltip = {
			text = WB_Germany_must_exist_tt
			exists = c:GER
		}
	}
	
	when_taken = {
		set_global_variable = show_WB_Germany_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

hide_WB_Germany_options = {
	is_shown = {
		is_player = yes
        has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
	}
	
	when_taken = {
		remove_global_variable = show_WB_Germany_options_var
	}
	
	ai_chance = {
		base = 0
	}		
}

WB_remove_all_german_portrait_variables = {

	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			OR = {
				has_variable = WB_force_NGF_portrait_var
				has_variable = WB_force_SGF_portrait_var
				has_variable = WB_is_Prussia_var
				has_variable = WB_is_Austria_var
				has_variable = WB_is_Austria_Hungary_var
				has_variable = WB_force_use_Austria_Hungary_var
				has_variable = WB_is_Bavaria_var
				
				has_variable = WB_is_Hanover_var
			}
		}
	}
	
	when_taken = {
		c:GER = {
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_force_SGF_portrait_var
			remove_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_North_German_generic_portraits = {

	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			NOT = { has_variable = WB_force_NGF_portrait_var }
		}
	}
	
	when_taken = {
		custom_tooltip = WB_quebecs_grandma_tt
		c:GER = {
			set_variable = WB_force_NGF_portrait_var
			
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_force_SGF_portrait_var
			remove_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_South_German_generic_portraits = {

	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			NOT = { has_variable = WB_force_SGF_portrait_var }
		}
	}
	
	when_taken = {
		c:GER = {
			set_variable = WB_force_SGF_portrait_var
			
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Prussia_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			NOT = { has_variable = WB_is_Prussia_var }
		}
	}
	
	when_taken = {
		custom_tooltip = WB_the_og_germany_tt
		c:GER = {
			set_variable = WB_is_Prussia_var
			
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_force_SGF_portrait_var
			remove_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Austria_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			OR = {
				NOT = { has_variable = WB_is_Austria_var }
				has_variable = WB_is_Austria_Hungary_var
			}
		}
	}
	

	
	when_taken = {
		c:GER = {
			set_variable = WB_is_Austria_var
			
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_force_SGF_portrait_var
			remove_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Austria_Hungary_portraits = {

	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			NOT = { has_variable = WB_is_Austria_Hungary_var }
			NOT = { has_variable = WB_force_use_Austria_Hungary_var }
		}
	}
	

	
	when_taken = {
		c:GER = {
			set_variable = WB_is_Austria_Hungary_var
			set_variable = WB_force_use_Austria_Hungary_var
			
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_var
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_force_SGF_portrait_var
			remove_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Bavaria_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			NOT = { has_variable = WB_is_Bavaria_var }
		}
	}
	

	
	when_taken = {
		c:GER = {
			set_variable = WB_is_Bavaria_var
			
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_force_SGF_portrait_var
			
			remove_variable = WB_is_Hanover_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_force_Hanover_portraits = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		has_global_variable = show_WB_Germany_options_var
		
		exists = c:GER
		
		c:GER = {
			NOT = { has_variable = WB_is_Hanover_var }
		}
	}
	

	
	when_taken = {
		c:GER = {
			set_variable = WB_is_Hanover_var
			
			remove_variable = WB_is_Prussia_var
			remove_variable = WB_is_Austria_var
			remove_variable = WB_is_Austria_Hungary_var
			remove_variable = WB_force_use_Austria_Hungary_var
			remove_variable = WB_is_Bavaria_var
			remove_variable = WB_force_NGF_portrait_var
			remove_variable = WB_force_SGF_portrait_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}



## USA Options ##

WB_USA_toggle_brunette = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:USA = {
			NOT = { has_variable = WB_USA_brunette_alt_var }
			
			NOR = {
				has_variable = WB_is_Texas_var
				#has_variable = WB_is_CSA_var
				#has_variable = WB_is_FSA_var
				#has_variable = WB_is_California_var
				#has_variable = WB_is_New_England_var
				#has_variable = WB_is_Michigan_var
				#has_variable = WB_is_Deseret_var
				has_variable = WB_is_Cascadia_var
			}
		}
		
		exists = c:USA
	}
	
	when_taken = {
		c:USA = {
			set_variable = WB_USA_brunette_alt_var
		}
		
		if = {
			limit = {
				AND = {
					exists = c:USA
					this = c:USA
				}
			}
			custom_tooltip = WB_usa_brunette_tt
		}
		else_if = {
			limit = {
				AND = {
					exists = c:GBR
					this = c:GBR
				}
			}
			custom_tooltip = WB_usa_brunette_uk_tt
		}
		else_if = {
			limit = {
				OR = {
					AND = {
						exists = c:ONT
						this = c:ONT
					}
					AND = {
						exists = c:CAN
						this = c:CAN
						c:CAN = { 
							has_variable = WB_is_WU_Canada_var
						}
					}
					AND = {
						exists = c:NSW
						this = c:NSW
					}
					AND = {
						exists = c:AST
						this = c:AST
						c:AST = { 
							OR = {
								has_variable = WB_is_WU_Australia_var
								has_variable = WB_is_New_Zealand_var
							} 
						}
					}
					AND = {
						exists = c:NZL
						this = c:NZL
					}
				}
			}
			custom_tooltip = WB_usa_brunette_sister_tt
		}
		else = {
			custom_tooltip = WB_usa_brunette_else_tt		
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_USA_toggle_blonde = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:USA = {
			has_variable = WB_USA_brunette_alt_var
			
			NOR = {
				has_variable = WB_is_Texas_var
				#has_variable = WB_is_CSA_var
				#has_variable = WB_is_FSA_var
				#has_variable = WB_is_California_var
				#has_variable = WB_is_New_England_var
				#has_variable = WB_is_Michigan_var
				#has_variable = WB_is_Deseret_var
				has_variable = WB_is_Cascadia_var
			}
		}
		
		exists = c:USA
	}
	
	when_taken = {
		c:USA = {
			remove_variable = WB_USA_brunette_alt_var
		}
		
		if = {
			limit = {
				AND = {
					exists = c:USA
					this = c:USA
				}
			}
			custom_tooltip = WB_usa_blonde_tt
		}
		else_if = {
			limit = {
				AND = {
					exists = c:GBR
					this = c:GBR
				}
			}
			custom_tooltip = WB_usa_blonde_uk_tt
		}
		else_if = {
			limit = {
				OR = {
					AND = {
						exists = c:ONT
						this = c:ONT
					}
					AND = {
						exists = c:CAN
						this = c:CAN
						c:CAN = { 
							has_variable = WB_is_WU_Canada_var
						}
					}
					AND = {
						exists = c:NSW
						this = c:NSW
					}
					AND = {
						exists = c:AST
						this = c:AST
						c:AST = { 
							OR = {
								has_variable = WB_is_WU_Australia_var
								has_variable = WB_is_New_Zealand_var
							} 
						}
					}
					AND = {
						exists = c:NZL
						this = c:NZL
					}
				}
			}
			custom_tooltip = WB_usa_blonde_sister_tt
		}
		else = {
			custom_tooltip = WB_usa_blonde_else_tt		
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

## Removes the honorific names ##

WB_remove_honorific_names = {
	is_shown = {
		is_player = yes
		has_global_variable = show_WB_flag_options_var
		
        NOT = { has_global_variable = WB_remove_honorifics_var }
		NOT = { has_game_rule = WB_no_extra_fluff }
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
	}
	
	when_taken = {
		set_global_variable = WB_remove_honorifics_var
	}
	
	ai_chance = {
		base = 0
	}		
}

WB_restore_honorific_names = {
	is_shown = {
		is_player = yes
		has_global_variable = show_WB_flag_options_var
		
		has_global_variable = WB_remove_honorifics_var
		NOT = { has_game_rule = WB_no_extra_fluff }
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
	}
	
	when_taken = {
		remove_global_variable = WB_remove_honorifics_var
	}
	
	ai_chance = {
		base = 0
	}		
}

WB_restore_vanilla_nepal_flag = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:NEP = {
			NOT = { has_variable = WB_NEP_use_vanilla_flag_var }
		}
		
		exists = c:NEP
	}
	
	when_taken = {
		c:NEP = {
			set_variable = WB_NEP_use_vanilla_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_restore_WB_nepal_flag = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		c:NEP = { has_variable = WB_NEP_use_vanilla_flag_var }
		
		exists = c:NEP
	}
	
	when_taken = {
		c:NEP = {
			remove_variable = WB_NEP_use_vanilla_flag_var
		}
	}
	
	ai_chance = {
		base = 0
	}	
}


# Hanover dictatorship portrait toggles
# I can't seem to make these all one decision without the Error Log screaming at me

WB_hanover_dictatorship_alt_portrait_han = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:HAN
		c:HAN = {
			NOT = { has_variable = WB_Hanover_dictator_alt_var }
			
			OR= {
				coa_dictatorship_trigger = yes
				coa_fascist_trigger = yes
			}
		}
	}
	
	when_taken = {
		c:HAN = {
			set_variable = WB_Hanover_dictator_alt_var
		}
		custom_tooltip = WB_hanover_dictator_alt_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_hanover_dictatorship_default_portrait_han = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:HAN
		c:HAN = {
			has_variable = WB_Hanover_dictator_alt_var
			
			OR= {
				coa_dictatorship_trigger = yes
				coa_fascist_trigger = yes
			}
		}
	}
	
	when_taken = {
		c:HAN = {
			remove_variable = WB_Hanover_dictator_alt_var
		}
		custom_tooltip = WB_hanover_dictator_default_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_hanover_dictatorship_alt_portrait_ngf = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:NGF
		c:NGF = {
			has_variable = WB_is_Hanover_var
			
			NOT = { has_variable = WB_Hanover_dictator_alt_var }
			
			OR= {
				coa_dictatorship_trigger = yes
				coa_fascist_trigger = yes
			}
		}
	}
	
	when_taken = {
		c:NGF = {
			set_variable = WB_Hanover_dictator_alt_var
		}
		custom_tooltip = WB_hanover_dictator_alt_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_hanover_dictatorship_default_portrait_ngf = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:NGF
		c:NGF = {
			has_variable = WB_is_Hanover_var
		
			has_variable = WB_Hanover_dictator_alt_var
			
			OR= {
				coa_dictatorship_trigger = yes
				coa_fascist_trigger = yes
			}
		}
	}
	
	when_taken = {
		c:NGF = {
			remove_variable = WB_Hanover_dictator_alt_var
		}
		custom_tooltip = WB_hanover_dictator_default_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_hanover_dictatorship_alt_portrait_ger = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:GER
		c:GER = {
			has_variable = WB_is_Hanover_var
			
			NOT = { has_variable = WB_Hanover_dictator_alt_var }
			
			OR= {
				coa_dictatorship_trigger = yes
				coa_fascist_trigger = yes
			}
		}
	}
	
	when_taken = {
		c:GER = {
			set_variable = WB_Hanover_dictator_alt_var
		}
		custom_tooltip = WB_hanover_dictator_alt_tt
	}
	
	ai_chance = {
		base = 0
	}	
}

WB_hanover_dictatorship_default_portrait_ger = {
	is_shown = {
		is_player = yes
		
		has_global_variable = show_WB_flag_options_var
		
		NOT = { has_global_variable = show_WB_Italy_options_var }
		NOT = { has_global_variable = show_WB_Germany_options_var }
		NOT = { has_global_variable = show_WB_NGF_options_var }
		NOT = { has_global_variable = show_WB_SGF_options_var }
		
		exists = c:GER
		c:GER = {
			has_variable = WB_is_Hanover_var
		
			has_variable = WB_Hanover_dictator_alt_var
			
			OR= {
				coa_dictatorship_trigger = yes
				coa_fascist_trigger = yes
			}
		}
	}
	
	when_taken = {
		c:GER = {
			remove_variable = WB_Hanover_dictator_alt_var
		}
		custom_tooltip = WB_hanover_dictator_default_tt
	}
	
	ai_chance = {
		base = 0
	}	
}