﻿#################################
#         GODS – Promotion      #
#################################

create_god_blood = {
    category = interaction_category_friendly
    desc = create_god_blood_desc
    icon = god_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = young_god_light
                has_trait = young_god_dark
            }
            is_ai = no
        }
        scope:recipient = {
            NOR = {
                has_trait = god_blood
                has_trait = demi_god
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = angel_blood
                has_trait = angel
                has_trait = dark_angel
                has_trait = archangel
                has_trait = dark_archangel
                has_trait = young_god_light
                has_trait = young_god_dark
            }
        }
    }

    is_valid = {
        always = yes  # Optional: no extra check needed if is_shown does the gating
    }

    on_accept = {
        scope:recipient = {
            add_trait = god_blood
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_demi_god = {
    category = interaction_category_friendly
    desc = promote_to_demi_god_desc
    icon = demi_god
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = young_god_light
                has_trait = young_god_dark
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = god_blood
            NOT = { has_trait = demi_god }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = god_blood
            add_trait = demi_god
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_young_god_light = {
    category = interaction_category_friendly
    desc = promote_to_young_god_light_desc
    icon = young_god_light
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            OR = {
                has_trait = god_blood
                has_trait = demi_god
            }
            NOT = { has_trait = young_god_light }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = god_blood
            remove_trait = demi_god
            add_trait = young_god_light
            add_character_flag = become_full_god_light
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_young_god_dark = {
    category = interaction_category_friendly
    desc = promote_to_young_god_light_desc
    icon = young_god_dark
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            OR = {
                has_trait = god_blood
                has_trait = demi_god
            }
            NOT = { has_trait = young_god_dark }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = god_blood
            remove_trait = demi_god
            add_trait = young_god_dark
            add_character_flag = become_full_god_dark
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_angel_full_god = {
    category = interaction_category_friendly
    desc = promote_to_angel_full_god_desc
    icon = angel_full_god
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = young_god_light
            NOT = { has_trait = angel_full_god }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = demi_god
            remove_trait = young_god_light
            remove_character_flag = become_full_god_light
            add_trait = angel_full_god
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_fallen_god = {
    category = interaction_category_friendly
    desc = promote_to_fallen_god_desc
    icon = fallen_god
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = young_god_dark
            NOT = { has_trait = fallen_god }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = demi_god
            remove_trait = young_god_dark
            remove_character_flag = become_full_god_dark
            add_trait = fallen_god
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

#################################
#         GODS – Demotion       #
#################################

demote_from_angel_full_god = {
    category = interaction_category_friendly
    desc = demote_from_angel_full_god_desc
    icon = young_god_light
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            has_trait = angel_full_god
            is_ai = no
        }
        scope:recipient = {
            has_trait = angel_full_god
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = angel_full_god
            add_trait = young_god_light
            add_character_flag = become_full_god_light
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_fallen_god = {
    category = interaction_category_friendly
    desc = demote_from_fallen_god_desc
    icon = young_god_dark
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = fallen_god
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = fallen_god
            add_trait = young_god_dark
            add_character_flag = become_full_god_dark
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_demi_god = {
    category = interaction_category_friendly
    desc = demote_from_demi_god_desc
    icon = god_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = young_god_light
                has_trait = young_god_dark
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = demi_god
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = demi_god
            add_trait = god_blood
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_young_god_light = {
    category = interaction_category_friendly
    desc = demote_from_young_god_light_desc
    icon = demi_god
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            OR = {
                has_trait = young_god_light
                has_trait = angel_full_god
            }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = young_god_light
            remove_trait = angel_full_god
            remove_character_flag = become_full_god_light
            add_trait = demi_god
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_young_god_dark = {
    category = interaction_category_friendly
    desc = demote_from_young_god_dark_desc
    icon = demi_god
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            OR = {
                has_trait = young_god_dark
                has_trait = fallen_god
            }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = young_god_dark
            remove_trait = fallen_god
            remove_character_flag = become_full_god_dark
            add_trait = demi_god
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_god_blood = {
    category = interaction_category_friendly
    desc = demote_from_god_blood_desc
    icon = god_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = young_god_light
                has_trait = young_god_dark
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = god_blood
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = god_blood
            trigger_event = angel_trait_mod.101
        }
    }
}

#################################
#        ANGELS – Promotion     #
#################################

create_angel_blood = {
    category = interaction_category_friendly
    desc = create_angel_blood_desc
    icon = angel_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            NOR = {
                has_trait = angel_blood
                has_trait = angel
                has_trait = dark_angel
                has_trait = archangel
                has_trait = dark_archangel
                has_trait = god_blood
                has_trait = demi_god
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = young_god_light
                has_trait = young_god_dark
            }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            add_trait = angel_blood
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_angel = {
    category = interaction_category_friendly
    desc = promote_to_angel_desc
    icon = angel
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = young_god_light
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = angel_blood
            NOT = { has_trait = angel }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = angel_blood
            add_trait = angel
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_dark_angel = {
    category = interaction_category_friendly
    desc = promote_to_dark_angel_desc
    icon = dark_angel
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = young_god_dark
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = angel_blood
            NOT = { has_trait = dark_angel }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = angel_blood
            add_trait = dark_angel
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_archangel = {
    category = interaction_category_friendly
    desc = promote_to_archangel_desc
    icon = archangel
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            has_trait = angel_full_god
            is_ai = no
        }
        scope:recipient = {
            has_trait = angel
            NOT = { has_trait = archangel }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = angel
            add_trait = archangel
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

promote_to_dark_archangel = {
    category = interaction_category_friendly
    desc = promote_to_dark_archangel_desc
    icon = dark_archangel
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            has_trait = fallen_god
            is_ai = no
        }
        scope:recipient = {
            has_trait = dark_angel
            NOT = { has_trait = dark_archangel }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = dark_angel
            add_trait = dark_archangel
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

#################################
#        ANGELS – Demotion      #
#################################

demote_from_archangel = {
    category = interaction_category_friendly
    desc = demote_from_archangel_desc
    icon = angel
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            has_trait = angel_full_god
            is_ai = no
        }
        scope:recipient = {
            has_trait = archangel
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = archangel
            add_trait = angel
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_dark_archangel = {
    category = interaction_category_friendly
    desc = demote_from_dark_archangel_desc
    icon = dark_angel
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            has_trait = fallen_god
            is_ai = no
        }
        scope:recipient = {
            has_trait = dark_archangel
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = dark_archangel
            add_trait = dark_angel
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_angel = {
    category = interaction_category_friendly
    desc = demote_from_angel_desc
    icon = angel_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = angel
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = angel
            add_trait = angel_blood
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_dark_angel = {
    category = interaction_category_friendly
    desc = demote_from_dark_angel_desc
    icon = angel_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = dark_angel
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = dark_angel
            add_trait = angel_blood
            trigger_event = angel_trait_mod.101
            trigger_event = angel_trait_mod.100
        }
    }
}

demote_from_angel_blood = {
    category = interaction_category_friendly
    desc = demote_from_angel_blood_desc
    icon = angel_blood
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            has_trait = angel_blood
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = angel_blood
            trigger_event = angel_trait_mod.101
        }
    }
}

increase_age_one = {
    category = interaction_category_friendly
    desc = increase_age_one_desc
    icon = give_years
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
    }
    
    on_accept = {
        scope:recipient = {
            change_age = 50
        }
    }
}

lower_age_one = {
    category = interaction_category_friendly
    desc = lower_age_one_desc
    icon = take_years
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
    }
    
    on_accept = {
        scope:recipient = {
            change_age = -50
        }
    }
}

increase_age_two = {
    category = interaction_category_friendly
    desc = increase_age_two_desc
    icon = give_years
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = { 
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = archangel
                has_trait = dark_archangel
                has_trait = young_god_light
                has_trait = young_god_dark
                has_trait = demi_god
                has_trait = angel
                has_trait = dark_angel
            }
            is_ai = no
        }
    }
    
    on_accept = {
        scope:recipient = {
            change_age = 25
        }
    }
}

lower_age_two = {
    category = interaction_category_friendly
    desc = lower_age_two_desc
    icon = take_years
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = { 
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = archangel
                has_trait = dark_archangel
                has_trait = young_god_light
                has_trait = young_god_dark
                has_trait = demi_god
                has_trait = angel
                has_trait = dark_angel
            }
            is_ai = no
        }
    }
    
    on_accept = {
        scope:recipient = {
            change_age = -25
        }
    }
}

#################################
#        Purge Divinity         #
#################################

purge_divinity = {
    category = interaction_category_friendly
    desc = purge_divinity_desc
    icon = purge_divinity
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            OR = {
                has_trait = angel_full_god
                has_trait = fallen_god
            }
            is_ai = no
        }
        scope:recipient = {
            OR = {
                has_trait = god_blood
                has_trait = demi_god
                has_trait = angel_full_god
                has_trait = fallen_god
                has_trait = angel_blood
                has_trait = angel
                has_trait = dark_angel
                has_trait = archangel
                has_trait = dark_archangel
                has_trait = young_god_light
                has_trait = young_god_dark
            }
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:recipient = {
            remove_trait = god_blood
            remove_trait = demi_god
            remove_trait = angel_full_god
            remove_trait = fallen_god
            remove_trait = angel_blood
            remove_trait = angel
            remove_trait = dark_angel
            remove_trait = archangel
            remove_trait = dark_archangel
            remove_trait = young_god_light
            remove_trait = young_god_dark
            remove_character_flag = become_full_god_light
            remove_character_flag = become_full_god_dark
            trigger_event = angel_trait_mod.101
        }
    }
}

#################################
#          Seer Event           #
#################################

force_seer = {
    category = interaction_category_friendly
    desc = force_seer_desc
    icon = magic_seer
    auto_accept = yes
    use_diplomatic_range = no
    ignores_pending_interaction_block = yes

    is_shown = {
        scope:actor = {
            has_character_modifier = seer_visits_mod
            is_ai = no
        }
    }

    is_valid = {
        always = yes
    }

    on_accept = {
        scope:actor = {
            add_character_modifier = seer_dreams_mod
            remove_character_modifier = seer_visits_mod
            trigger_event = magic_seer_event.0001
        }
    }
}
