# Triggers for animal pets, mounts and familiars.

### Pets:

blg_animal_ape = {
	trait = great_ape
}

blg_animal_bat = {
	OR = {
		trait = bat
		trait = great_bat
	}
}

blg_animal_boar = {
	trait = boar
}

blg_animal_cat = {
	OR = {
		trait = cata
		has_character_modifier = pet_cat
		has_character_modifier = child_cat
	}
}

blg_familiar_cat = {
	OR = {
		trait = shadowcat
		AND = {
			has_character_modifier = cat_familiar
			blg_visible_society = yes
		}
	}
}

blg_animal_dog = {
	OR = {
		trait = dog
		has_character_modifier = pet_hunting_dog
		has_character_modifier = pet_house_dog
		has_character_modifier = pet_masterless_dog
		has_character_modifier = guide_dog
		has_character_modifier = child_dog
	}
	NOT = { has_character_modifier = lost_dog }
}

blg_animal_eagle = {
	OR = {
		trait = eagle
		has_character_modifier = pet_hunting_eagle
	}
}

blg_animal_falcon = {
	trait = falconer
}

blg_animal_fox = {
	trait = fox_mbs
}

blg_animal_frog = {
	always = no
}

blg_animal_hedgehog = {
	has_character_modifier = pet_hedgehog
}

blg_animal_imp = {
	always = no
}

blg_animal_monkey = {
	always = no
}

blg_animal_otter = {
	has_character_modifier = pet_otter
}

blg_animal_owl = {
	OR = {
		has_character_modifier = pet_owl
		AND = {
			has_character_modifier = owl_familiar
			blg_visible_society = yes
		}
	}
}

blg_animal_parrot = {
	has_character_modifier = pet_parrot
}

blg_animal_rat = {
	OR = {
		has_character_modifier = pet_rat_dungeon
		has_character_modifier = rats_in_cell
	}
}

blg_animal_raven = {
	OR = {
		trait = crow
		death_reason = death_murder_unknown_crows
		AND = {
			has_character_modifier = raven_familiar
			blg_visible_society = yes
		}
	}
}

blg_animal_snake = {
	OR = {
		death_reason = death_accident_snakes
		death_reason = death_murder_snakes
		death_reason = death_murder_unknown_snakes
		death_reason = death_execution_snake_pit
	}
}

blg_animal_vulture = {
	trait = vulture
}

blg_animal_wolf = {
	OR = {
		trait = wolf
		trait = direwolf
		AND = {
			has_character_modifier = wolf_familiar
			blg_visible_society = yes
		}
	}
}

### Mounts:

# Charger Horse.
blg_mount_horse_charger = {
	OR = {
		has_character_modifier = nomad_warhorse
		death_reason = death_execution_horses
		any_artifact = {
			is_artifact_equipped = yes
			has_artifact_flag = horse
			has_artifact_flag = mount
			has_artifact_flag = charger
		}
	}
}

# Destrier Horse.
blg_mount_horse_destrier = {
	OR = {
		has_character_modifier = unicorn_rider
		trait = unicorn_MBS
		any_artifact = {
			is_artifact_equipped = yes
			has_artifact_flag = horse
			has_artifact_flag = mount
			has_artifact_flag = destrier
		}
	}
}

# Basic Horse.
blg_mount_horse = {
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse
		has_artifact_flag = mount
	}
}

# Armoured horse tier 1.
blg_mount_horse_armor_1 = {
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse
		has_artifact_flag = mount
	}
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse_armor
	}
}

# Armoured horse tier 2.
blg_mount_horse_armor_2 = {
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse
		has_artifact_flag = mount
	}
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse_armor
		quality == 2
	}
}

# Armoured horse tier 3.
blg_mount_horse_armor_3 = {
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse
		has_artifact_flag = mount
	}
	any_artifact = {
		is_artifact_equipped = yes
		has_artifact_flag = horse_armor
		quality >= 3
	}
}

# Black fierce horse.
blg_mount_horse_black = {
	always = no
}

# White immortal horse.
blg_mount_horse_white = {
	has_character_modifier = zorse_rider
}

# Bear mount.
blg_mount_bear = {
	trait = brownbear
}

# Camel mount.
blg_mount_camel = {
	always = no
}

blg_mount_dragon_black = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 0 }
			has_portrait_property = { layer = 31 index = 1 }
			has_portrait_property = { layer = 31 index = 17 }
			has_portrait_property = { layer = 31 index = 18 }
			has_portrait_property = { layer = 31 index = 23 }
		}
	}
}

blg_mount_dragon_red = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 4 }
			has_portrait_property = { layer = 31 index = 9 }
			has_portrait_property = { layer = 31 index = 20 }
			has_portrait_property = { layer = 31 index = 22 }
		}
	}
}

blg_mount_dragon_white = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 3 }
			has_portrait_property = { layer = 31 index = 14 }
		}
	}
}

blg_mount_dragon_green = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 2 }
			has_portrait_property = { layer = 31 index = 8 }
			has_portrait_property = { layer = 31 index = 16 }
			has_portrait_property = { layer = 31 index = 25 }
		}
	}
}

blg_mount_dragon_blue = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 12 }
			has_portrait_property = { layer = 31 index = 15 }
			has_portrait_property = { layer = 31 index = 26 }
		}
	}
}

blg_mount_dragon_silver = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 5 }
			has_portrait_property = { layer = 31 index = 6 }
		}
	}
}

blg_mount_dragon_bronze = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 7 }
			has_portrait_property = { layer = 31 index = 13 }
			has_portrait_property = { layer = 31 index = 19 }
			has_portrait_property = { layer = 31 index = 24 }
		}
	}
}

blg_mount_dragon_gold = {
	trait = dragon_rider
	any_friend = {
		trait = dragon
		OR = {
			has_portrait_property = { layer = 31 index = 10 }
			has_portrait_property = { layer = 31 index = 11 }
			has_portrait_property = { layer = 31 index = 21 }
		}
	}
}

# Elephant mount.
blg_mount_elephant = {
	trait = mammoth
}

# Lion mount.
blg_mount_lion = {
	OR = {
		trait = lion
		trait = hrakkar
	}
}

# Lizard mount.
blg_mount_lizard = {
	always = no
}

# Polar Bear mount.
blg_mount_polarbear = {
	OR = {
		trait = snowbear
		trait = panda
	}
}

# Reindeer mount.
blg_mount_reindeer = {
	trait = deer
}

# Tiger mount.
blg_mount_tiger = {
	always = no
}

# Yak mount.
blg_mount_yak = {
	always = no
}

# Wolf mount.
blg_mount_wolf = {
	always = no
}

### Unit types:

# Horse mounted units.
blg_unit_horse = {
	OR = {
		light_cavalry = 0.3
		horse_archers = 0.3
	}
}

# Heavy horse mounted units.
blg_unit_knights = {
	knights = 0.3
}

# Camel mounted units.
blg_unit_camel = {
	camel_cavalry = 0.3
}

# Elephant mounted units.
blg_unit_elephants = {
	OR = {
		war_elephants = 0.1
		mammoths = 0.1
	}
}
