ar_allowed_to_join_factions = {
	custom_trigger_tooltip = {
		tooltip = ar_allowed_to_join_factions_tt
		is_subject = no
		is_in_faction = no		
	}
}


############################################ ЛИНГСАН
is_lingsan_liga_member = {
  custom_trigger_tooltip = {
    tooltip = is_lingsan_liga_member_tt
    has_variable = current_faction
    check_variable = {
      var     = current_faction
      value   = "ZCS"
      compare = equals
    }
  }
}
is_not_lingsan_liga_member = {
  custom_trigger_tooltip = {
    tooltip = is_not_lingsan_liga_member_tt
    NOT = { is_lingsan_liga_member = yes }
  }
}

is_lingsan_liga_leader = {
  custom_trigger_tooltip = {
    tooltip = is_lingsan_liga_leader_tt
    is_lingsan_liga_member = yes
    is_faction_leader = yes
  }
}

is_not_lingsan_liga_leader = {
  custom_trigger_tooltip = {
    tooltip = is_not_lingsan_liga_leader_tt
    NOT = { is_lingsan_liga_leader = yes }
  }
}

lingsan_liga_exists = {
  custom_trigger_tooltip = {
    tooltip = lingsan_liga_exists_tt
    any_country = {
      is_lingsan_liga_member = yes
      is_faction_leader = yes
    }
  }
}
does_lingsan_liga_exist = {
  lingsan_liga_exists = yes
}

lingsan_liga_does_not_exist = {
  custom_trigger_tooltip = {
    tooltip = lingsan_liga_does_not_exist_tt
    NOT = { lingsan_liga_exists = yes }
  }
}
does_lingsan_liga_not_exist = {
  lingsan_liga_does_not_exist = yes
}

has_border_war_with_lingsan_liga = {
  custom_trigger_tooltip = {
    tooltip = has_border_war_with_lingsan_liga_tt
    any_country = {
      is_lingsan_liga_member = yes
      has_border_war_with = PREV
    }
  }
}

has_war_with_lingsan_liga = {
  custom_trigger_tooltip = {
    tooltip = has_war_with_lingsan_liga_tt
    any_country = {
      is_lingsan_liga_member = yes
      has_war_with = PREV
    }
  }
}

at_peace_with_lingsan_liga = {
  custom_trigger_tooltip = {
    tooltip = at_peace_with_lingsan_liga_tt
    NOT = {
      any_country = {
        is_lingsan_liga_member = yes
        OR = {
          has_war_with = PREV
          has_border_war_with = PREV
        }
      }
    }
  }
}

borders_lingsan_liga = {	# граница
  custom_trigger_tooltip = {
    tooltip = borders_lingsan_liga_tt
    any_neighbor_country = {
      is_lingsan_liga_member = yes
    }
  }
}

does_not_border_lingsan_liga = {
  custom_trigger_tooltip = {
    tooltip = does_not_border_lingsan_liga_tt
    borders_lingsan_liga = no
  }
}

############################################ СЕИШУ
is_seishu_member = {
  custom_trigger_tooltip = {
    tooltip = is_seishu_member_tt
    has_variable = current_faction
    check_variable = {
      var     = current_faction
      value   = "ZMN"
      compare = equals
    }
  }
}
is_not_seishu_member = {
  custom_trigger_tooltip = {
    tooltip = is_not_seishu_member_tt
    NOT = { is_seishu_member = yes }
  }
}

is_seishu_leader = {
  custom_trigger_tooltip = {
    tooltip = is_seishu_leader_tt
    is_seishu_member = yes
    is_faction_leader = yes
  }
}

is_not_seishu_leader = {
  custom_trigger_tooltip = {
    tooltip = is_not_seishu_leader_tt
    NOT = { is_seishu_leader = yes }
  }
}

seishu_exists = {
  custom_trigger_tooltip = {
    tooltip = seishu_exists_tt
    any_country = {
      is_seishu_member = yes
      is_faction_leader = yes
    }
  }
}
does_seishu_exist = {
  seishu_exists = yes
}

seishu_does_not_exist = {
  custom_trigger_tooltip = {
    tooltip = seishu_does_not_exist_tt
    NOT = { seishu_exists = yes }
  }
}
does_seishu_not_exist = {
  seishu_does_not_exist = yes
}

has_border_war_with_seishu = {
  custom_trigger_tooltip = {
    tooltip = has_border_war_with_seishu_tt
    any_country = {
      is_seishu_member = yes
      has_border_war_with = PREV
    }
  }
}

has_war_with_seishu = {
  custom_trigger_tooltip = {
    tooltip = has_war_with_seishu_tt
    any_country = {
      is_seishu_member = yes
      has_war_with = PREV
    }
  }
}

at_peace_with_seishu = {
  custom_trigger_tooltip = {
    tooltip = at_peace_with_seishu_tt
    NOT = {
      any_country = {
        is_seishu_member = yes
        OR = {
          has_war_with = PREV
          has_border_war_with = PREV
        }
      }
    }
  }
}

borders_seishu = {	# граница
  custom_trigger_tooltip = {
    tooltip = borders_seishu_tt
    any_neighbor_country = {
      is_seishu_member = yes
    }
  }
}

