﻿reform_polish_commonwealth_decision = {
    picture = {
        reference = "gfx/interface/illustrations/decisions/Poland_storng.dds"
    }
    decision_group_type = major
    ai_check_interval = 120
    desc = unite_the_e_polish_commonwealth_decision_desc

    is_shown = {
        culture = { has_cultural_pillar = heritage_west_slavic }
        NOT = {
            is_target_in_global_variable_list = {
                name = unavailable_unique_decisions
            }
        }
    }

    is_valid = {
        culture = { has_cultural_pillar = heritage_west_slavic }
        OR = {
            AND = {
                has_title = title:k_poland
                has_title = title:k_lithuania
                OR = {
                    custom_description = {
                        text = unite_the_e_polish_commonwealth_tt_1
                        OR = {
                            has_primary_title = title:k_poland
                            has_primary_title = title:k_lithuania
                        }
                    }
                    custom_description = {
                        text = unite_the_e_polish_commonwealth_decision_tt_2
                        AND = {
                            highest_held_title_tier = tier_empire
                            OR = {
                                has_primary_title = title:k_poland
                                has_primary_title = title:k_lithuania
                            }
                        }
                    }
                }
            }
        }
    }

    is_valid_showing_failures_only = {
        is_landed = yes
    }

    effect = {
        show_as_tooltip = {
            form_polish_commonwealth_scripted_effect = yes
        }
        save_scope_as = e_polish_commonwealth_uniter
        trigger_event = reform_polish_commonwealth_decision.0002
        hidden_effect = {
            add_to_global_variable_list = {
                name = unavailable_unique_decisions
            }
        }
    }
    ai_potential = {
        always = yes
    }
    ai_will_do = {
        base = 100
    }
}
