require "Insurgent/InsurgentTraitDefinitions"

CqcSpecialistTrait = CreateInsurgentTrait()
CqcSpecialistTrait.name = "CQCSpecialist"
CqcSpecialistTrait.insurgentExclusive = true

function CqcSpecialistTrait.Create()
    local cqcspecialist = TraitFactory.addTrait("CQCSpecialist", getText("UI_trait_CQCSpecialist"), 4, getText("UI_trait_CQCSpecialistDesc"), false, false)
	cqcspecialist:addXPBoost(Perks.SmallBlade, 3)
	cqcspecialist:addXPBoost(Perks.SmallBlunt, 3)
    cqcspecialist:addXPBoost(Perks.LongBlade, 3)
    cqcspecialist:addXPBoost(Perks.Blunt, 3)
    cqcspecialist:addXPBoost(Perks.Maintenance, 2)
    return cqcspecialist
end

function CqcSpecialistTrait.OnNewGame(player)
    if player:HasTrait("CQCSpecialist") then
        local inv = player:getInventory();
        inv:AddItems("Base.Machete", 1);			
    end
end

function CqcSpecialistTrait.RegisterEvents()
    Events.OnNewGame.Add(CqcSpecialistTrait.OnNewGame)
end