namespace = game_rule

# Generated families 	- 1001
# Gender equality 		- 1010

scripted_trigger de_jure_liege_title_to_destroy = {
	tier > tier_county
	is_titular = no
	is_landless_type_title = no
	is_head_of_faith = no
	save_temporary_scope_as = de_jure_liege_title
	
	NOT = {
		ROOT = {
			any_sub_realm_title = {
				tier = tier_county
				target_is_de_jure_liege_or_above = scope:de_jure_liege_title
			}
		}
	}
	
	NAND = {
		has_game_rule = on_limited_de_jure_requirement
		holder = {
			is_ai = no
		}
		this = holder.primary_title
	}
}

game_rule.1 = { # De Jure Requirement
	hidden = yes
	
	trigger = {
		NOT = { has_game_rule = off_de_jure_requirement }
		any_held_title = {
			de_jure_liege_title_to_destroy = yes
		}
	}

	immediate = {
		# Notification
		random_held_title = {
			limit = {
				de_jure_liege_title_to_destroy = yes
			}
			save_scope_as = title_to_destroy
		}
		send_interface_message = {
			type = event_title_bad
			title = de_jure_requirement_title
			desc = de_jure_requirement_desc

			left_icon = scope:title_to_destroy

			destroy_title = scope:title_to_destroy
			add_pressed_claim = scope:title_to_destroy
		}
	}
}


######################
# GENERATED FAMILIES #
######################

scripted_trigger only_ai_if_ai_only_trigger = {
	trigger_if = {
		limit = { has_game_rule = on_generate_families_ai_only }
		is_ai = yes
	}
	trigger_else = {
		always = yes
	}
}


game_rule.1000 = {
	scope = none
	hidden = yes
	orphan = yes

	trigger = {
		OR = {
			has_game_rule = on_generate_families
			has_game_rule = on_generate_families_ai_only
		}
	}

	immediate = {
		every_independent_ruler = {
			if = {
				limit = { only_ai_if_ai_only_trigger = yes }
				trigger_event = game_rule.1001
			}
			every_vassal_or_below = {
				limit = { only_ai_if_ai_only_trigger = yes }
				trigger_event = game_rule.1001
			}
		}
	}
}

game_rule.1001 = { #by Mathilda Bjarnehed
	type = character_event
	hidden = yes
	
	trigger = {
		is_from_ruler_designer = no # Do not modify the family of somoene from the ruler designer
		#Is in need of family
		NOT = {
			exists = player_heir
		}
		#Allowed to get family
		NOT = { # Otherwise historical characters sometimes generate inappropriate children
			any_child = {
				always = yes
			}
		}
		is_eunuch_trigger = no
		NOT = { has_trait = celibate }
		NOT = { has_trait_with_flag = can_not_marry }
		age >= 17 #Because you need ~1 year of pregnancy
		is_playable_character = yes
		primary_title = {
			is_mercenary_company = no
			is_holy_order = no
		}
		NOR = {
			government_has_flag = government_is_theocracy
			has_character_flag = do_not_generate_starting_family
		}
	}


	immediate = {
		if = {
			limit = { faith = { has_doctrine_parameter = marriage_event } }
			add_character_flag = ignore_marriage_event
		}
		save_scope_as = location_scope
		game_rule_create_spouse_and_children = { CHARACTER = root LOCATION = scope:location_scope }

		#In case your children are very old
		if = {
			limit = {
				age >= 55
			}
			every_child = {
				limit = {
					age >= 35
				}
				save_scope_as = childless_heir
				game_rule_create_spouse_and_children = { CHARACTER = scope:childless_heir LOCATION = scope:location_scope }
				
				#In case your grandchildren are very old
				every_child = {
					limit = {
						age >= 35
					}
					save_scope_as = childless_heir
					game_rule_create_spouse_and_children = { CHARACTER = scope:childless_heir LOCATION = scope:location_scope }
					
					#In case your great-grandchildren are very old
					every_child = {
						limit = {
							age >= 35
						}
						save_scope_as = childless_heir
						game_rule_create_spouse_and_children = { CHARACTER = scope:childless_heir LOCATION = scope:location_scope }
					}
				}
			}
		}
		# Error suppression.
		if = {
			limit = { always = no }
			add_character_flag = do_not_generate_starting_family
		}
	}
}

########################
# EXCLAVE INDEPENDENCE #
########################

game_rule.2 = { # Exclave Independence, on death
	hidden = yes
	
	trigger = {
		exclave_independence_trigger = yes
	}

	immediate = {
	
		if = { # None
			limit = {
				has_game_rule = off_exclave_independence
			}
		}
		else_if = { # Delay for AI if at war, skip if player at war
			limit = {
				is_at_war = yes
			}
			if = {
				limit = {
					is_ai = yes
					primary_heir ?= {
						is_ai = yes
						NOT = {
							has_character_flag = delayed_cleanse
						}
					}
				}
				primary_heir = {
					add_character_flag = {
						flag = delayed_cleanse
					}
				}
			}
		}
		else = {
			game_rule_exclave_independence_effect = yes
		}
	}
}

game_rule.3 = { # Exclave Independence, on war end
	hidden = yes
	
	trigger = {
		exclave_independence_trigger = yes
	}

	immediate = {
		if = { # None
			limit = {
				has_game_rule = off_exclave_independence
			}
		}
		else_if = { # Only the last war should trigger the independence
			limit = {
				is_at_war = yes
			}
		}
		else = {
			game_rule_exclave_independence_effect = yes
		}
	}
}

scripted_trigger weak_empire = {
	tier = tier_empire
	is_titular = no
	is_landless_type_title = no
	is_head_of_faith = no
	NOT = { # Need to own 20% of De Jure counties
		any_in_de_jure_hierarchy = {
			filter = {
				tier = tier_county
			}
			continue = {
				tier > tier_county
			}
			OR = {
				holder = root
				holder = {
					target_is_liege_or_above = root
				}
			}
			percent >= 0.20
		}
	}
}

game_rule.4 = { # Empire Obscurity Game Rule
	type = character_event
	title = game_rule.4.t
	desc = game_rule.4.desc
	theme = realm
	left_portrait = {
		character = root
		animation = grief
	}
	
	cooldown = { years = 25 }

	trigger = {
		has_game_rule = on_empire_obscurity_requirement
		is_landed_or_landless_administrative = yes
		is_at_war = no
		primary_title.tier >= tier_empire
		any_held_title = {
			weak_empire = yes
		}
		NOR = {
			government_allows = administrative # Byzantium should survive when small
			government_has_flag = government_is_nomadic # Nomads can have very 'small' empires where most of it is tributaries
			government_has_flag = government_is_mandala # Mandalas don't need as much dejure land for titles
		}
	}

	immediate = {
		random_held_title = {
			limit = {
				weak_empire = yes
			}
			save_scope_as = falling_empire
		}
	}

	option = { # No! I just need time!
		name = game_rule.4.a
		
		add_prestige = -2000
		add_prestige_experience = -2000
		
		ai_chance = {
			base = 0
		}
	}

	option = { # Farewell, dear empire...
		name = game_rule.4.b
		
		destroy_title = scope:falling_empire
		add_pressed_claim = scope:falling_empire
		
		ai_chance = {
			base = 100
		}
	}
}

