﻿# More Doctrines for CK3 1.20 (converted from the 1.19 version, see pr_dev issue #191).
# Vanilla doctrines are no longer overridden (vanilla 1.20 applies), except doctrine_monogamy, which adds the
# switching costs from Bigamy/Trigamy. Each doctrine names its group (doctrine_group_type) and index.

# Vanilla 1.20 doctrine_monogamy plus the switching costs from Bigamy/Trigamy/Polygamy (More Doctrines)
doctrine_monogamy = {
	doctrine_group_type = doctrine_marriage_type
	index = 0
	divergence = 0

	piety_cost = {
		value = faith_doctrine_cost_mid
		if = {
			limit = { rite_has_doctrine = doctrine_monogamy }
			multiply = faith_unchanged_doctrine_cost_mult
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_bigamy }
			multiply = faith_changed_doctrine_cost_mult_two_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_trigamy }
			multiply = faith_changed_doctrine_cost_mult_three_step
		}
		else_if = {
			limit = { rite_has_doctrine = doctrine_polygamy }
			multiply = faith_changed_doctrine_cost_mult_four_step
		}
	}
	parameters = {
		doctrine_monogamy
		marriage_event
	}
	special_parameters = {
		number_of_spouses = 1
	}
}

doctrine_bigamy = {
	doctrine_group_type = doctrine_marriage_type
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_mid
        if = {
            limit = { rite_has_doctrine = doctrine_bigamy }
            multiply = faith_unchanged_doctrine_cost_mult
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_monogamy }
            multiply = faith_changed_doctrine_cost_mult_two_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_trigamy }
            multiply = faith_changed_doctrine_cost_mult_two_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_polygamy }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
    }
	parameters = {
		spouse_piety_loss = yes
	}
	special_parameters = {
		number_of_spouses = 2
	}
}

doctrine_trigamy = {
	doctrine_group_type = doctrine_marriage_type
	index = 4
    piety_cost = {
        value = faith_doctrine_cost_mid
        if = {
            limit = { rite_has_doctrine = doctrine_trigamy }
            multiply = faith_unchanged_doctrine_cost_mult
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_bigamy }
            multiply = faith_changed_doctrine_cost_mult_two_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_polygamy }
            multiply = faith_changed_doctrine_cost_mult_two_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_monogamy }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
    }
	parameters = {
		spouse_piety_loss = yes
	}
	special_parameters = {
		number_of_spouses = 3
	}
}

doctrine_sacred_marriage = {
	doctrine_group_type = doctrine_stance_on_marriage
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_mid
        if = {
            limit = { rite_has_doctrine = doctrine_sacred_marriage }
            multiply = faith_unchanged_doctrine_cost_mult
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_none_marriage }
            multiply = faith_changed_doctrine_cost_mult_two_step
        }
    }
}

doctrine_worldly_marriage = {
	doctrine_group_type = doctrine_stance_on_marriage
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_mid
        if = {
            limit = { rite_has_doctrine = doctrine_worldly_marriage }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
}

doctrine_none_marriage = {
	doctrine_group_type = doctrine_stance_on_marriage
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_mid
        if = {
            limit = { rite_has_doctrine = doctrine_none_marriage }
            multiply = faith_unchanged_doctrine_cost_mult
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_sacred_marriage }
            multiply = faith_changed_doctrine_cost_mult_two_step
        }
    }
}

