###################################
######## VAMPIRE COMPETENCY #######

vampires_is_strong = {
    combat_rating = 50
}

vampires_is_educated = {
    learning = 15
}

vampires_is_cunning = {
    intrigue = 15
}

vampires_is_diplomatic = {
    diplomacy = 15
}

###### VAMPIRE COMPETENCY EMD #####
###################################

###################################
######## VICTIM FILTERS ###########

vampires_is_at_home = {
  #just personal counties
  OR = {
    AND = {
      #if ruler, but be ruling the county by himself
      is_ruler = yes
      location = {
        holder_scope = {
          character = PREVPREV
        }
      }
    }
    AND = {
      #if not a ruler, must be at the county ruled by direct liege
      is_ruler = no
      location = {
        holder_scope = {
          is_liege_of = PREVPREV
        }
      }
    }
  }
}

vampires_is_at_home_realm = {
  #own, vassal's, liege or liege of liege country
  location = {
    holder_scope = {
      top_liege = {
        OR = {
          character = PREVPREVPREV
          is_vassal_or_below = PREVPREVPREV
        }
        
      }
    }
  }
}

vampires_is_valid_feeding_target_potential = {
  #PREV needs to be a the vampire trying to feed
  is_vampire = no
  ai = yes
  OR = {
    prisoner = no
    AND = {
      prisoner = yes
      host = { character = PREVPREV }
    }
  }
}

vampires_is_valid_feeding_target = {
  #PREV needs to be a the vampire trying to feed
  vampires_is_valid_feeding_target_potential = yes
  at_location = PREV
  NOT = { has_character_modifier = vampires_precaution }
}

#Draws extra attention - vampires try to avoid if possible
vampires_is_feeding_taboo = {
  OR = {
    is_adult = no #child
    vampires_public_position = yes
  }
}

vampires_public_position = {
  OR = {
    is_ruler = yes
    is_councillor = yes
    in_command = yes 
  }
}

#Has a good chance of dying if fed upon. Vampires will actively avoid feeding from these
vampires_is_obviously_unhealthy = {
  OR = {
    has_character_modifier = vampires_drained
    
    has_disease_trigger = yes
    has_injury_trigger = yes

    #Health
    trait = incapable
    trait = infirm
    trait = maimed

    #Maimed
    trait = mangled
  }  
}

#victim is strong enough to offer resistance
vampires_victim_might_resist = {
  OR = {
    martial = 15
    combat_rating = 25
    trait = strong
    trait = giant
    trait = robust #brawny
    trait = sturdy
    trait = brave
    trait = zealous

    trait = hunter   

    trait = duelist
    trait = berserker
    trait = shieldmaiden
    trait = saoshyant
    trait = viking
    trait = pirate
    trait = ravager
    trait = seaking
    trait = sea_queen
    trait = gladiator
    trait = varangian
  }
}

#migh escape and cause trouble
vampires_victim_might_see_it_coming = {
  OR = {
    intrigue = 15
    trait = genius
    trait = quick
    trait = shrewd

    trait = schemer

    trait = paranoid

    trait = cannibal_trait
  }
}

######## VICTIM FILTERS END #######
###################################