#######################
# HUNGARIAN MIGRATION #
#######################

game_rule.1011 = {
	scope = none
	hidden = yes

	trigger = {
		game_start_date <= 867.1.1
	}

	immediate = {
		#launch_historical
		if = {
			limit = { has_game_rule = launch_historical }
			trigger_event = {
				id = game_rule.1012
				months = { 360 480 }
			}
		}
		#launch_immediate
		if = {
			limit = { has_game_rule = launch_immediate }
			character:159137 = {
				add_character_flag = undertaking_hungarian_migration
				start_war = {
					cb = hungarian_migration_cb
					target = character:70382
					target_title = title:k_hungary
				}
			}
		}
		#launch_random
		if = {
			limit = { has_game_rule = launch_random }
			trigger_event = {
				id = game_rule.1012
				months = { 60 480 }
			}
		}
		#launch_off: just do nothing.
	}
}

game_rule.1012 = {
	scope = none
	hidden = yes

	trigger = {
		#The Migration hasn't already been attempted.
		NOT = {
			is_target_in_global_variable_list = {
				name = unavailable_unique_decisions
				target = flag:flag_launched_hungarian_migration
			}
		}
		#No player is in a position to be angling for this.
		NOT = {
			any_player = {
				culture = culture:mogyer
				OR = {
					#Independent Mogyers are valid launchers.
					top_liege = this
					#... But notable vassals not beneath other Mogyers may also be eyeing it up.
					AND = {
						top_liege != this
						liege = {
							NOT = { culture = culture:mogyer }
							highest_held_title_tier = tier_kingdom
						}
					}
				}
			}
		}
		#There must be a suitable Eastern European Mogyer ruler around.
		any_county_in_region = {
			region = world_europe_east
			holder = { hungarian_migration_valid_ai_mogyer_ruler_trigger = yes }
		}
		#Pannonia must have a valid ruler to declare war on: someone with at least a duchy-ish sized chunk of the land, and who isn't a fellow Mogyer.
		any_county_in_region = {
			region = custom_hungary
			holder = {
				hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 }
			}
		}
	}

	#If the event fails, check again in a year or so, till the last available date for the decision has passed.
	on_trigger_fail = {
		if = {
			limit = {
				current_date <= 910.1.1
				#Don't just rerun the check forever if an attempt has already been made, of course.
				NOT = {
					is_target_in_global_variable_list = {
						name = unavailable_unique_decisions
						target = flag:flag_launched_hungarian_migration
					}
				}
			}
			trigger_event = {
				id = game_rule.1012
				days = 365
			}
		}
	}

	immediate = {
		#Designate a Hungarian attacker.
		random_county_in_region = {
			region = world_europe_east
			#Prefer higher tier non-emperor characters wherever possible.
			limit = {
				holder = {
					highest_held_title_tier = tier_kingdom
					hungarian_migration_valid_ai_mogyer_ruler_trigger = yes
				}
			}
			alternative_limit = {
				holder = {
					highest_held_title_tier = tier_duchy
					hungarian_migration_valid_ai_mogyer_ruler_trigger = yes
				}
			}
			alternative_limit = {
				holder = {
					highest_held_title_tier = tier_county
					hungarian_migration_valid_ai_mogyer_ruler_trigger = yes
				}
			}
			holder = { save_scope_as = hungarian_conqueror }
		}
		#... And a Pannonian defender.
		##Order these by rough size.
		if = {
			limit = {
				any_county_in_region = {
					region = custom_hungary
					holder = {
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 18 }
					}
				}
			}
			random_county_in_region = {
				region = custom_hungary
				limit = {
					holder = {
						any_held_county = {
							title_province = { geographical_region = custom_hungary }
						}
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 18 }
					}
				}
				holder.top_liege = { save_scope_as = pannonian_defender }
			}
		}
		else_if = {
			limit = {
				any_county_in_region = {
					region = custom_hungary
					holder = {
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 12 }
					}
				}
			}
			random_county_in_region = {
				region = custom_hungary
				limit = {
					holder = {
						any_held_county = {
							title_province = { geographical_region = custom_hungary }
						}
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 12 }
					}
				}
				holder.top_liege = { save_scope_as = pannonian_defender }
			}
		}
		else_if = {
			limit = {
				any_county_in_region = {
					region = custom_hungary
					holder = {
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 }
					}
				}
			}
			random_county_in_region = {
				region = custom_hungary
				limit = {
					holder = {
						any_held_county = {
							title_province = { geographical_region = custom_hungary }
						}
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 }
					}
				}
				holder.top_liege = { save_scope_as = pannonian_defender }
			}
		}
		##And just a fallback, in case something goes wrong elsewhere.
		else = {
			random_county_in_region = {
				region = custom_hungary
				limit = {
					holder = {
						hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 }
					}
				}
				holder.top_liege = { save_scope_as = pannonian_defender }
			}
		}
		#And sort notifications & setup.
		scope:hungarian_conqueror = {
			#Send the information event so that notifications are delivered correctly.
			trigger_event = east_europe.0141
			#Now, declare war using the pre-scripted flow.
			add_character_flag = undertaking_hungarian_migration
			start_war = {
				cb = hungarian_migration_cb
				target = scope:pannonian_defender
				target_title = title:k_hungary
			}
		}
	}
}

#################################
# NORMAN CONQUEST DETERMINATION #
#################################

scripted_effect game_rule_1021_process_endings_guts_effect = {
	# Damage the armies.
	scope:army = {
		location = {
			every_army_in_location = {
				if = {
					limit = { army_owner = scope:winner }
					deplete_army_by_percentage = 0.5
				}
				else_if = {
					limit = { army_owner = scope:loser }
					deplete_army_by_percentage = 0.95
				}
			}
			# Register our first battle.
			if = {
				limit = {
					NOT = { exists = global_var:conquest_first_battle }
				}
				scope:winner = {
					trigger_event = {
						id = game_rule.1022
						delayed = yes
					}
				}
			}
		}
	}
	# End the war.
	end_war = $WINNER$
	# Pretend that we're gonna kill our losers, as we can't _actually_ kill them here due to the war just invalidating (and don't want to kill them beforehand or title transfer'll happen and screw a bunch of stuff).
	show_as_tooltip = {
		every_in_list = {
			list = kill_list
			death = {
				death_reason = death_battle
				killer = scope:winner
			}
		}
	}
}

