﻿# Commander+ 1.20 compatibility rebase on exact CK3 1.20.0 vanilla.
commander_trait_lvling_ai_effect = {
	save_scope_as = root_scope
	random_list = {
		1 = {
			trigger = { has_trait = logistician }
			add_trait_xp = {
				trait = logistician
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(logistician)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = military_engineer }
			add_trait_xp = {
				trait = military_engineer
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(military_engineer)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = aggressive_attacker }
			add_trait_xp = {
				trait = aggressive_attacker
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(aggressive_attacker)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = unyielding_defender }
			add_trait_xp = {
				trait = unyielding_defender
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(unyielding_defender)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = forder }
			add_trait_xp = {
				trait = forder
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(forder)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = flexible_leader }
			add_trait_xp = {
				trait = flexible_leader
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(flexible_leader)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = desert_warrior }
			add_trait_xp = {
				trait = desert_warrior
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(desert_warrior)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = jungle_stalker }
			add_trait_xp = {
				trait = jungle_stalker
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(jungle_stalker)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = reaver }
			add_trait_xp = {
				trait = reaver
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(reaver)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = reckless }
			add_trait_xp = {
				trait = reckless
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(reckless)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = holy_warrior }
			add_trait_xp = {
				trait = holy_warrior
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(holy_warrior)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = open_terrain_expert }
			add_trait_xp = {
				trait = open_terrain_expert
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(open_terrain_expert)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = rough_terrain_expert }
			add_trait_xp = {
				trait = rough_terrain_expert
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(rough_terrain_expert)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = forest_fighter }
			add_trait_xp = {
				trait = forest_fighter
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(forest_fighter)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = cautious_leader }
			add_trait_xp = {
				trait = cautious_leader
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(cautious_leader)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = organizer }
			add_trait_xp = {
				trait = organizer
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(organizer)"
					divide = 100
				}
			}
		}
		1 = {
			trigger = { has_trait = winter_soldier }
			add_trait_xp = {
				trait = winter_soldier
				value = {
					value = 100
					subtract = "scope:root_scope.has_trait_xp(winter_soldier)"
					divide = 100
				}
			}
		}
		# Commander+ 1.20 - grouped extension
		29 = {
			trigger = { cmd_plus_has_new_commander_trait = yes }
			cmd_plus_commander_trait_lvling_ai_effect = yes
		}
	}
}
