second_rebbelion_cb = {
    war_name = "WAR_SECOND_REBBELION" 
		
	is_valid = {
	   FROM = {
		      NOT = { has_landed_title=k_nostria }
	   }
	   ROOT = {
		    has_landed_title=d_nostria_scholae_palatinae
	   }
    }
	can_use = {
	    always = no
	}
	on_reverse_demand = { #Full Fail
		ROOT = { 
	     prestige = -1000
         cash=-400
	   }
	   hidden_tooltip = {
	   k_nostria = {
	      holder_scope = {
		    gain_title = d_nostrian_senate
			gain_title = b_praedium_romanum
			death = { death_reason = death_execution killer = k_england }
		  }
	   }
	   k_england = {
	      holder_scope = {
		    gain_title = k_nostria
			gain_title = d_nostria
			gain_title = c_nostria
			clr_character_flag = second_rebbelion_pacify
		  }
	   }
	   d_nostria:holder_scope = {
	      set_defacto_liege = k_england:holder_scope
	   }
	   activate_title = { status = no title = d_nostria_scholae_palatinae }
       d_nostria_scholae_palatinae = { destroy_landed_title = THIS }
	   }
	}
	on_fail = {
	    ROOT = { 
	     prestige = -1000
         cash=-400
	   }
	   hidden_tooltip = {
	   k_england = {
	      holder_scope = {
		    gain_title = k_nostria
			clr_character_flag = second_rebbelion_pacify
		  }
	   }
	   d_nostria:holder_scope = {
	      set_defacto_liege = k_england:holder_scope
	   }
	   activate_title = { status = no title = d_nostria_scholae_palatinae }
       d_nostria_scholae_palatinae = { destroy_landed_title = THIS }
	   }
	}
	on_success = {
	   ROOT = { 
	     prestige = 1000
         cash = 400
	   }
	   hidden_tooltip = {
	   k_nostria = {
	      holder_scope = {
		     gain_title=c_bordeaux
		  }
	   }
	   k_england = {
	      holder_scope = {
		     clr_character_flag = second_rebbelion_pacify
		  }
	   }
	   if = {
	    limit={ k_castille = { holder_scope = { is_allied_with = ROOT } } }
	   	k_castille={
		     holder_scope={
				gain_title=d_gascogne
			 }
		  }
		  c_albret:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_bearn:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_labourd:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_armagnac:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_agen:holder_scope = {
				set_defacto_liege = k_france:holder_scope
		  }
		  c_perigord:holder_scope = {
				set_defacto_liege = k_france:holder_scope
		  }
		  c_limousin:holder_scope = {
				set_defacto_liege = k_france:holder_scope
		  }
		}
	   }
	}
	ai_will_do = {
        factor = 0
    }	
}

gasco_lamb_cb = {
    war_name = "WAR_GASCONY_LAMBERT" 
		
	is_valid = {
	   FROM = {
		      NOT = { has_landed_title=k_nostria }
	   }
	   ROOT = {
		    has_landed_title=k_nostria 
	   }
    }
	can_use = {
		always = no
	}
	on_reverse_demand = { #Full Fail
	   ROOT = { 
	     prestige = -1000
         cash=-400
	   }
	   hidden_tooltip = {
	      k_england={
		     holder_scope={
			    gain_title=k_nostria
			 }
		  }
		  c_albret:holder_scope = {
				set_defacto_liege = k_england:holder_scope
		  }
		  c_bearn:holder_scope = {
				set_defacto_liege = k_england:holder_scope
		  }
		  activate_title = { status = no title = d_nostria_scholae_palatinae }
          d_nostria_scholae_palatinae = { destroy_landed_title = THIS }
	   }
	}
	on_fail = { #Neutral Ending
	   ROOT = { 
	     prestige = -500
         cash=-100
	   }
	   hidden_tooltip = {
	      k_england={
		     holder_scope={
			    gain_title=k_nostria
			 }
		  }
		  c_albret:holder_scope = {
				set_defacto_liege = k_england:holder_scope
		  }
		  c_bearn:holder_scope = {
				set_defacto_liege = k_england:holder_scope
		  }
		  activate_title = { status = no title = d_nostria_scholae_palatinae }
          d_nostria_scholae_palatinae = { destroy_landed_title = THIS }
	   }
	}
	on_success = { #Victory
	   ROOT = { 
	     prestige = 1500
         cash=500
	   }
	   hidden_tooltip = {
	      k_castille={
		     holder_scope={
			    gain_title=c_bordeaux
				gain_title=d_gascogne
				gain_title=d_aquitaine
			 }
		  }
		  c_labourd:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_armagnac:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_agen:holder_scope = {
				set_defacto_liege = k_castille:holder_scope
		  }
		  c_albret = {
		    holder_scope = {
				character_event = { id = gascony_reb_vic.1 }
			}
		  }
		  c_bearn = {
		    holder_scope = {
				character_event = { id = gascony_reb_vic.1 }
			}
		  }
	   }
	}
    ai_will_do = {
        factor = 0
    }	  
}