scripted_effect game_rule_1021_process_endings_effect = {
	scope:char_1 = {
		random_character_war = {
			limit = { using_cb = $CB$ }
			# Register our scopes.
			primary_$WINNER$ = { save_scope_as = winner }
			primary_$LOSER$ = { save_scope_as = loser }
			save_scope_as = war
			scope:new_location = {
				every_army_in_location = {
					if = {
						limit = { army_owner = scope:loser }
						# Note our commanders for execution after the war's over.
						involved_combat_side = {
							every_side_commander = { add_to_list = kill_list }
						}
					}
				}
			}
			# Trigger the events after we've sorted our scopes so that we can use them there too.
			scope:loser = { trigger_event = $LOSER_EVENT$ }
			scope:winner = { trigger_event = $WINNER_EVENT$ }
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = $WINNER$ }
			}
		}
	}
	# Now we can kill scope:loser — if appropriate.
	scope:winner = {
		every_in_list = {
			list = kill_list
			death = {
				death_reason = death_battle
				killer = scope:winner
			}
		}
	}
}

#	Figure out whether we should fire a conclusion event during the Conquest.
game_rule.1021 = {
	hidden = yes

	trigger = {
		exists = global_var:deterministic_conquest_of_england_1066
		NAND = {
			exists = global_var:norwegian_invasion_cb_concluded
			exists = global_var:norman_conquest_cb_concluded
		}
		OR = {
			has_game_rule = historicity_norman_conquest_determined_harold
			has_game_rule = historicity_norman_conquest_determined_harald
			game_rule_rig_norman_conquest_for_hereward_trigger = yes
			has_game_rule = historicity_norman_conquest_determined_edgar
			has_game_rule = historicity_norman_conquest_determined_margaret
			has_game_rule = historicity_norman_conquest_determined_aelfwine
			has_game_rule = historicity_norman_conquest_determined_svend
			has_game_rule = historicity_norman_conquest_determined_cadoc
		}
		any_character_war = {
			OR = {
				using_cb = norman_conquest_cb
				using_cb = norwegian_invasion_cb
			}
		}
	}

	immediate = {
		# We do this in the immediate because uhhh... it was _not_ liking being in the trigger for some reason.
		scope:army.involved_combat_side ?= {
			side_primary_participant = { save_scope_as = char_1 }
			enemy_side.side_primary_participant = {
				if = {
					limit = {
						any_character_war = {
							OR = {
								using_cb = norman_conquest_cb
								using_cb = norwegian_invasion_cb
							}
						}
					}
					save_scope_as = char_2
				}
			}
		}
		if = {
			limit = {
				exists = scope:char_1
				exists = scope:char_2
			}
			# Double check what narrative we'd use.
			scope:new_location = {
				# Historical settings.
				## Stamford Bridge.
				if = {
					limit = { this = province:1588 }
					save_scope_value_as = {
						name = locale
						value = flag:stamford_bridge
					}
				}
				## Hastings.
				else_if = {
					limit = { this = province:1509 }
					save_scope_value_as = {
						name = locale
						value = flag:hastings
					}
				}
				# Likely mechanical spots.
				## Dover.
				else_if = {
					limit = { this = province:1502 }
					save_scope_value_as = {
						name = locale
						value = flag:dover
					}
				}
				## Isle of Wight.
				else_if = {
					limit = { this = province:1549 }
					save_scope_value_as = {
						name = locale
						value = flag:isle_of_wight
					}
				}
				# Cities/places of interest by priority order.
				## Forest of Dean.
				### Yes, this belongs at the top.
				else_if = {
					limit = { this = province:1580 }
					save_scope_value_as = {
						name = locale
						value = flag:forest_of_dean
					}
				}
				## London.
				else_if = {
					limit = { this = province:1527 }
					save_scope_value_as = {
						name = locale
						value = flag:london
					}
				}
				## Winchester.
				else_if = {
					limit = { this = province:1544 }
					save_scope_value_as = {
						name = locale
						value = flag:winchester
					}
				}
				## York.
				else_if = {
					limit = { this = province:1595 }
					save_scope_value_as = {
						name = locale
						value = flag:york
					}
				}
				## Lincoln.
				else_if = {
					limit = { this = province:1583 }
					save_scope_value_as = {
						name = locale
						value = flag:lincoln
					}
				}
				## Oxford.
				else_if = {
					limit = { this = province:1558 }
					save_scope_value_as = {
						name = locale
						value = flag:oxford
					}
				}
				## Cirencester.
				else_if = {
					limit = { this = province:1582 }
					save_scope_value_as = {
						name = locale
						value = flag:cirencester
					}
				}
				## Guildford.
				else_if = {
					limit = { this = province:1511 }
					save_scope_value_as = {
						name = locale
						value = flag:guildford
					}
				}
				## Lindisfarne.
				else_if = {
					limit = { this = province:1610 }
					save_scope_value_as = {
						name = locale
						value = flag:lindisfarne
					}
				}
				## Land's End.
				else_if = {
					limit = { this = province:1575 }
					save_scope_value_as = {
						name = locale
						value = flag:lands_end
					}
				}
				## Stonehenge. Because you're a memelord.
				else_if = {
					limit = { this = province:1561 }
					save_scope_value_as = {
						name = locale
						value = flag:stonehenge
					}
				}
				## Southwark.
				else_if = {
					limit = { this = province:1526 }
					save_scope_value_as = {
						name = locale
						value = flag:southwark
					}
				}
				# Places outside England.
				## Scotland.
				else_if = {
					limit = {
						county = {
							any_this_title_or_de_jure_above = { this = title:k_scotland }
						}
					}
					save_scope_value_as = {
						name = locale
						value = flag:scotland
					}
				}
				## Wales.
				else_if = {
					limit = {
						county = {
							any_this_title_or_de_jure_above = { this = title:k_wales }
						}
					}
					save_scope_value_as = {
						name = locale
						value = flag:wales
					}
				}
				## Norway.
				else_if = {
					limit = {
						county = {
							any_this_title_or_de_jure_above = { this = title:k_norway }
						}
					}
					save_scope_value_as = {
						name = locale
						value = flag:norway
					}
				}
				## Normandy.
				else_if = {
					limit = {
						county = {
							any_this_title_or_de_jure_above = { this = title:d_normandy }
						}
					}
					save_scope_value_as = {
						name = locale
						value = flag:normandy
					}
				}
				## France.
				else_if = {
					limit = {
						county = {
							any_this_title_or_de_jure_above = { this = title:k_france }
						}
					}
					save_scope_value_as = {
						name = locale
						value = flag:france
					}
				}
				# Generic terrain/situations.
				## Riverside.
				else_if = {
					limit = { is_riverside_province = yes }
					save_scope_value_as = {
						name = locale
						value = flag:riverside
					}
				}
				## Coastal.
				else_if = {
					limit = { is_coastal = yes }
					save_scope_value_as = {
						name = locale
						value = flag:coastal
					}
				}
				## Forest.
				else_if = {
					limit = { terrain = forest }
					save_scope_value_as = {
						name = locale
						value = flag:forest
					}
				}
				## Plains.
				else_if = {
					limit = { terrain = plains }
					save_scope_value_as = {
						name = locale
						value = flag:plains
					}
				}
				## Farmlands.
				else_if = {
					limit = { terrain = farmlands }
					save_scope_value_as = {
						name = locale
						value = flag:farmlands
					}
				}
				## Wetlands.
				else_if = {
					limit = { terrain = wetlands }
					save_scope_value_as = {
						name = locale
						value = flag:wetlands
					}
				}
				## Hills.
				else_if = {
					limit = { terrain = hills }
					save_scope_value_as = {
						name = locale
						value = flag:hills
					}
				}
				# Fallback.
				else = {
					save_scope_value_as = {
						name = locale
						value = flag:fallback
					}
				}
			}
			# Now fire our actual events.
			if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_harold }
				# Harold beats Harald.
				trigger_event = game_rule.1031
				# Harold beats William.
				trigger_event = game_rule.1032
			}
			else_if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_harald }
				# Harold beats William.
				trigger_event = game_rule.1032
				# Harald beats Harold.
				trigger_event = game_rule.1041
				# Harald beats William.
				trigger_event = game_rule.1042
			}
			else_if = {
				limit = { game_rule_rig_norman_conquest_for_hereward_trigger = yes }
				# Harold beats Harald.
				trigger_event = game_rule.1031
				# William beats Harold.
				trigger_event = game_rule.1051
				# William beats Harald.
				trigger_event = game_rule.1052
			}
			else_if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_edgar }
				save_scope_value_as = {
					name = witengamot_choice
					value = flag:edgar
				}
				# Harold beats Harald (but dies if last war).
				trigger_event = game_rule.1061
				# Harold beats William (but dies if last war).
				trigger_event = game_rule.1062
			}
			else_if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_margaret }
				save_scope_value_as = {
					name = witengamot_choice
					value = flag:margaret
				}
				# Harold beats Harald (but dies if last war).
				trigger_event = game_rule.1061
				# Harold beats William (but dies if last war).
				trigger_event = game_rule.1062
			}
			else_if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_aelfwine }
				save_scope_value_as = {
					name = witengamot_choice
					value = flag:aelfwine
				}
				# Harold beats Harald (but dies if last war).
				trigger_event = game_rule.1061
				# Harold beats William (but dies if last war).
				trigger_event = game_rule.1062
			}
			else_if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_svend }
				save_scope_value_as = {
					name = witengamot_choice
					value = flag:svend
				}
				# Harold beats Harald (but dies if last war).
				trigger_event = game_rule.1061
				# Harold beats William (but dies if last war).
				trigger_event = game_rule.1062
			}
			else_if = {
				limit = { has_game_rule = historicity_norman_conquest_determined_cadoc }
				save_scope_value_as = {
					name = witengamot_choice
					value = flag:cadoc
				}
				# Harold beats Harald (but dies if last war).
				trigger_event = game_rule.1061
				# Harold beats William (but dies if last war).
				trigger_event = game_rule.1062
			}
		}
	}
}

