﻿diplomacy_effect = {
	if = {
		limit = {
			is_landed = yes
			NOT = {
			has_trait = lifestyle_completionist
			}
		}
 		lifestyle_completionist_set_up_effects = yes
	}
	else_if = {
		limit = {
			AND= {
				has_trait = lifestyle_completionist
				has_trait_xp = {
					trait = lifestyle_completionist
					track = diplomacy
					value <= 99
				}
			}
			is_landed = yes
		}
		diplomacy_xp_effects = yes
	}
}

intrigue_effect = {
    if = {
        limit = {
        is_landed = yes
                NOT = {
                    has_trait = lifestyle_completionist
                }
	}
        lifestyle_completionist_set_up_effects = yes
    }
    else_if = {
        limit = {
            AND= {
            has_trait = lifestyle_completionist
            has_trait_xp = {
                trait = lifestyle_completionist
                track = intrigue
                value <= 99
                }
            }
            is_landed = yes
        }
        intrigue_xp_effects = yes
    }
}

learning_effect = {
    if = {
        limit = {
        is_landed = yes
                NOT = {
                    has_trait = lifestyle_completionist
                }
	}
        lifestyle_completionist_set_up_effects = yes
    }
    else_if = {
        limit = {
            AND= {
            has_trait = lifestyle_completionist
            has_trait_xp = {
                trait = lifestyle_completionist
                track = learning
                value <= 99
                }
            }
            is_landed = yes
        }
        learning_xp_effects = yes
    }
}

martial_effect = {
    if = {
        limit = {
        is_landed = yes
                NOT = {
                    has_trait = lifestyle_completionist
                }
	}
        lifestyle_completionist_set_up_effects = yes
    }
    else_if = {
        limit = {
            AND= {
            has_trait = lifestyle_completionist
            has_trait_xp = {
                trait = lifestyle_completionist
                track = martial
                value <= 99
                }
            }
            is_landed = yes
        }
        martial_xp_effects = yes
    }
}

stewardship_effect = {
    if = {
        limit = {
        is_landed = yes
                NOT = {
                    has_trait = lifestyle_completionist
                }
	}
        lifestyle_completionist_set_up_effects = yes
    }
    else_if = {
        limit = {
            AND= {
            has_trait = lifestyle_completionist
            has_trait_xp = {
                trait = lifestyle_completionist
                track = stewardship
                value <= 99
                }
            }
            is_landed = yes
        }
        stewardship_xp_effects = yes
    }
}

wanderer_effect = {
	if = {
		limit = {
			is_landed = yes
			NOT = { has_trait = lifestyle_completionist }
		}
		lifestyle_completionist_set_up_effects = yes
	}
	else_if = {
		limit = {
			AND= {
				has_trait = lifestyle_completionist
				has_trait_xp = {
					trait = lifestyle_completionist
					track = wanderer
					value <= 99
				}
			}
			is_landed = yes
		}
		wanderer_xp_effects = yes
	}
}

lifestyle_completionist_set_up_effects = {
    add_trait = lifestyle_completionist
}

diplomacy_xp_effects = {
	if = {
		limit = {
			OR = {
				is_travelling = yes
				is_married = no
			}
		}
		add_trait_xp = {
			trait = lifestyle_completionist
			track = diplomacy
			value = {
            		integer_range = {
					min = -1
					max = 3
				}
			}
		}
	}
	else = {
		add_trait_xp = {
			trait = lifestyle_completionist
			track = diplomacy
			value = {
            		integer_range = {
					min = -1
					max = 4
				}
			}
		}
	}
}

intrigue_xp_effects = {
	if = {
		limit = {
			OR = {
				is_travelling = yes
				is_married = no
			}
		}
		add_trait_xp = {
			trait = lifestyle_completionist
			track = intrigue
			value = {
            		integer_range = {
					min = -1
					max = 3
				}
			}
		}
	}
	else = {
		add_trait_xp = {
			trait = lifestyle_completionist
			track = intrigue
			value = {
            		integer_range = {
					min = -1
					max = 4
				}
			}
		}
	}
}

learning_xp_effects = {
	if = {
		limit = {
			OR = {
				is_travelling = yes
				is_married = no
			}
		}
		add_trait_xp = {
			trait = lifestyle_completionist
			track = learning
			value = {
            		integer_range = {
					min = -1
					max = 3
				}
			}
		}
	}
	else = {
		add_trait_xp = {
			trait = lifestyle_completionist
			track = learning
			value = {
            		integer_range = {
					min = -1
					max = 4
				}
			}
		}
	}
}

martial_xp_effects = {
	if = {
		limit = {
			OR = {
				is_travelling = yes
				is_married = no
			}
		}
		add_trait_xp = {
			trait = lifestyle_completionist
			track = martial
			value = {
            		integer_range = {
					min = -1
					max = 3
				}
			}
		}
	}
	else = {
		add_trait_xp = {
			trait = lifestyle_completionist
			track = martial
			value = {
            		integer_range = {
					min = -1
					max = 4
				}
			}
		}
	}
}

stewardship_xp_effects = {
	if = {
		limit = {
			OR = {
				is_travelling = yes
				is_married = no
			}
		}
		add_trait_xp = {
			trait = lifestyle_completionist
			track = stewardship
			value = {
            		integer_range = {
					min = -1
					max = 3
				}
			}
		}
	}
	else = {
		add_trait_xp = {
			trait = lifestyle_completionist
			track = stewardship
			value = {
            		integer_range = {
					min = -1
					max = 4
				}
			}
		}
	}
}

wanderer_xp_effects = {
	if = {
		limit = {
			OR = {
				is_travelling = yes
				is_married = no
			}
		}
		add_trait_xp = {
			trait = lifestyle_completionist
			track = wanderer
			value = {
            		integer_range = {
					min = -1
					max = 3
				}
			}
		}
	}
	else = {
		add_trait_xp = {
			trait = lifestyle_completionist
			track = wanderer
			value = {
            		integer_range = {
					min = -1
					max = 4
				}
			}
		}
	}
}
