part2

189 阅读1分钟

part2

objList.forEach(function(item, index, objList) {
        power += item.fee;
        Object.keys(count).forEach(function(key) {
            if(key === item.career || key === item.race) {
                count[key]++;
            }
        })
    })
    for(let i in count) {
        if(i === 'purgatory' && count[i] === 3) {
            power += 4;
        }else if(i === "purgatory" && count[i] === 6) {
            power += 8;
        }else if(i === "dark" && count[i] === 2) {
            power += 2;
        }else if(i === "dark" && count[i] === 4) {