#	Launder our battle registration so that we don't call the first battle of X "the Second Battle of X".
game_rule.1022 = {
	hidden = yes

	immediate = {
		set_global_variable = {
			name = conquest_first_battle
			value = scope:new_location
		}
	}
}

scripted_trigger game_rule_1031_valid_participants_trigger = {
	scope:char_1 = {
		any_character_war = {
			using_cb = $CB$
			OR = {
				primary_defender = scope:char_1
				primary_defender = scope:char_2
			}
			OR = {
				primary_attacker = scope:char_1
				primary_attacker = scope:char_2
			}
		}
	}
}

# Harold beats Harald.
game_rule.1031 = {
	hidden = yes

	trigger = {
		game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb }
	}

	immediate = {
		game_rule_1021_process_endings_effect = {
			WINNER = defender
			LOSER = attacker
			WINNER_EVENT = game_rule.1101
			LOSER_EVENT = game_rule.1102
			CB = norwegian_invasion_cb
		}
	}
}
# Harold beats William.
game_rule.1032 = {
	hidden = yes

	trigger = {
		game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb }
	}

	immediate = {
		game_rule_1021_process_endings_effect = {
			WINNER = defender
			LOSER = attacker
			WINNER_EVENT = game_rule.1103
			LOSER_EVENT = game_rule.1104
			CB = norman_conquest_cb
		}
	}
}
# Harald beats Harold.
game_rule.1041 = {
	hidden = yes

	trigger = {
		game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb }
	}

	immediate = {
		game_rule_1021_process_endings_effect = {
			WINNER = attacker
			LOSER = defender
			WINNER_EVENT = game_rule.1111
			LOSER_EVENT = game_rule.1112
			CB = norwegian_invasion_cb
		}
	}
}
# Harald beats William.
game_rule.1042 = {
	hidden = yes

	trigger = {
		OR = {
			game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb }
			game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb }
		}
	}

	immediate = {
		# If we're not in the Norwegian invasion at all, then that means that Harald is king.
		if = {
			limit = {
				NOR = {
					scope:char_1 = {
						any_character_war = { using_cb = norwegian_invasion_cb }
					}
					scope:char_2 = {
						any_character_war = { using_cb = norwegian_invasion_cb }
					}
				}
			}
			game_rule_1021_process_endings_effect = {
				WINNER = defender
				LOSER = attacker
				WINNER_EVENT = game_rule.1113
				LOSER_EVENT = game_rule.1114
				CB = norman_conquest_cb
			}
		}
		# Otherwise, it means William is king.
		else = {
			game_rule_1021_process_endings_effect = {
				WINNER = attacker
				LOSER = defender
				WINNER_EVENT = game_rule.1113
				LOSER_EVENT = game_rule.1114
				CB = norwegian_invasion_cb
			}
		}
	}
}
# William beats Harold.
game_rule.1051 = {
	hidden = yes

	trigger = {
		game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb }
	}

	immediate = {
		game_rule_1021_process_endings_effect = {
			WINNER = attacker
			LOSER = defender
			WINNER_EVENT = game_rule.1121
			LOSER_EVENT = game_rule.1122
			CB = norman_conquest_cb
		}
	}
}
# William beats Harald.
game_rule.1052 = {
	hidden = yes

	trigger = {
		OR = {
			game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb }
			game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb }
		}
	}

	immediate = {
		# If we're not in the Norman invasion at all, then that means that William is king.
		if = {
			limit = {
				NOR = {
					scope:char_1 = {
						any_character_war = { using_cb = norman_conquest_cb }
					}
					scope:char_2 = {
						any_character_war = { using_cb = norman_conquest_cb }
					}
				}
			}
			game_rule_1021_process_endings_effect = {
				WINNER = defender
				LOSER = attacker
				WINNER_EVENT = game_rule.1123
				LOSER_EVENT = game_rule.1124
				CB = norwegian_invasion_cb
			}
		}
		# Otherwise, it means Harald is king.
		else = {
			game_rule_1021_process_endings_effect = {
				WINNER = attacker
				LOSER = defender
				WINNER_EVENT = game_rule.1123
				LOSER_EVENT = game_rule.1124
				CB = norman_conquest_cb
			}
		}
	}
}
# Harold beats Harald (but dies if last war).
game_rule.1061 = {
	hidden = yes

	trigger = {
		game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb }
	}

	immediate = {
		game_rule_1021_process_endings_effect = {
			WINNER = defender
			LOSER = attacker
			WINNER_EVENT = game_rule.1131
			LOSER_EVENT = game_rule.1132
			CB = norwegian_invasion_cb
		}
	}
}
# Harold beats William (but dies if last war).
game_rule.1062 = {
	hidden = yes

	trigger = {
		game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb }
	}

	immediate = {
		game_rule_1021_process_endings_effect = {
			WINNER = defender
			LOSER = attacker
			WINNER_EVENT = game_rule.1133
			LOSER_EVENT = game_rule.1134
			CB = norman_conquest_cb
		}
	}
}