does_not_border_seishu = {
  custom_trigger_tooltip = {
    tooltip = does_not_border_seishu_tt
    borders_seishu = no
  }
}

######  Туаньцзе
is_tuantse_member = {
  custom_trigger_tooltip = {
    tooltip = is_tuantse_member_tt
    has_variable = current_faction
    check_variable = {
      var     = current_faction
      value   = "ZRE"
      compare = equals
    }
  }
}
is_not_tuantse_member = {
  custom_trigger_tooltip = {
    tooltip = is_not_tuantse_member_tt
    NOT = { is_tuantse_member = yes }
  }
}

is_tuantse_leader = {
  custom_trigger_tooltip = {
    tooltip = is_tuantse_leader_tt
    is_tuantse_member = yes
    is_faction_leader = yes
  }
}

is_not_tuantse_leader = {
  custom_trigger_tooltip = {
    tooltip = is_not_tuantse_leader_tt
    NOT = { is_tuantse_leader = yes }
  }
}

tuantse_exists = {
  custom_trigger_tooltip = {
    tooltip = tuantse_exists_tt
    any_country = {
      is_tuantse_member = yes
      is_faction_leader = yes
    }
  }
}
does_tuantse_exist = {
  tuantse_exists = yes
}

tuantse_does_not_exist = {
  custom_trigger_tooltip = {
    tooltip = tuantse_does_not_exist_tt
    NOT = { tuantse_exists = yes }
  }
}
does_tuantse_not_exist = {
  tuantse_does_not_exist = yes
}

has_border_war_with_tuantse = {
  custom_trigger_tooltip = {
    tooltip = has_border_war_with_tuantse_tt
    any_country = {
      is_tuantse_member = yes
      has_border_war_with = PREV
    }
  }
}

has_war_with_tuantse = {
  custom_trigger_tooltip = {
    tooltip = has_war_with_tuantse_tt
    any_country = {
      is_tuantse_member = yes
      has_war_with = PREV
    }
  }
}

at_peace_with_tuantse = {
  custom_trigger_tooltip = {
    tooltip = at_peace_with_tuantse_tt
    NOT = {
      any_country = {
        is_tuantse_member = yes
        OR = {
          has_war_with = PREV
          has_border_war_with = PREV
        }
      }
    }
  }
}

borders_tuantse = {	# граница
  custom_trigger_tooltip = {
    tooltip = borders_tuantse_tt
    any_neighbor_country = {
      is_tuantse_member = yes
    }
  }
}

does_not_border_tuantse = {
  custom_trigger_tooltip = {
    tooltip = does_not_border_tuantse_tt
    borders_tuantse = no
  }
}


##### СНЕГ
is_sneg_member = {
  custom_trigger_tooltip = {
    tooltip = is_sneg_member_tt
    has_variable = current_faction
    check_variable = {
      var     = current_faction
      value   = "ZRI"
      compare = equals
    }
  }
}
is_not_sneg_member = {
  custom_trigger_tooltip = {
    tooltip = is_not_sneg_member_tt
    NOT = { is_sneg_member = yes }
  }
}

is_sneg_leader = {
  custom_trigger_tooltip = {
    tooltip = is_sneg_leader_tt
    is_sneg_member = yes
    is_faction_leader = yes
  }
}

is_not_sneg_leader = {
  custom_trigger_tooltip = {
    tooltip = is_not_sneg_leader_tt
    NOT = { is_sneg_leader = yes }
  }
}

sneg_exists = {
  custom_trigger_tooltip = {
    tooltip = sneg_exists_tt
    any_country = {
      is_sneg_member = yes
      is_faction_leader = yes
    }
  }
}
does_sneg_exist = {
  sneg_exists = yes
}

sneg_does_not_exist = {
  custom_trigger_tooltip = {
    tooltip = sneg_does_not_exist_tt
    NOT = { sneg_exists = yes }
  }
}
does_sneg_not_exist = {
  sneg_does_not_exist = yes
}

has_border_war_with_sneg = {
  custom_trigger_tooltip = {
    tooltip = has_border_war_with_sneg_tt
    any_country = {
      is_sneg_member = yes
      has_border_war_with = PREV
    }
  }
}

has_war_with_sneg = {
  custom_trigger_tooltip = {
    tooltip = has_war_with_sneg_tt
    any_country = {
      is_sneg_member = yes
      has_war_with = PREV
    }
  }
}

at_peace_with_sneg = {
  custom_trigger_tooltip = {
    tooltip = at_peace_with_tuantse_tt
    NOT = {
      any_country = {
        is_sneg_member = yes
        OR = {
          has_war_with = PREV
          has_border_war_with = PREV
        }
      }
    }
  }
}

borders_sneg = {	# граница
  custom_trigger_tooltip = {
    tooltip = borders_sneg_tt
    any_neighbor_country = {
      is_sneg_member = yes
    }
  }
}

does_not_border_sneg = {
  custom_trigger_tooltip = {
    tooltip = does_not_border_sneg_tt
    borders_sneg = no
  }
}