ioustinianos_iii_cb = {
        war_name = "WAR_NAME_IOUSTINIANOS_III" 
        is_valid = {
            ROOT = { dynasty=840000007 }
			c_90000423 = { is_alive = yes }
        }
	    can_use = {
		     always = no
	    }
		
        on_success = {
		  ROOT = {
		     cash=600
		     prestige=1500
		  }
		  hidden_tooltip = {
		    c_90000423 = { 
		       gain_title = e_byzantium
		       gain_title = d_thrace
		       gain_title = d_adrianopolis
		       gain_title = c_byzantion
		       gain_title = c_adrianopolis
		       gain_title = c_kaliopolis
		       gain_title = c_maroneia
		       gain_title = c_philippopolis
		       gain_title = c_thrake
		       gain_title = c_traianopolis
			   narrative_event = { id = nostrian_flavour.3 }
		    }
		  }
        }
        on_fail = {
            ROOT = {
                prestige = -250 
            }
			e_byzantium = {
			   holder_scope = {
			       prestige=250
			   }
			}
        }
		on_reverse_demand = {
		    ROOT = {
                prestige = -500
            } 
			e_byzantium = {
			   holder_scope = {
			       prestige=500
			   }
			}
			hidden_tooltip = {
			   e_byzantium = { 
			    holder_scope = {
			      prestige=500
				  narrative_event = { id = nostrian_flavour.5 }
				}
			   }
			}
		}
        ai_will_do = {
            factor = 0
        }
}