##################################################
# England Wins the Conquest
# by Ewan Cowhig Croft
# 1101 - 1110
##################################################

scripted_effect game_rule_1101_register_presence_effect = {
	if = {
		limit = {
			location = scope:new_location
			is_commanding_army = yes
		}
		save_scope_value_as = {
			name = is_commanding
			value = yes
		}
	}
}

#	Harold beats Harald (winner pov).
game_rule.1101 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1101.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1101.desc.outro.present
				}
				desc = game_rule.1101.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1101.a

		add_prestige = 250

		# No stress, no AI.
	}
}

#	Harold beats Harald (loser pov).
game_rule.1102 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1102.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1102.desc.outro.alive
				}
				desc = game_rule.1102.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1102.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1102.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

#	Harold beats William (winner pov).
game_rule.1103 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1103.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1103.desc.outro.present
				}
				desc = game_rule.1103.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1103.a

		add_prestige = 250

		# No stress, no AI.
	}
}

#	Harold beats William (loser pov).
game_rule.1104 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1104.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1104.desc.outro.alive
				}
				desc = game_rule.1104.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1104.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1104.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

##################################################
# Norway Wins the Conquest
# by Ewan Cowhig Croft
# 1111 - 1120
##################################################

#	Harald beats Harold (winner pov).
game_rule.1111 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1111.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1111.desc.outro.present
				}
				desc = game_rule.1111.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = attacker }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1111.a

		add_prestige = 250

		# No stress, no AI.
	}
}

#	Harald beats Harold (loser pov).
game_rule.1112 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1112.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1112.desc.outro.alive
				}
				desc = game_rule.1112.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = attacker }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1112.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1112.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

scripted_effect game_rule_1113_harald_beats_william_tooltip_effect = {
	# Illustrate our ending (applied in the effect that triggers this event).
	scope:war = {
		# Either Harald has England and is defending...
		if = {
			limit = {
				scope:winner = { has_title = title:k_england }
			}
			game_rule_1021_process_endings_guts_effect = { WINNER = defender }
		}
		# ... or he doesn't and is attacking.
		else = {
			game_rule_1021_process_endings_guts_effect = { WINNER = attacker }
		}
	}
}

#	Harald beats William (winner pov).
game_rule.1113 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1113.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1113.desc.outro.present
				}
				desc = game_rule.1113.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = { game_rule_1113_harald_beats_william_tooltip_effect = yes }
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1113.a

		add_prestige = 250

		# No stress, no AI.
	}
}

#	Harald beats William (loser pov).
game_rule.1114 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1114.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1114.desc.outro.alive
				}
				desc = game_rule.1114.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = { game_rule_1113_harald_beats_william_tooltip_effect = yes }
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1114.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1114.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

##################################################
# Normandy Wins the Conquest
# by Ewan Cowhig Croft
# 1121 - 1130
##################################################

#	William beats Harold (winner pov).
game_rule.1121 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1121.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1121.desc.outro.present
				}
				desc = game_rule.1121.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = attacker }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1121.a

		add_prestige = 250

		# No stress, no AI.
	}
}

#	William beats Harold (loser pov).
game_rule.1122 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1122.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1122.desc.outro.alive
				}
				desc = game_rule.1122.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = attacker }
			}
		}
		game_rule_1101_register_presence_effect = yes
		# If Harold is dead by this point, take one of his eyes.
		if = {
			limit = {
				scope:loser = { is_in_list = kill_list }
			}
			add_trait = one_eyed
		}
	}

	option = {
		name = game_rule.1122.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1122.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

scripted_effect game_rule_1123_william_beats_harald_tooltip_effect = {
	# Illustrate our ending (applied in the effect that triggers this event).
	scope:war = {
		# Either William has England and is defending...
		if = {
			limit = {
				scope:winner = { has_title = title:k_england }
			}
			game_rule_1021_process_endings_guts_effect = { WINNER = defender }
		}
		# ... or he doesn't and is attacking.
		else = {
			game_rule_1021_process_endings_guts_effect = { WINNER = attacker }
		}
	}
}

#	William beats Harald (winner pov).
game_rule.1123 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1123.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1123.desc.outro.present
				}
				desc = game_rule.1123.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = { game_rule_1123_william_beats_harald_tooltip_effect = yes }
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1123.a

		add_prestige = 250

		# No stress, no AI.
	}
}

#	William beats Harald (loser pov).
game_rule.1124 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1124.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1124.desc.outro.alive
				}
				desc = game_rule.1124.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = { game_rule_1123_william_beats_harald_tooltip_effect = yes }
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1124.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1124.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

##################################################
# Niche Candidate Wins the Conquest
# by Ewan Cowhig Croft
# 1131 - 1150
##################################################

