--Once the player has ten thousand gold in the back,
--it the cost maxes out at 500.
function p.get_keepammo_cost()
    local gold = ga_get_i("xar.player.gold.amount")
    local value1 = math.floor( gold * 0.08 ) --8% of gold.
    local value2 = 400
    local value3 = math.min(value1, value2)
    return math.max(value3, 30)
end