false_william_cb = {
        war_name = "WAR_NAME_BLACK_LION_GODWIN_ENG_INV" 
        is_valid = {
			c_90000765 = { is_alive = yes } #Pseudo-William
        }
	    can_use = {
		     always = no
	    }
		on_fail = { #Neutral
		  ROOT = {
		     cash=-100
			 prestige=-800
		  }
		  #Flags
		  clr_global_flag=france_support_fake_william
		  clr_global_flag=scotland_support_fake_william
		  ROOT = { clr_character_flag = has_war_for_william }
		}
		on_reverse_demand = { #Big Fail
		  ROOT = {
		     cash=-700
			 prestige=-2500
		  }
		   c_90000765 = { death = { death_reason = death_execution killer = k_england } }
		  #Flags
		  clr_global_flag=france_support_fake_william
		  clr_global_flag=scotland_support_fake_william
		  ROOT = { clr_character_flag = has_war_for_william }
		}
		on_success = { #Victory
		  ROOT = {
		     cash=1000
			 prestige=3500
		  }
		  c_90000765 = {
		     gain_title=k_england
			 gain_title=c_middlesex
			 narrative_event = { id = fake_william.8 }
		  }
		  if ={ #Scotland
		     limit={ global_flag = scotland_support_fake_william }
			 k_scotland = {
			   holder_scope={
			    gain_title=c_lindisfarne
				gain_title=c_northumberland
				gain_title=c_cumberland
			   }
			 }
		  } #End of Scotland
		  if = { #France
		      limit={ global_flag = france_support_fake_william }
			  k_france = {
			    holder_scope={
                    gain_title = d_normandy
                    gain_title = c_caen
                    gain_title = c_avranches
                    gain_title = c_arques
				}
			  }
		  } #End of France
		  #Benefits for Nostria (normal)
		  k_nostria = {
		    holder_scope={
		    gain_title=b_sandwich
			gain_title=b_axminster
			gain_title=b_bodmin
			gain_title=b_dorchester
			gain_title=b_southampton
			gain_title=b_lewes
			gain_title=b_london
			gain_title=b_bury
			gain_title=b_maldon
			gain_title=b_lynn
			gain_title=b_boston
			gain_title=b_wyke
			gain_title=c_scarborough
			gain_title=b_preston
			gain_title=b_macclesfield
			gain_title=b_ilchester
			gain_title=b_bristol
			gain_title=b_cirencester
		   }
		  }
		  if={ #Benefits Normandy
		     limit = { NOT = { global_flag = france_support_fake_william } }
			 k_nostria = {
			   holder_scope={
			    gain_title=b_avranches
				gain_title=b_bayeux
				gain_title=b_alencon
				gain_title=b_arques
				gain_title=b_forges
			   }
			 }
		  }
		  if={ #Benefits North England
		     limit = { NOT = { global_flag = scotland_support_fake_william } }
			 k_nostria = {
			   holder_scope={
			    gain_title=b_penrith
				gain_title=b_newcastle
				gain_title=b_norham
			   }
			 }
		  }
		  #Roman Company
		  activate_title = { status = no title = d_roman_company }
          d_roman_company = { destroy_landed_title = THIS }
		  #Another Roman Company Generals
		  if = { #Blacklion as Duke of Somerset
		     limit = { c_90000699 = { is_alive = yes} }
			 c_90000699 = {
		           gain_title = c_somerset
		           gain_title = c_bath
		           gain_title = d_somerset
			 }
			 c_90000699 = {
				set_defacto_liege = c_90000765
			 }
		  }
		  if = { #De Malley as Duke of Normandy (if France not)
		     limit = { c_90000699 = { is_alive = yes } NOT = { global_flag = france_support_fake_william } }
			 c_90000698 = {
		           gain_title = d_normandy
				   gain_title = c_caen
				   gain_title = c_avranches
				   gain_title = c_evreux
				   gain_title = c_arques
				   gain_title = c_eu
			 }
			 c_90000698 = {
				set_defacto_liege = c_90000765
			 }
		  }
		  if = { #De Malley as Duke of East Anglia (if France yes)
		     limit = { c_90000699 = { is_alive = yes } global_flag = france_support_fake_william }
			 c_90000698 = {
		           gain_title = c_norfolk
				   gain_title = c_suffolk
				   gain_title = c_essex
				   gain_title = c_lincoln
				   gain_title = c_northampton
				   gain_title = d_norfolk
			 }
			 c_90000698 = {
				set_defacto_liege = c_90000765
			 }
		  }
		  if = { #De Malley son as Duke of East Anglia (if France yes)
		     limit = { c_90000699 = { is_alive = no } c_90000793 = { is_alive = yes } global_flag = france_support_fake_william }
			 c_90000793 = {
		           gain_title = c_norfolk
				   gain_title = c_suffolk
				   gain_title = c_essex
				   gain_title = c_lincoln
				   gain_title = c_northampton
				   gain_title = d_norfolk
			 }
			 c_90000793 = {
				set_defacto_liege = c_90000765
			 }
		  }
		  if = { #De Malley son as Duke of Normandy (if France not)
		     limit = { c_90000699 = { is_alive = no } c_90000793 = { is_alive = yes } NOT = { global_flag = france_support_fake_william } }
			 c_90000793 = {
		           gain_title = d_normandy
				   gain_title = c_caen
				   gain_title = c_avranches
				   gain_title = c_evreux
				   gain_title = c_arques
				   gain_title = c_eu
			 }
			 c_90000793 = {
				set_defacto_liege = c_90000765
			 }
		  }
		  #Flags
		  clr_global_flag=france_support_fake_william
		  clr_global_flag=scotland_support_fake_william
		  ROOT = { clr_character_flag = has_war_for_william }
		}
}

