namespace = thanos_snap

thanos_snap.0001 = {
    id = thanos_snap.1
    title = Thanos_Snap_Event_Title
    desc = Thanos_Snap_Event_desc

    is_triggered_only = yes

	left_portrait = {
		character = root
		animation = worry
	}

    immediate = {
        every_living_character = {
            if = {
                limit = {
                    is_ai = yes
                }
                # Kill the character if the random check passes
                random = {
                    chance = 50
                    death = { death_reason = "Thanos snapped" }
                }
            }
        }
    }

    option = {
        name = Thanos_Snap_Event_close  # Button text
        hidden_effect = {
            clr_character_flag = thanos_snap.1  # Clear flag to prevent event from firing again
            end_effective_event = thanos_snap.1  # End the event
        }
    }
}
