﻿je_dravidian_movement = {
    icon = "gfx/interface/icons/event_icons/waving_flag.dds"

	group = je_group_historical_content
    
    is_shown_when_inactive = {
        has_dlc_feature = ip2_content
        has_social_hierarchy = british_indian_caste_system
        c:BIC ?= this
        NOT = { has_law = law_type:law_affirmative_action }
    }
    
    possible = {
        has_technology_researched = human_rights
        NOT = { has_law = law_type:law_affirmative_action }
    }
    
    immediate = {
        ig:ig_rural_folk = {
            save_scope_as = rural_folk_ig
        }
        trigger_event = { id = caste_conflict.1 popup = yes }
    }
    
    complete = {
        AND = {
            ig:ig_rural_folk = {
                OR = {
                    is_in_government = yes
                    is_powerful = yes
                }
            }
            OR = {
                has_law = law_type:law_hindu_caste_not_enforced
                has_law = law_type:law_affirmative_action
            }
        }

    }
   
    on_complete = {
        trigger_event = { id = caste_conflict.2 popup = yes }
    }

    fail = {
        AND = {
            ig:ig_rural_folk = {
                is_marginal = yes
            }
            OR = {
                custom_tooltip = {
                    text = dravidian_movement_fail_tt
                    has_variable = india_home_rule
                }
                is_subject = no

            }
            OR = {
                has_law = law_type:law_hindu_caste_enforced
                has_law = law_type:law_hindu_caste_codified
            }
        }
    }

    on_fail = {
        hidden_effect = {
            trigger_event = { id = caste_conflict.3 }
        }

    }
   
    invalid = {
        NOT = {
            has_social_hierarchy = british_indian_caste_system
        }
    }

    on_monthly_pulse = {
        random_events = {
            100 = 0
            10 = caste_conflict.4 # The Non-Brahmin Manifesto
            10 = caste_conflict.5 # Untouchables and Outcasts
        }
    }

    weight = 1000

    should_be_pinned_by_default = yes
}