decisions = {

Free_The_State = {
  potential = {
    ai = no
    NOT = { government = free_republic_government }
    NOT = { government = reformed_theocracy_government}
    #Conditions for the decision to appear
  }
  allow = {
    prisoner = no
    #Conditions for the decision to be enabled
  }
  effect = {
  set_government_type = free_republic_government
  character_event = { id = aii_events.26 }
    #Commands executed when taking the decision
  }
}

Where_The_Horses_Graze = {
  potential = {
    ai = no
    #Conditions for the decision to appear
  }
  allow = {
    prisoner = no
    #Conditions for the decision to be enabled
  }
  effect = {
  set_government_type = nomadic_government
    #Commands executed when taking the decision
  }
}

God_Wills_It = {
  potential = {
    ai = no
    NOT = { government = free_republic_government }
    NOT = { government = reformed_theocracy_government}
    #Conditions for the decision to appear
  }
  allow = {
    prisoner = no
    #Conditions for the decision to be enabled
  }
  effect = {
  set_government_type = reformed_theocracy_government
   character_event = { id = aii_events.26 }
    #Commands executed when taking the decision
    }
  }
  
Five_is_Better_Than_One  = {
		potential = {
			has_dlc = "The Republic"
			is_merchant_republic = no
			is_tribal = no
			ai = no
		}
		allow = {
			is_female = no
		}
		
		effect = {
			
				if = {
					limit = {
						tier = COUNT
					}
					primary_title = {
						create_title = {
							tier = DUKE
							landless = no
							temporary = no
							custom_created = yes
							culture = ROOT
							holder = ROOT
							base_title = THIS
							copy_title_laws = yes
						}
					}
				}
			
				create_family_palace = yes
			
				set_government_type = merchant_republic_government
			}
		
	}
           
At_What_Price? = {
  potential = {
    ai = no
    tier = count
    #Conditions for the decision to appear
  }
  allow = {
    prisoner = no
    #Conditions for the decision to be enabled
  }
  effect = {
  add_trait = immortal
  add_trait = cannibal_trait
  add_trait = blinded
  add_trait = possessed
  add_trait = lunatic
  add_trait = eunuch
  add_trait = slothful
    #Commands executed when taking the decision
  }
}

HERESY? = {
    potential = {
        ai = no
        #Conditions for the decision to appear
            }
    allow = {
        prisoner = no
        #Conditions for the decision to be enabled
            }
    effect = {
  	character_event = { id = aii_events.24 }
    #Commands executed when taking the decision
  }

}

Horsing_Around = {
  potential = {
    ai = no
    independent = yes
    #Conditions for the decision to appear
  }
  allow = {
    prisoner = no
    #Conditions for the decision to be enabled
  }
  effect = {
  culture = horse
  religion = jewish
  spawn_unit = { 
                province = capital
                home = cpaital
                troops = {
                    light_cavalry = { 1250 1250 }
                    knights = { 1250 1250 }
                    horse_archers = { 1000 1000 }
                    }
                attrition = 0.50
                disband_on_peace = no
                reinforces = true
                reinforce_rate_multiplier = 0.25
                can_toggle_looting = yes
                }
  add_trait = quick
    #Commands executed when taking the decision
  }
}

Back_From_Square_One = {
is_high_prio = yes
  potential = {
    ai = no
    independent = yes
    religion = nestorian
    #Conditions for the decision to appear
  }
  allow = {
    prisoner = no
    #Conditions for the decision to be enabled
  }
  effect = {
  spawn_unit = { 
                province = capital
                home = capital
                troops = {
                    archers = { 500 500 }
                    light_infantry = { 1500 1500 }
                    heavy_infantry = { 500 500 }
                    light_cavalry = { 500 500 }
                    }
                attrition = 0.50
                disband_on_peace = no
                reinforces = true
                reinforce_rate_multiplier = 0.25
                can_toggle_looting = no
                }
  spawn_fleet = {
    province = capital
    owner = ROOT
    disband_on_peace = no
    troops = {
        galleys = { 100 100 }
        }
        }
    add_trait = quick
    #Commands executed when taking the decision
  }
}	

Adopt_Imperial_Administration = {
is_high_prio = yes
  potential = {
    is_merchant_republic = no
    is_nomadic = no
    is_tribal = no
    tier = emperor
    ai = no
  }
  allow = {
    prisoner = no    
  }
  effect = {
   crownlaw_title = {
        revoke_law = feudal_administration 
        add_law = imperial_administration
        }
        character_event = { id = aii_events.23 }
}

}

Become_an_Emperor = {
is_high_prio = yes
  potential = {
    is_merchant_republic = no
    is_nomadic = no
    is_tribal = no
    ai = no
  }
 allow {
 prisoner = no
 }
 effect {
                primary_title = {
				    create_title = {
				        tier = emperor
				        landless = no
				        temporary = no
				        custom_created = yes
				        culture = ROOT
				        holder = ROOT
				        base_title = THIS
				        copy_title_laws = yes
						}
					}
				}
}

Back_to_Basics  = {
		potential = {
			is_feudal = yes
		}
		allow = {
			war = no
            ai = no
			capital_holding = {
					holding_type = castle
				}
		}
		
		effect = {
            set_government_type = tribal_government
            primary_title = {
						add_law = tribal_organization_2
						add_law = centralization_1
					}
            spawn_unit = { 
                province = capital
                home = cpaital
                troops = {
                    archers = { 500 500 }
                    light_infantry = { 2000 2000 }
                    heavy_infantry = { 1000 1000 }
                    }
                attrition = 0.50
                disband_on_peace = no
                maintenance_multiplier = 0.25
                reinforces = true
                reinforce_rate_multiplier = 0.25
                }
        
				any_demesne_title = {
				    convert_to = tribal
					refill_holding_levy = yes
					}
                    		
		}
        }
        
My_House = {
is_high_prio = yes
  potential = {
    is_merchant_republic = no
    is_nomadic = no
    is_tribal = no
    tier = duke
    ai = no
  }
 allow {
 prisoner = no
 }
 effect {
 primary_title = {
				add_law = centralization_4
                add_law = city_tax_3
                add_law = city_contract_3
                add_law = temple_tax_3
                add_law = temple_contract_3
                add_law = tribal_tax_3
                add_law = tribal_contract_3
                if = {
                    limit = {religion = muslim}
                add_law = iqta_tax_3
                add_law = iqta_contract_3
                }
                if = {
                    limit = {
                        NOT = {religion_group = muslim}
                    }
                add_law = feudal_tax_3
                add_law = feudal_contract_3
                }
 
				}
                character_event = { id = aii_events.27 }
}
}
}

targetted_decisions = { 

Convert_Vassal = {
  is_high_prio = yes # Will show an alert if special action is available
  filter = vassals #Filter characters targetted by the player
  ai_target_filter = vassals #Filter for characters targetted by the AI

    from_potential = {
        is_tribal = yes
        is_ruler = yes
        }
        
  potential = {
        vassal_of = FROM
        is_ruler = yes
        age = 16
        is_landed = yes
        NOT = { government = tribal_government }
	    NOT = { government = trade_republic_government }
  }
  
  allow = {
        war = no
        prisoner = no
       
  }
  effect = {
    set_government_type = tribal_government
  }
}

Ask_to_Become_Tributary = {
  is_high_prio = no # Will show an alert if special action is available
  filter = all #Filter characters targetted by the player
  ai_target_filter = self #Filter for characters targetted by the AI

    from_potential = {
        is_landed = yes
        is_ruler = yes
        }
        
  potential = {
        is_ruler = yes
        age = 16
        is_landed = yes
        personal_opinion = { who = FROM value = 25}
        primary_title = { higher_real_tier_than = COUNT }	
  }
  
  allow = {
        war = no
        prisoner = no
       
  }
  effect = {
    make_tributary = { who = FROM percentage = 0.4 }
  }
}

}