scripted_effect game_rule_1131_usurp_england_effect = {
	create_title_and_vassal_change = {
		type = usurped
		save_scope_as = change
	}
	# Compile our lists.
	title:k_england = {
		add_to_list = titles_to_transfer
		every_dejure_vassal_title_holder = {
			limit = {
				liege = title:k_england.holder
				this != scope:elect
			}
			add_to_list = vassals_to_transfer
		}
		title:c_middlesex = {
			if = {
				limit = { holder.top_liege = title:k_england.holder }
				add_to_list = titles_to_transfer
			}
		}
	}
	# Transfer titles.
	every_in_list = {
		list = titles_to_transfer
		change_title_holder = {
			holder = scope:elect
			change = scope:change
		}
	}
	# Transfer vassals.
	every_in_list = {
		list = vassals_to_transfer
		change_liege = {
			liege = scope:elect
			change = scope:change
		}
		# Plus, stabilise the realm by making everyone calm down after the chaos of the abortive conquest.
		hidden_effect = {
			if = {
				limit = {
					NOR = {
						this = scope:jiltee
						is_close_family_of = scope:jiltee
						is_consort_of = scope:jiltee
					}
				}
				add_opinion = {
					target = scope:elect
					modifier = relieved_opinion
					opinion = 50
				}
			}
		}
	}
	resolve_title_and_vassal_change = scope:change
}

scripted_effect game_rule_1131_rig_english_election_effect = {
	# First, we're gonna want a holding title for our history.
	hidden_effect = {
		create_dynamic_title = {
			tier = kingdom
			name = k_england
			adj = k_england_adj
		}
		scope:new_title = {
			copy_title_history = title:k_england
			set_coa = k_england
		}
	}
	# Right, now kill our incumbent k_england.holder.
	## On the battlefield if we can.
	if = {
		limit = { scope:army.army_commander = scope:winner }
		death = { death_reason = death_battle }
		# Plus easily register how for loc.
		save_scope_value_as = {
			name = death_locale
			value = flag:battlefield
		}
	}
	## Elsewise, off it.
	else = {
		death = { death_reason = death_heart_attack }
		# Plus easily register how for loc.
		save_scope_value_as = {
			name = death_locale
			value = flag:home
		}
	}
	# Now we need to rig the election appropriately.
	## First, select our lucky winner.
	switch = {
		trigger = scope:witengamot_choice
		flag:margaret = {
			character:113 = { save_scope_as = elect }
		}
		flag:edgar = {
			character:112 = { save_scope_as = elect }
		}
		flag:svend = {
			character:101515 = { save_scope_as = elect }
		}
		flag:aelfwine = {
			character:161260 = { save_scope_as = elect }
		}
		flag:cadoc = {
			character:161281 = { save_scope_as = elect }
		}
	}
	## Then save our loser (mostly for convenience).
	title:k_england.holder = { save_scope_as = jiltee }
	## And fire off our concluding events — if it'd make sense.
	if = {
		limit = {
			scope:elect = {
				NOT = { is_in_list = kill_list }
			}
			scope:elect != scope:jiltee
		}
		# Quietly erase our incumbent from the holders roll.
		hidden_effect = {
			title:k_england = { copy_title_history = scope:new_title }
		}
		# We launder this by a day because otherwise inheritance gets... finnicky.
		scope:elect = {
			trigger_event = {
				id = game_rule.1143
				days = 1
			}
		}
	}
}

#	Harold beats Harald (but dies if last war) (winner pov).
game_rule.1131 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1101.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						exists = scope:is_commanding
						NOT = { exists = scope:other_war_remains }
					}
					desc = game_rule.1131.desc.conquest_finished.die_battlefield
				}
				triggered_desc = {
					trigger = {
						NOT = { exists = scope:other_war_remains }
					}
					desc = game_rule.1131.desc.conquest_finished.die_home
				}
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1101.desc.outro.present
				}
				desc = game_rule.1101.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
		# If no opposing side war, then we're gonna launch into our council sequence.
		if = {
			limit = {
				NOT = {
					any_character_war = { using_cb = norman_conquest_cb }
				}
			}
			game_rule_1131_rig_english_election_effect = yes
		}
		else = {
			save_scope_value_as = {
				name = other_war_remains
				value = yes
			}
		}
	}

	option = {
		name = game_rule.1131.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		# No stress, no AI.
	}

	option = {
		name = game_rule.1131.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

#	Harold beats Harald (but dies if last war) (loser pov).
game_rule.1132 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1102.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1102.desc.outro.alive
				}
				desc = game_rule.1102.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1132.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1132.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

