﻿# Special Regula portrait modifiers
# naked - basically the same as no clothes, used by naked compeditae clothing rule
# blindfold - Used by certain events to add a blindfold to a character via an outfit tag
# dna_test - Used to test out any random dna modifiers

regula_special = {
    usage = game
    selection_behavior = max
    priority = 10

	# Regula Naked, used for Naked Game rules
    naked = {
        dna_modifiers = {
            accessory = {
                mode = add
                gene = clothes
                template = no_clothes
                range = { 0 1 } # For the randomness to work correctly
            }
            accessory = {
                mode = add
                gene = cloaks
                template = no_cloak
                range = { 0 1 } # For the randomness to work correctly
            }
            accessory = {
                mode = add
                gene = legwear
                template = no_legwear
                value = 0
            }
        }
        outfit_tags = { no_clothes }
        weight = {
            base = -500
            modifier = {
                add = 1000
                AND = {
                    has_game_rule = regula_naked_compeditae_all_enabled

					# Add pretty much all of the special traits
					OR = {
						has_trait = devoted_trait_group
						has_trait = contubernalis
						has_trait = orba
						has_trait = regula_undying
						has_trait = sigillum
						has_trait = retired_paelex
						has_trait = regula_child_of_the_book
					}
                }
            }
            modifier = {
                add = 1000
                has_game_rule = regula_naked_compeditae_limited_enabled

				# Only most devoted (spouses) and Contubernalis
				OR = {
					is_regula_leader_devoted_trigger = yes
					has_trait = contubernalis
				}
            }
            modifier = {
                add = -1500
				OR = {
					has_game_rule = regula_naked_compeditae_disabled
					should_show_nudity = no
				}
            }
        }
    }

	# Blindfold
	blindfold = {
        dna_modifiers = {
			accessory = {
				mode = add
				gene = special_headgear_spectacles
				template = blindfold
				value = 0.5
			}
	    }
        outfit_tags = { regula_blindfold }
        weight = {
		base = -100
	}
    }
}

# Test Portrait
regula_dna_test = {
    usage = game
    dna_change_example_modifier = {
        dna_modifiers = {

            accessory = {
				mode = replace
				gene = eye_accessory
				template = regula_sclera_pink
				value = 1.0
			}
            color = {
                gene = eye_color
                mode = modify

                x = -0.5
                y = -0.5
            }
            # accessory = {
            #     mode = add
            #     gene = hairstyles
            #     template = western_hairstyles_straight

            #     value = 1.0
            # }
            # color = {
            #     gene = eye_color
            #     mode = modify

            #     x = -1
            #     y = -1
            # }
			# color = {
			# 	gene = skin_color
			# 	mode = replace

			# 	x = 1
			# 	y = 0.33

			# }
            # color = {
            #     gene = hair_color
            #     mode = modify
            #     x = 0.0
            #     y = 0.99
            # }
        }
        weight = {
            base = 0
            modifier = {
                add = 100
                has_character_flag = dna_change_example_modifier
            }
        }
    }
}
