📅  最后修改于: 2022-03-11 15:03:41.837000             🧑  作者: Mango
var count = Object.keys(Game.creeps).reduce(function(p, c, i, a) {return p + (Game.creeps[c].memory.role == "aRole" ? 1 : 0)}, 0)