#	Harold beats William (but dies if last war) (winner pov).
game_rule.1133 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1103.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						exists = scope:is_commanding
						NOT = { exists = scope:other_war_remains }
					}
					desc = game_rule.1133.desc.conquest_finished.die_battlefield
				}
				triggered_desc = {
					trigger = {
						NOT = { exists = scope:other_war_remains }
					}
					desc = game_rule.1133.desc.conquest_finished.die_home
				}
				triggered_desc = {
					trigger = { exists = scope:is_commanding }
					desc = game_rule.1103.desc.outro.present
				}
				desc = game_rule.1103.desc.outro.absent
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	right_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
		# If no opposing side war, then we're gonna launch into our council sequence.
		if = {
			limit = {
				NOT = {
					any_character_war = { using_cb = norwegian_invasion_cb }
				}
			}
			game_rule_1131_rig_english_election_effect = yes
		}
		else = {
			save_scope_value_as = {
				name = other_war_remains
				value = yes
			}
		}
	}

	option = {
		name = game_rule.1133.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		# No stress, no AI.
	}

	option = {
		name = game_rule.1133.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

#	Harold beats William (but dies if last war) (loser pov).
game_rule.1134 = {
	type = character_event
	title = {
		# Is this the first or second notable battle here?
		first_valid = {
			triggered_desc = {
				trigger = { global_var:conquest_first_battle ?= scope:new_location }
				desc = game_rule.1101.t.boilerplate.battle_2
			}
			desc = game_rule.1101.t.boilerplate.battle_1
		}
		# Now, what do we call the location?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.t.boilerplate.location.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.t.boilerplate.location.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.t.boilerplate.location.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.t.boilerplate.location.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.t.boilerplate.location.stonehenge
			}
			# Whatever the province is called.
			desc = game_rule.1101.t.boilerplate.location.fallback
		}
	}
	desc = {
		# Who's fighting who?
		desc = game_rule.1104.desc.opposing_army
		# Where are we clashing?
		first_valid = {
			triggered_desc = {
				trigger = { scope:locale = flag:stamford_bridge }
				desc = game_rule.1101.desc.stamford_bridge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hastings }
				desc = game_rule.1101.desc.hastings
			}
			triggered_desc = {
				trigger = { scope:locale = flag:dover }
				desc = game_rule.1101.desc.dover
			}
			triggered_desc = {
				trigger = { scope:locale = flag:isle_of_wight }
				desc = game_rule.1101.desc.isle_of_wight
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest_of_dean }
				desc = game_rule.1101.desc.forest_of_dean
			}
			triggered_desc = {
				trigger = { scope:locale = flag:london }
				desc = game_rule.1101.desc.london
			}
			triggered_desc = {
				trigger = { scope:locale = flag:winchester }
				desc = game_rule.1101.desc.winchester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:york }
				desc = game_rule.1101.desc.york
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lincoln }
				desc = game_rule.1101.desc.lincoln
			}
			triggered_desc = {
				trigger = { scope:locale = flag:oxford }
				desc = game_rule.1101.desc.oxford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:cirencester }
				desc = game_rule.1101.desc.cirencester
			}
			triggered_desc = {
				trigger = { scope:locale = flag:guildford }
				desc = game_rule.1101.desc.guildford
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lindisfarne }
				desc = game_rule.1101.desc.lindisfarne
			}
			triggered_desc = {
				trigger = { scope:locale = flag:lands_end }
				desc = game_rule.1101.desc.lands_end
			}
			triggered_desc = {
				trigger = { scope:locale = flag:stonehenge }
				desc = game_rule.1101.desc.stonehenge
			}
			triggered_desc = {
				trigger = { scope:locale = flag:southwark }
				desc = game_rule.1101.desc.southwark
			}
			triggered_desc = {
				trigger = { scope:locale = flag:scotland }
				desc = game_rule.1101.desc.scotland
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wales }
				desc = game_rule.1101.desc.wales
			}
			triggered_desc = {
				trigger = { scope:locale = flag:norway }
				desc = game_rule.1101.desc.norway
			}
			triggered_desc = {
				trigger = { scope:locale = flag:normandy }
				desc = game_rule.1101.desc.normandy
			}
			triggered_desc = {
				trigger = { scope:locale = flag:france }
				desc = game_rule.1101.desc.france
			}
			triggered_desc = {
				trigger = { scope:locale = flag:riverside }
				desc = game_rule.1101.desc.riverside
			}
			triggered_desc = {
				trigger = { scope:locale = flag:coastal }
				desc = game_rule.1101.desc.coastal
			}
			triggered_desc = {
				trigger = { scope:locale = flag:forest }
				desc = game_rule.1101.desc.forest
			}
			triggered_desc = {
				trigger = { scope:locale = flag:plains }
				desc = game_rule.1101.desc.plains
			}
			triggered_desc = {
				trigger = { scope:locale = flag:farmlands }
				desc = game_rule.1101.desc.farmlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:wetlands }
				desc = game_rule.1101.desc.wetlands
			}
			triggered_desc = {
				trigger = { scope:locale = flag:hills }
				desc = game_rule.1101.desc.hills
			}
			triggered_desc = {
				trigger = { scope:locale = flag:fallback }
				desc = game_rule.1101.desc.fallback
			}
		}
		# Are we there in person?
		first_valid = {
			triggered_desc = {
				trigger = { exists = scope:is_commanding }
				desc = {
					desc = game_rule.1101.desc.combat.commander
					desc = double_line_break
					first_valid = {
						triggered_desc = {
							trigger = {
								scope:locale = flag:stamford_bridge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stamford_bridge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:hastings
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.hastings
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:dover
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.dover
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:isle_of_wight
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.isle_of_wight
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:forest_of_dean
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.forest_of_dean
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:london
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.london
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:cirencester
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.cirencester
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:guildford
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.guildford
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lindisfarne
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lindisfarne
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:lands_end
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.lands_end
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:stonehenge
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.stonehenge
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:southwark
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.southwark
						}
						triggered_desc = {
							trigger = {
								scope:locale = flag:riverside
								NOT = { global_var:conquest_first_battle ?= scope:new_location }
							}
							desc = game_rule.1101.desc.combat.locale.riverside
						}
						desc = {
							random_valid = {
								desc = game_rule.1101.desc.combat.random.present.1
								desc = game_rule.1101.desc.combat.random.present.2
								desc = game_rule.1101.desc.combat.random.present.3
							}
						}
					}
				}
			}
			desc = {
				desc = game_rule.1101.desc.combat.not_present
				desc = double_line_break
				desc = {
					random_valid = {
						desc = game_rule.1101.desc.combat.random.absent.1
						desc = game_rule.1101.desc.combat.random.absent.2
						desc = game_rule.1101.desc.combat.random.absent.3
					}
				}
			}
		}
		# Finish up.
		desc = double_line_break
		desc = {
			first_valid = {
				triggered_desc = {
					trigger = {
						scope:loser = {
							NOT = { is_in_list = kill_list }
						}
					}
					desc = game_rule.1104.desc.outro.alive
				}
				desc = game_rule.1104.desc.outro.dead
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:loser
		triggered_animation = {
			trigger = {
				scope:loser = {
					NOT = { is_in_list = kill_list }
				}
			}
			animation = random_weapon_yield
		}
		triggered_animation = {
			trigger = {
				scope:loser = { is_in_list = kill_list }
			}
			animation = map_fear
		}
	}
	right_portrait = {
		character = scope:winner
		scripted_animation = duel_celebrate
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = {
			scope:war = {
				game_rule_1021_process_endings_guts_effect = { WINNER = defender }
			}
		}
		game_rule_1101_register_presence_effect = yes
	}

	option = {
		name = game_rule.1134.a
		trigger = {
			scope:loser = {
				NOT = { is_in_list = kill_list }
			}
		}

		add_prestige = -250

		# No stress, no AI.
	}

	option = {
		name = game_rule.1134.b
		trigger = {
			scope:loser = { is_in_list = kill_list }
		}

		# No stress, no AI.
	}
}

#	Elect receives England.
game_rule.1141 = {
	type = character_event
	title = game_rule.1141.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:death_locale = flag:battlefield }
				desc = game_rule.1141.intro.battlefield
			}
			triggered_desc = {
				trigger = { scope:death_locale = flag:home }
				desc = game_rule.1141.intro.home
			}
		}
		first_valid = {
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:margaret }
				desc = game_rule.1141.choice.margaret
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:edgar }
				desc = game_rule.1141.choice.edgar
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:svend }
				desc = game_rule.1141.choice.svend
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:aelfwine }
				desc = game_rule.1141.choice.aelfwine
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:cadoc }
				desc = game_rule.1141.choice.cadoc
			}
		}
	}
	theme = war
	left_portrait = {
		character = scope:elect
		triggered_animation = {
			trigger = { this = character:161260 }
			animation = stress
		}
		triggered_animation = {
			trigger = { this = character:101515 }
			animation = personality_bold
		}
		animation = shock
	}
	right_portrait = {
		character = scope:jiltee
		animation = rage
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = { game_rule_1131_usurp_england_effect = yes }
	}

	option = {
		name = {
			text = {
				first_valid = {
					triggered_desc = {
						trigger = { scope:witengamot_choice = flag:margaret }
						desc = game_rule.1141.a.margaret
					}
					triggered_desc = {
						trigger = { scope:witengamot_choice = flag:edgar }
						desc = game_rule.1141.a.edgar
					}
					triggered_desc = {
						trigger = { scope:witengamot_choice = flag:svend }
						desc = game_rule.1141.a.svend
					}
					triggered_desc = {
						trigger = { scope:witengamot_choice = flag:aelfwine }
						desc = game_rule.1141.a.aelfwine
					}
					triggered_desc = {
						trigger = { scope:witengamot_choice = flag:cadoc }
						desc = game_rule.1141.a.cadoc
					}
				}
			}
		}

		add_prestige = 500

		# No stress, no AI.
	}
}

