mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-12-01 16:51:24 +00:00
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:
parent
a7c9072048
commit
e7e93121c6
2 changed files with 5 additions and 7 deletions
|
@ -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);
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue