Changed picking system back to 1-2-2-... eventually theyll realise theres no such thing as balanced teams... until then :) (#140)

Also removed empty socket.on('disconnect' callback
This commit is contained in:
ArturPhilibin 2019-05-28 21:45:03 +01:00 committed by Absurdon
parent a7c9072048
commit e7e93121c6
2 changed files with 5 additions and 7 deletions

View file

@ -233,10 +233,6 @@ module.exports = function (namespace) {
refreshGather(data.type); refreshGather(data.type);
}); });
socket.on("disconnect", function () {
});
socket.on("gather:vote", function (data) { socket.on("gather:vote", function (data) {
if (!data) data = {}; if (!data) data = {};
const gatherManager = GatherPool.get(data.type); const gatherManager = GatherPool.get(data.type);

View file

@ -266,17 +266,19 @@ Gather.prototype.pickingTurn = function () {
const alienCount = this.aliens().length; const alienCount = this.aliens().length;
const marineCount = this.marines().length; const marineCount = this.marines().length;
const alreadyPickedCount = (marineCount + alienCount) - captainCount; const alreadyPickedCount = (marineCount + alienCount) - captainCount;
const pickingPattern = [ // 1-1-1-2-1-1-2-1 const pickingPattern = [ // 1-2-2-2-2-2-1
"marine",
"alien",
"marine", "marine",
"alien", "alien",
"alien", "alien",
"marine", "marine",
"marine",
"alien",
"alien", "alien",
"marine", "marine",
"marine", "marine",
"alien", "alien",
"alien",
"marine",
]; ];
const pickingTurn = alreadyPickedCount % pickingPattern.length; const pickingTurn = alreadyPickedCount % pickingPattern.length;