﻿je_cristo_redentor = {
    icon = "gfx/interface/icons/event_icons/event_portrait.dds"

	group = je_group_historical_content
    
    is_shown_when_inactive = {
		has_technology_researched = reinforced_concrete
        country_has_primary_culture = cu:brazilian
        any_scope_state = {
            state_region = s:STATE_RIO_DE_JANEIRO
        }
		has_dlc_feature = rp1_content
    }
    possible = {
		has_technology_researched = pneumatic_tools
		has_technology_researched = reinforced_concrete
        country_has_primary_culture = cu:brazilian
        any_scope_state = {
            state_region = s:STATE_RIO_DE_JANEIRO
        }
        NOT = { has_law = law_type:law_state_atheism }
    }
    immediate = {
        random_scope_state = {
            limit = {
                state_region = s:STATE_RIO_DE_JANEIRO
            }
            save_scope_as = rio_state
        }
        ig:ig_devout = {
           save_scope_as = devout_ig
        }
        trigger_event = { id = cristo_redentor.1 popup = yes }
    }
    complete = {
        s:STATE_RIO_DE_JANEIRO.region_state:BRZ = {
			any_scope_building = {
				is_building_type = building_cristo_redentor
                trigger_if = {
                    limit = {
                        has_game_rule = allow_monument_effects
                    }
                    occupancy >= 0.5
                }
			}
        }
    }
    on_complete = {
        trigger_event = { id = cristo_redentor.2 popup = yes }
    }
    invalid = {
        OR = {
            NOT = {
                any_scope_state = {
                    state_region = s:STATE_RIO_DE_JANEIRO
                }
            }
            has_law = law_type:law_state_atheism
            has_variable = cristo_redentor_rejected
        }
    }

    weight = 1000

    should_be_pinned_by_default = yes
}