﻿namespace = enfp_hunt

enfp_hunt.0001 = { # "Natural Ability" — your bastard son proves to be a rather astute hunter, and gets prowess, martial, and a good congenital trait (if they aren't already stupid or smart)
    type = activity_event
    title = enfp_hunt.0001.t
    desc = enfp_hunt.0001.desc
    theme = hunt_activity
    cooldown = { years = 50 }

    trigger = {
        root = {
            faith = { 
                OR = {
                    has_doctrine_parameter = bastards_legitimize # wait you fucking moron, this means it always happens, why did you write this... I'm keeping this in here as a testament to my own folly
                    has_doctrine_parameter = bastards_always
                    has_doctrine_parameter = bastards_none
                }
            }
        }

        exists = scope:activity
        scope:activity = {
            any_attending_character = {
                is_child_of = root
                has_trait = bastard
                is_male = yes
                NOR = {
                # Don't have a bastard with someone stupid!
                    has_trait = intellect_bad_1
                    has_trait = intellect_bad_2
                    has_trait = intellect_bad_3
                    has_trait = dull
                    
                }
            }
        }
    }

    immediate = {
	    scope:activity = {
		    random_attending_character = {
			    limit = {
				    has_trait = bastard
                    is_child_of = root
                    is_male = yes
                    NOR = {
					has_trait = intellect_bad_1
					has_trait = intellect_bad_2
					has_trait = intellect_bad_3
					has_trait = dull
				    }
			    }
			save_scope_as = bastardkid
		    }
	    }
    }


    left_portrait = {
        character = root
        animation = admiration
    }

    right_portrait = {
        character = scope:bastardkid
        animation = survey
    }

    option = {
        name = enfp_hunt.0001.a
        
            scope:activity = {
            add_activity_log_entry = {
				key = enfp_hunt_bastard_excelled_log
				score = 25
				tags = { random good social }
				character = root
				target = scope:bastardkid

                root = {
                    hunt_activity_success_change_effect = { CHANGE = increase_medium }

                }

                scope:bastardkid = {
            add_martial_skill = 5
            add_prowess_skill = 5

            if = {
                limit = {
                    NOT = {
                        OR = {
                            has_trait = intellect_good_1
                            has_trait = intellect_good_2
                            has_trait = intellect_good_3
                            has_trait = shrewd
                        }
                    }
                }
                random_list = {
                    33 = { add_trait = intellect_good_1 }
                    33 = { add_trait = intellect_good_2 }
                    34 = { add_trait = intellect_good_3 }
                }
            }
        }
            }
        }
    }
}