black_lion_cb = {
        war_name = "WAR_NAME_BLACK_LION_GODWIN_ENG_INV" 
        is_valid = {
			OR = { #Harald Godwinsson sons
			   c_41002 = { is_alive = yes } #Harold
			   c_41003 = { is_alive = yes } #Ulf
			}
        }
	    can_use = {
		     always = no
	    }
		
    on_fail = {
            ROOT = {
                prestige = -1000 
            }
			k_england = {
			   holder_scope = {
			       prestige=1000
				   gain_title = c_somerset
			   }
			}
			hidden_tooltip = {
			  k_england = {
			    holder_scope = {
			     c_90000665 = {
				     imprison = PREV
				 }
				 c_41002 = {
				     imprison = PREV
				 }
				 c_41003 = {
				     imprison = PREV
				 }
				 gain_title = c_somerset
			    }
			   }
			   	activate_title = { status = no title = k_wilbert_julianus_host }
			   k_wilbert_julianus_host = { destroy_landed_title = THIS }
			   }
	}
    on_reverse_demand = {
            ROOT = {
                prestige = -1000 
            }
			k_england = {
			   holder_scope = {
			       prestige=1000
			   }
			}
			hidden_tooltip = {
			  k_england = {
			    holder_scope = {
			     c_90000665 = {
				     imprison = PREV
				 }
				 c_41002 = {
				     imprison = PREV
				 }
				 c_41003 = {
				     imprison = PREV
				 }
				 gain_title = c_somerset
			    }
			   }
			   	activate_title = { status = no title = k_wilbert_julianus_host }
			   k_wilbert_julianus_host = { destroy_landed_title = THIS }
			}
	}
	on_success = {
		  ROOT = {
		     cash=600
		     prestige=1500
		  }
		  hidden_tooltip = {
            if = {
				limit = {
					c_41002 = { is_alive = yes } #Harold
				}
                c_41002 = {
				    gain_title = k_england
                    gain_title = c_middlesex
					gain_title = c_norfolk
					gain_title = c_bedford
					gain_title = c_wiltshire
					gain_title = c_northumberland
					gain_title = c_cornwall
                }
			}
            if = {
				limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				}
                c_41003 = {
				    gain_title = k_england
                    gain_title = c_middlesex
					gain_title = c_norfolk
					gain_title = c_bedford
					gain_title = c_wiltshire
					gain_title = c_northumberland
					gain_title = c_cornwall
                }
			}
            if = {
				limit = {
					c_5646 = { is_alive = yes } 
				}
		        c_5646 = { #Estmond - Son of Eadwin, earl of Mercia
		          gain_title = c_lancaster
			      gain_title = c_derby
			      gain_title = c_lincoln
				  gain_title = d_lancaster
		        }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_5646 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_5646 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
            if = {
				limit = {
					c_90000692 = { is_alive = yes } 
				}
		        c_90000692 = { #Uhtred, Son of Morcar, earl of York
                   gain_title = c_york
                   gain_title = c_hull
                   gain_title = c_leeds
                   gain_title = c_yoredale
                   gain_title = d_york
		        }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000692 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000692 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
            if = {
				limit = {
					c_90000693 = { is_alive = yes } #Richard de Malley
				}
                c_90000693 = { #Richard de Malley
		          gain_title = c_wight
			      gain_title = c_dorset
			      gain_title = d_hampshire
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000693 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000693 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			if = {
				limit = {
					c_90000693 = { is_alive = no } #Richard de Malley
					c_90000696 = { is_alive = yes } #Robert de Malley
				}
                c_90000696 = {
		          gain_title = c_wight
			      gain_title = c_dorset
			      gain_title = d_hampshire
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000696 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000696 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			if = {
				limit = {
					c_90000693 = { is_alive = no } #Richard de Malley
					c_90000696 = { is_alive = no } #Robert de Malley
					c_90000697 = { is_alive = yes } #William de Malley
				}
                c_90000697 = { 
		          gain_title = c_wight
			      gain_title = c_dorset
			      gain_title = d_hampshire
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000697 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000697 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			if = {
				limit = {
					c_90000693 = { is_alive = no } #Richard de Malley
					c_90000696 = { is_alive = no } #Robert de Malley
					c_90000697 = { is_alive = no } #William de Malley
					c_90000698 = { is_alive = yes } #Gilbert de Malley
				}
                c_90000698 = { 
		          gain_title = c_wight
			      gain_title = c_dorset
			      gain_title = d_hampshire
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000698 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000698 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
            if = {
				limit = {
					c_90000688 = { is_alive = yes } #Heinrich One-Eyed
				}
                c_90000688 = { #Heinrich One-Eyed
		          gain_title = c_hereford
		          gain_title = c_lincolnd
		          gain_title = d_hereford
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000688 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000688 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			if = {
				limit = {
					c_90000688 = { is_alive = no } #Heinrich One-Eyed
					c_90000690 = { is_alive = yes } #Wilhelm Einauger
				}
                c_90000690 = { 
		          gain_title = c_hereford
		          gain_title = c_lincolnd
		          gain_title = d_hereford
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000690 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000690 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			if = {
				limit = {
					c_90000688 = { is_alive = no } #Heinrich One-Eyed
					c_90000690 = { is_alive = no } #Wilhelm Einauger
					c_90000691 = { is_alive = yes } #Wilhelm Einauger
				}
                c_90000691 = { 
		          gain_title = c_hereford
		          gain_title = c_lincolnd
		          gain_title = d_hereford
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_90000691 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_90000691 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			if = {
			   limit = {
			      c_90000665 = { is_alive = yes }
			   }
		       c_90000665 = { #Wilbert
		           gain_title = c_somerset
		           gain_title = c_bath
		           gain_title = d_somerset
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				   c_90000665 = {
				     set_defacto_liege = c_41002
				  }
			    }
				if = {
				limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				}
				c_90000665 = {
				     set_defacto_liege = c_41003
				}
			    }
			}
			if = {
			   limit = {
			      c_90000665 = { is_alive = no }
				  c_90000666 = { is_alive = yes }
			   }
		       c_90000666 = { 
		           gain_title = c_somerset
		           gain_title = c_bath
		           gain_title = d_somerset
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				   c_90000666 = {
				     set_defacto_liege = c_41002
				  }
			    }
				if = {
				limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				}
				c_90000666 = {
				     set_defacto_liege = c_41003
				}
			    }
			}
			if = {
			   limit = {
			      c_90000665 = { is_alive = no }
				  c_90000666 = { is_alive = no }
			   }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_41002 = {
		           gain_title = c_somerset
		           gain_title = c_bath
		           gain_title = d_somerset
				  }
			    }
				if = {
				limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				}
				  c_41003 = {
		           gain_title = c_somerset
		           gain_title = c_bath
		           gain_title = d_somerset
				  }
			    }
			}
			if = { #Kent - if Harald and Ulf lives
				limit = {
					c_41002 = { is_alive = yes } #Harold
					c_41003 = { is_alive = yes } #Ulf
				}
                c_41003 = { 
		          gain_title = c_kent
		          gain_title = c_sussex
				  gain_title = c_surrey
		          gain_title = d_canterbury
				  set_defacto_liege = c_41002
                }
			}
			if = { #Kent - if Harold and Ult dont live or one of them is dead
				limit = {
				    OR = {
					   c_41002 = { is_alive = no } #Harold
					   c_41003 = { is_alive = no } #Ulf
					}
				}
                c_171 = { 
		          gain_title = c_kent
		          gain_title = c_sussex
				  gain_title = c_surrey
		          gain_title = d_canterbury
                }
				if = {
				  limit = {
				     c_41002 = { is_alive = yes } #Harold
				  }
				  c_171 = {
				     set_defacto_liege = c_41002
				  }
				}
				if = {
				  limit = {
					c_41002 = { is_alive = no } #Harold
                    c_41003 = { is_alive = yes } #Ulf
				  }
				  c_171 = {
				     set_defacto_liege = c_41003
				  }
				}
			}
			d_roman_company = {
			   holder_scope = {
			      character_event = { id = nostrian_flavour.9 }
			   }
			}
			activate_title = { status = no title = d_roman_company }
			d_roman_company = { destroy_landed_title = THIS }
			activate_title = { status = no title = k_wilbert_julianus_host }
			k_wilbert_julianus_host = { destroy_landed_title = THIS }
            c_146 = {
               any_landed_title = {
                    holder = c_146
                    give_title_to = k_england
                }
            }
			c_winchester = {
			   holder_scope = {
			      if = {
				  	limit = {
					   c_90000693 = { is_alive = yes } #Richard de Malley
				    }
				     set_defacto_liege = c_90000693
				  }
				  if = {
				  	limit = {
						c_90000693 = { is_alive = no } #Richard de Malley
					    c_90000696 = { is_alive = yes } #Robert de Malley
				    }
				     set_defacto_liege = c_90000696
				  }
				  if = {
				  	limit = {
				      c_90000693 = { is_alive = no } #Richard de Malley
					  c_90000696 = { is_alive = no } #Robert de Malley
					  c_90000697 = { is_alive = yes } #William de Malley
				    }
				     set_defacto_liege = c_90000697
				  }
				  if = {
				  	limit = {
					  c_90000693 = { is_alive = no } #Richard de Malley
					  c_90000696 = { is_alive = no } #Robert de Malley
					  c_90000697 = { is_alive = no } #William de Malley
					  c_90000698 = { is_alive = yes } #Gilbert de Malley
				    }
				     set_defacto_liege = c_90000698
				  }
			   }
			}
			c_worcester = {
			   holder_scope = {
			   	 if = {
			        limit = {
				      c_90000688 = { is_alive = yes } #Heinrich One-Eyed
				    }
					set_defacto_liege = c_90000688
				 }
			   	if = {
			        limit = {
				      c_90000688 = { is_alive = no } #Heinrich One-Eyed
					  c_90000690 = { is_alive = yes } #Wilhelm Einauger
				    }
					set_defacto_liege = c_90000690
				 }
			     if = {
			        limit = {
				      c_90000688 = { is_alive = no } #Heinrich One-Eyed
					  c_90000690 = { is_alive = no } #Wilhelm Einauger
					  c_90000691 = { is_alive = yes } #Wilhelm Einauger
				    }
					set_defacto_liege = c_90000691
				 }
			   }
			}
			c_warwick = {
			   holder_scope = {
			   	 if = {
			        limit = {
				      c_90000688 = { is_alive = yes } #Heinrich One-Eyed
				    }
					set_defacto_liege = c_90000688
				 }
			   	if = {
			        limit = {
				      c_90000688 = { is_alive = no } #Heinrich One-Eyed
					  c_90000690 = { is_alive = yes } #Wilhelm Einauger
				    }
					set_defacto_liege = c_90000690
				 }
			     if = {
			        limit = {
				      c_90000688 = { is_alive = no } #Heinrich One-Eyed
					  c_90000690 = { is_alive = no } #Wilhelm Einauger
					  c_90000691 = { is_alive = yes } #Wilhelm Einauger
				    }
					set_defacto_liege = c_90000691
				 }
			   }
			}
			c_leicester = {
			   holder_scope = {
			   	 if = {
			        limit = {
				      c_90000688 = { is_alive = yes } #Heinrich One-Eyed
				    }
					set_defacto_liege = c_90000688
				 }
			   	if = {
			        limit = {
				      c_90000688 = { is_alive = no } #Heinrich One-Eyed
					  c_90000690 = { is_alive = yes } #Wilhelm Einauger
				    }
					set_defacto_liege = c_90000690
				 }
			     if = {
			        limit = {
				      c_90000688 = { is_alive = no } #Heinrich One-Eyed
					  c_90000690 = { is_alive = no } #Wilhelm Einauger
					  c_90000691 = { is_alive = yes } #Wilhelm Einauger
				    }
					set_defacto_liege = c_90000691
				 }
			   }
 			}
			d_normandy = {
			   holder_scope = {
			       set_defacto_liege = 0
			   }
			}
		  }
    }
	ai_will_do = {
        factor = 0
    }	  
}