#################
# U10. The Great Work
# Taking the perk starts the empire situation apb_situation_great_work
# (four stages; a wing choice after each of the first three; a permanent
# capital modifier at the end; no fail state).
# Situation: common/situations/apb_great_work_situations.txt
# Events:    events/apb_great_work_events.txt (namespace apb_greatwork)
# Effects:   common/scripted_effects/apb_great_work_effects.txt
# Modifiers: common/static_modifiers/apb_great_work_modifiers.txt
#
# The situation is started by a hidden country event one day after the perk
# is taken (vanilla never calls start_situation from a perk's on_enabled).
#################

ap_great_work = {
	potential = {
		NOT = {
			has_ascension_perk = ap_great_work
		}
		is_nomadic = no
	}
	possible = {
		custom_tooltip = {
			fail_text = "requires_ascension_perks_2"
			num_ascension_perks > 1
		}
	}
	on_enabled = {
		custom_tooltip = ap_great_work_tooltip
		hidden_effect = {
			country_event = {
				id = apb_greatwork.1
				days = 1
			}
		}
	}
	ai_weight = {
		factor = 2
		modifier = {
			factor = 1.5
			OR = {
				is_pacifist = yes
				is_spiritualist = yes
			}
		}
	}
}
