﻿
quarterly_playable_pulse = {
	on_actions = {
		gpt_vassal_debuff
    }
}

on_game_start_after_lobby = { 
	on_actions = {
		gpt_vassal_debuff_on_game_start
	}
}

gpt_vassal_debuff_on_game_start = {
	trigger = {
		has_game_rule = GPT_balance_enabled
	}
	effect = {
		every_ruler = {
			if = {
				limit = {
					government_has_flag = government_is_feudal
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_feudal_vassal days = 121 }
			}
			if = {
				limit = {
					government_has_flag = government_is_clan
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_clan_vassal days = 121 }
			}
			if = {
				limit = {
					OR = {
						government_has_flag = government_is_administrative
						government_has_flag = government_has_treasury
					}
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_adm_vassal days = 121 }
			}
			if = {
				limit = {
					government_has_flag = government_is_tribal
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_tribal_vassal days = 121 }
			}
			if = {
				limit = {
					government_has_flag = government_is_nomadic
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_nomadic_vassal days = 121 }
			}
			if = {
				limit = {
					government_has_flag = government_is_republic
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_republic_vassal days = 121 }
			}
			if = {
				limit = {
					government_has_flag = government_is_theocracy
					highest_held_title_tier >= 2
					is_landed = yes
					is_independent_ruler = no
					is_tributary = no
				}
				add_character_modifier = { modifier = gpt_theocratic_vassal days = 121 }
			}
		}
	}
}

gpt_vassal_debuff = {
		trigger = {
		has_game_rule = GPT_balance_enabled
        is_landed = yes
		is_landless_adventurer = no
		is_independent_ruler = no
		is_tributary = no
		highest_held_title_tier >= 2
	}
	effect = {
	 #	if = {
	 #		limit = {
	 #			OR = {
	 #				is_independent_ruler = yes
	 #				is_tributary = yes
	 #			}
	 #		}
	 #		if = { limit = { has_character_modifier = gpt_feudal_vassal } remove_character_modifier = gpt_feudal_vassal }
	 #		if = { limit = { has_character_modifier = gpt_clan_vassal } remove_character_modifier = gpt_clan_vassal }
	 #		if = { limit = { has_character_modifier = gpt_adm_vassal } remove_character_modifier = gpt_adm_vassal }
	 #		if = { limit = { has_character_modifier = gpt_tribal_vassal } remove_character_modifier = gpt_tribal_vassal }
	 #		if = { limit = { has_character_modifier = gpt_nomadic_vassal } remove_character_modifier = gpt_nomadic_vassal }
	 #		if = { limit = { has_character_modifier = gpt_republic_vassal } remove_character_modifier = gpt_republic_vassal }
	 #		if = { limit = { has_character_modifier = gpt_theocratic_vassal } remove_character_modifier = gpt_theocratic_vassal }
	 #	}
		if = {
			limit = {
				government_has_flag = government_is_feudal
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_feudal_vassal days = 121 }
		}
		if = {
			limit = {
				government_has_flag = government_is_clan
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_clan_vassal days = 121 }
		}
		if = {
			limit = {
				government_has_flag = government_is_administrative
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_adm_vassal days = 121 }
		}
		if = {
			limit = {
				government_has_flag = government_is_tribal
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_tribal_vassal days = 121 }
		}
		if = {
			limit = {
				government_has_flag = government_is_nomadic
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_nomadic_vassal days = 121 }
		}
		if = {
			limit = {
				government_has_flag = government_is_republic
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_republic_vassal days = 121 }
		}
		if = {
			limit = {
				government_has_flag = government_is_theocracy
				is_independent_ruler = no
				is_tributary = no
			}
			add_character_modifier = { modifier = gpt_theocratic_vassal days = 121 }
		}
	}
}