﻿#EK NOTE: perks grant xp on unlock for certain cultures

bellum_justum_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 2 0 }
	icon = node_martial
	
	auto_selection_weight = {
		value = 11
		if = {
			limit = {
				has_education_martial_trigger = yes
			}
			add = 1989
		}
		if = {
			limit = {
				has_focus = martial_strategy_focus
			}
			multiply = 5
		}
		if = {
			limit = {
				can_start_new_lifestyle_tree_trigger = no
			}
			multiply = 0
		}
		if = { # Conquerors go for the best stuff for war!
			limit = {
				ai_has_conqueror_personality = yes
			}
			add = 10000
		}
	}
	
	effect = {
		custom_description_no_bullet = {
			text = bellum_justum_effect
		}
		#EK ADDITION: xp for unlocking perk
		if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
	}
}

parthian_tactics_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 0 1.25 }
	icon = node_martial
	
	#EK EDIT: renames
	name = { desc = parthian_tactics_perk_altenate_name }
	
	parent = bellum_justum_perk
	
	character_modifier = {
		light_cavalry_pursuit_mult = 0.2
		light_cavalry_toughness_mult = 0.3
		heavy_cavalry_pursuit_mult = 0.2
		heavy_cavalry_toughness_mult = 0.3
		camel_cavalry_pursuit_mult = 0.2
		camel_cavalry_toughness_mult = 0.3
		elephant_cavalry_pursuit_mult = 0.2
		elephant_cavalry_toughness_mult = 0.3
		archer_cavalry_pursuit_mult = 0.2
		archer_cavalry_toughness_mult = 0.2
		trait_track_horse_xp_gain_mult = 0.1
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


envelopment_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 0 2.5 }
	icon = node_martial
	
	parent = parthian_tactics_perk
	
	character_modifier = {
		counter_efficiency = 0.25
		trait_track_wit_xp_gain_mult = 0.1
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


organized_retreat_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 2 1.25 }
	icon = node_martial
	
	parent = bellum_justum_perk
	
	character_modifier = {
		movement_speed = 0.15
		character_travel_speed_mult = 0.25
		heavy_infantry_screen_mult = 0.25
		pikemen_screen_mult = 0.25
		archers_screen_mult = 0.25
		skirmishers_screen_mult = 0.25
		spellblades_screen_mult = 0.25 # EK Addition
		mages_screen_mult = 0.25 # EK Addition
	}
	
	government_character_modifier = {
		flag = government_is_nomadic
		nomadic_horde_screen_mult = 0.25
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


hit_and_run_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 2 2.5 }
	icon = node_martial
	
	parent = organized_retreat_perk
	
	character_modifier = {
		retreat_losses = -0.25
		pikemen_toughness_mult = 0.3
		archers_damage_mult = 0.3
		heavy_infantry_toughness_mult = 0.15
		heavy_infantry_damage_mult = 0.15
		skirmishers_damage_mult = 0.2
		skirmishers_toughness_mult = 0.1
		spellblades_damage_mult = 0.2 # EK ADDITION
		spellblades_toughness_mult = 0.1 # EK ADDITION
		mages_damage_mult = 0.3 # EK ADDITION
		trait_track_bow_xp_gain_mult = 0.1
	}
	
	government_character_modifier = {
		flag = government_is_nomadic
		nomadic_horde_toughness_mult = 0.2
		nomadic_horde_damage_mult = 0.2
	}
	
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


engineered_for_destruction_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 4 1.25 }
	icon = node_martial
	
	parent = bellum_justum_perk
	
	character_modifier = {
		siege_weapon_siege_value_mult = 0.4
		naval_movement_speed_mult = 0.25
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


living_off_the_land_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 4 2.5 }
	icon = node_martial
	
	parent = engineered_for_destruction_perk
	
	government_character_modifier = {
		flag = government_is_landless_adventurer
		invert_check = yes
		raid_speed = 0.25
	}
	
	government_character_modifier = {
		flag = government_is_landless_adventurer
		provisions_loss_mult = -0.1
	}
	
	character_modifier = {
		supply_capacity_mult = 2
		character_travel_safety_mult = 0.25
	}
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


sappers_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 2 3.75 }
	icon = node_martial
	
	parent = envelopment_perk
	parent = hit_and_run_perk
	parent = living_off_the_land_perk
	
	character_modifier = {
		heavy_infantry_siege_value_add = 0.1
		pikemen_siege_value_add = 0.1
		archers_siege_value_add = 0.1
		skirmishers_siege_value_add = 0.1
		spellblades_siege_value_add = 0.1 # EK ADDITION
		mages_siege_value_add = 0.1 # EK ADDITION
	}
	
	government_character_modifier = {
		flag = government_is_nomadic
		light_cavalry_siege_value_add = 0.1
		archer_cavalry_siege_value_add = 0.1
	}
	
	effect = {
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 330
        }
    }
}


strategist_perk = {
	lifestyle = martial_lifestyle
	tree = strategy
	position = { 2 5 }
	icon = trait_strategist
	
	parent = sappers_perk
	
	trait = strategist
	effect = {
		add_trait_force_tooltip = strategist
		#EK ADDITION: xp for unlocking perk
        if = {
            limit = { culture = { has_cultural_parameter = strategist_xp_rebate } }
            add_martial_lifestyle_xp = 500
        }
	}
}