#	Jiltee is told of how things suck for them.
game_rule.1142 = {
	type = character_event
	title = game_rule.1142.t
	desc = {
		first_valid = {
			triggered_desc = {
				trigger = { scope:death_locale = flag:battlefield }
				desc = game_rule.1142.intro.battlefield
			}
			triggered_desc = {
				trigger = { scope:death_locale = flag:home }
				desc = game_rule.1142.intro.home
			}
		}
		desc = game_rule.1142.choice.preamble
		first_valid = {
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:margaret }
				desc = game_rule.1142.choice.margaret
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:edgar }
				desc = game_rule.1142.choice.edgar
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:svend }
				desc = game_rule.1142.choice.svend
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:aelfwine }
				desc = game_rule.1142.choice.aelfwine
			}
			triggered_desc = {
				trigger = { scope:witengamot_choice = flag:cadoc }
				desc = game_rule.1142.choice.cadoc
			}
		}
		desc = game_rule.1142.outro
	}
	theme = war
	left_portrait = {
		character = scope:jiltee
		animation = rage
	}
	right_portrait = {
		character = scope:elect
		triggered_animation = {
			trigger = { this = character:161260 }
			animation = stress
		}
		triggered_animation = {
			trigger = { this = character:101515 }
			animation = personality_bold
		}
		animation = shock
	}
	override_background = { reference = battlefield }

	immediate = {
		# Illustrate our ending (applied in the effect that triggers this event).
		show_as_tooltip = { game_rule_1131_usurp_england_effect = yes }
		add_prestige = -250
	}

	# Outrage.
	option = {
		name = game_rule.1142.a

		add_opinion = {
			target = scope:elect
			modifier = usurped_title
			opinion = -75
		}
		if = {
			limit = {
				can_set_relation_rival_trigger = { CHARACTER = scope:elect }
			}
			set_relation_rival = {
				target = scope:elect
				reason = rival_usurper
			}
		}
		reverse_add_opinion = {
			target = scope:elect
			modifier = respect_opinion
			opinion = -50
		}

		# No stress, no AI.
	}

	# Let things be.
	option = {
		name = game_rule.1142.b
		trigger = { is_ai = no }
		
		reverse_add_opinion = {
			target = scope:elect
			modifier = grateful_opinion
			opinion = 50
		}
		if = {
			limit = {
				can_set_relation_potential_friend_trigger = { CHARACTER = scope:elect }
			}
			set_relation_potential_friend = scope:elect
		}

		# No stress, no AI.
	}

	# Warg into them.
	option = {
		name = game_rule.1142.c
		trigger = {
			is_ai = no
			scope:elect = { is_ai = yes }
		}
		
		set_player_character = scope:elect
		trigger_event = {
			id = game_rule.1143
			days = 1
		}

		# No stress, no AI.
	}
}

#	Delayed election rigging.
game_rule.1143 = {
	hidden = yes

	immediate = {
		scope:elect = { trigger_event = game_rule.1141 }
		scope:jiltee = { trigger_event = game_rule.1142 }
		hidden_effect = { game_rule_1131_usurp_england_effect = yes }
	}
}

##################################################
# Teleport Conquest Armies
# by Ewan Cowhig Croft
# 1151 - 1160
##################################################

scripted_trigger game_rule_1151_war_using_valid_cb_trigger = {
	any_character_war = {
		OR = {
			using_cb = norman_conquest_cb
			using_cb = norwegian_invasion_cb
		}
	}
}

scripted_trigger game_rule_1151_no_player_vision_on_wars_trigger = {
	any_player = {
		count = all
		NOR = {
			game_rule_1151_war_using_valid_cb_trigger = yes
			any_liege_or_above = { game_rule_1151_war_using_valid_cb_trigger = yes }
			any_war_enemy = { game_rule_1151_war_using_valid_cb_trigger = yes }
			domicile ?= {
				domicile_location.county ?= {
					holder = {
						OR = {
							game_rule_1151_war_using_valid_cb_trigger = yes
							any_liege_or_above = { game_rule_1151_war_using_valid_cb_trigger = yes }
						}
					}
				}
			}
			any_army = {
				location = {
					county ?= {
						holder = { game_rule_1151_war_using_valid_cb_trigger = yes }
					}
				}
			}
		}
	}
}

#	Stamford Bridge teleport.
game_rule.1151 = {
	hidden = yes
	scope = none

	trigger = {
		game_rule_1151_no_player_vision_on_wars_trigger = yes
		title:k_england.holder = {
			any_character_war = { using_cb = norwegian_invasion_cb }
		}
	}

	immediate = {
		title:k_england.holder = {
			save_scope_as = england
			random_character_war = {
				limit = { using_cb = norwegian_invasion_cb }
				primary_attacker = { save_scope_as = norway }
			}
		}
		scope:norway = {
			ordered_army = {
				order_by = army_size
				assign_commander = scope:norway
				set_army_location = province:1588
			}
		}
		scope:england = {
			ordered_army = {
				order_by = army_size
				assign_commander = scope:england
				set_army_location = province:1588
			}
		}
	}
}

#	Hastings teleport.
game_rule.1152 = {
	hidden = yes
	scope = none

	trigger = {
		game_rule_1151_no_player_vision_on_wars_trigger = yes
		title:k_england.holder = {
			any_character_war = { using_cb = norman_conquest_cb }
		}
	}

	immediate = {
		title:k_england.holder = {
			save_scope_as = england
			random_character_war = {
				limit = { using_cb = norman_conquest_cb }
				primary_attacker = { save_scope_as = normandy }
			}
		}
		scope:normandy = {
			ordered_army = {
				order_by = army_size
				assign_commander = scope:normandy
				set_army_location = province:1509
			}
		}
		scope:england = {
			ordered_army = {
				order_by = army_size
				assign_commander = scope:england
				set_army_location = province:1509
			}
		}
	}
}