doctrine_henotheistic = {	#One, may be more
	doctrine_group_type = doctrine_theism
	index = 2
    icon = "doctrine_henotheistic"
    piety_cost = {
        value = faith_doctrine_cost_high
        #value = faith_doctrine_cost_low
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_henotheistic }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_ditheistic = {	#Only Two
	doctrine_group_type = doctrine_theism
	index = 3
    icon = "doctrine_ditheistic"
    piety_cost = {
        value = faith_doctrine_cost_high
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_ditheistic  }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_dihenotheistic = {	#Two, may be more
	doctrine_group_type = doctrine_theism
	index = 4
    icon = "doctrine_dihenotheistic"
    piety_cost = {
        value = faith_doctrine_cost_high
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_dihenotheistic }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_tritheistic = {	#Only Three
	doctrine_group_type = doctrine_theism
	index = 5
    icon = "doctrine_tritheistic"
    piety_cost = {
        value = faith_doctrine_cost_high
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_tritheistic }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_trihenotheistic = {	#Three, may be more
	doctrine_group_type = doctrine_theism
	index = 6
    icon = "doctrine_trihenotheistic"
    piety_cost = {
        value = faith_doctrine_cost_high
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_trihenotheistic }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_kathenotheistic = {	#Many, but one is worshipped at a time
	doctrine_group_type = doctrine_theism
	index = 7
    icon = "doctrine_kathenotheistic"
    piety_cost = {
        value = faith_doctrine_cost_high
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_kathenotheistic }
            multiply = faith_unchanged_doctrine_cost_mult
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = hostile
		}
	}
}

doctrine_agnostic = {	#No Gods, but there may be one
	doctrine_group_type = doctrine_theism
	index = 8
    icon = "doctrine_agnostic"
    piety_cost = {
        #value = faith_doctrine_cost_mid
        value = faith_doctrine_cost_high
        if = {
            limit = { rite_has_doctrine = abrahamic_hostility_doctrine }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
        else_if = {
            limit = { rite_has_doctrine = doctrine_agnostic }
            multiply = faith_changed_doctrine_cost_mult_three_step
        }
    }
	special_parameters = {
		hostility_levels = {
			unrelated = evil
		}
	}
}

doctrine_ethereal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_immortal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_ethereal_immortal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_aeonic = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_spiritual = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 4
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_personal = {
	doctrine_group_type = doctrine_nature_of_godhood
	index = 5
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_theistic_creation = {
	doctrine_group_type = doctrine_cosmology
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_eternal = {
	doctrine_group_type = doctrine_cosmology
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_cyclic = {
	doctrine_group_type = doctrine_cosmology
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_dualistic = {
	doctrine_group_type = doctrine_cosmology
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
    can_pick = {
        custom_description = {
            text = incompatible_doctrine_dualistic_ditheistic_trigger
            OR = {
                doctrine:doctrine_dihenotheistic = { is_in_list = selected_doctrines }
                doctrine:doctrine_ditheistic = { is_in_list = selected_doctrines }
            }
        }
    }
}

doctrine_chaos_into_world = {
	doctrine_group_type = doctrine_cosmology
	index = 4
    piety_cost = {
        value = faith_doctrine_cost_mid
    }
    can_pick = {
        custom_description = {
            text = incompatible_doctrine_chaos_into_world_polytheistic_trigger
            NOR = {
                doctrine:doctrine_monotheist = { is_in_list = selected_doctrines }
                doctrine:doctrine_henotheistic = { is_in_list = selected_doctrines }
                doctrine:doctrine_agnostic = { is_in_list = selected_doctrines }
            }
        }
    }
}

doctrine_demigods = {
	doctrine_group_type = doctrine_deities
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_archangels = {
	doctrine_group_type = doctrine_deities
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_aspects = {
	doctrine_group_type = doctrine_deities
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_spirits = {
	doctrine_group_type = doctrine_deities
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_deities_none = {
	doctrine_group_type = doctrine_deities
	index = 4
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_prophets = {
	doctrine_group_type = doctrine_divine_guidance
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_anointed_deliverer = {
	doctrine_group_type = doctrine_divine_guidance
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_gurus = {
	doctrine_group_type = doctrine_divine_guidance
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_avatars = {
	doctrine_group_type = doctrine_divine_guidance
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_enlightened_monks = {
	doctrine_group_type = doctrine_divine_guidance
	index = 4
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_divine_guidance_none = {
	doctrine_group_type = doctrine_divine_guidance
	index = 5
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_apocalypse = {
	doctrine_group_type = doctrine_eschatology
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_judgement_day = {
	doctrine_group_type = doctrine_eschatology
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_promised_deliverer = {
	doctrine_group_type = doctrine_eschatology
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_eschatology_none = {
	doctrine_group_type = doctrine_eschatology
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_paradise = {
	doctrine_group_type = doctrine_thanatology
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_underworld = {
	doctrine_group_type = doctrine_thanatology
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_paradise_and_underworld = {
	doctrine_group_type = doctrine_thanatology
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_eternal_feast = {
	doctrine_group_type = doctrine_thanatology
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_paramount = {
	doctrine_group_type = doctrine_prayer
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_obligatory = {
	doctrine_group_type = doctrine_prayer
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_recommended = {
	doctrine_group_type = doctrine_prayer
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_autonomous = {
	doctrine_group_type = doctrine_prayer
	index = 3
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_mandatory_atone = {
	doctrine_group_type = doctrine_atonement
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_encouraged_atone = {
	doctrine_group_type = doctrine_atonement
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_atonement_none = {
	doctrine_group_type = doctrine_atonement
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_mandatory_alms = {
	doctrine_group_type = doctrine_almsgiving
	index = 0
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_encouraged_alms = {
	doctrine_group_type = doctrine_almsgiving
	index = 1
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}

doctrine_almsgiving_none = {
	doctrine_group_type = doctrine_almsgiving
	index = 2
    piety_cost = {
        value = faith_doctrine_cost_low
    }
}
