const rand = require('./rand')
const {
    weaponshop,
    weapons,
    equipment,
} = global.config
const fs = require('fs');

module.exports = () => {
        let weaponId = []
        let equipId = []
        let drop = 1
        let counter = 5
        for (i = 0; i < 5; i++) {
            drop = weaponId.push(rand(1, 10))
        }
        for (i = 0; i < 5; i++) {
            drop = equipId.push(rand(1, 10))
        }
        for (i = 0; i < 5; i++) {
            weaponshop[i] = weapons[weaponId[i]]
        }
        for (i = 0; i < 5; i++) {
            weaponshop[counter] = equipment[equipId[i]]
            counter++
        }
        fs.writeFileSync('json/weaponshop.json', JSON.stringify(weaponshop, null, "\t"))
}