yolkbot 0.1.0-alpha.49 → 0.1.0-alpha.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "yolkbot",
3
3
  "description": "create a shell shockers (self) bot in under 10 lines.",
4
- "version": "0.1.0-alpha.49",
4
+ "version": "0.1.0-alpha.50",
5
5
  "keywords": [
6
6
  "shell shockers",
7
7
  "shellshock.io",
package/src/bot.js CHANGED
@@ -1026,7 +1026,6 @@ export class Bot {
1026
1026
  }
1027
1027
 
1028
1028
  if (type == CollectTypes.GRENADE) {
1029
-
1030
1029
  player.grenades++;
1031
1030
  if (player.grenades > 3) player.grenades = 3
1032
1031
 
@@ -1294,20 +1293,25 @@ export class Bot {
1294
1293
  // console.log('owner reset game');
1295
1294
 
1296
1295
  this.me.kills = 0;
1297
- this.game.teamScore = [0, 0, 0];
1298
-
1299
- this.game.spatula.controlledBy = 0;
1300
- this.game.spatula.controlledByTeam = 0;
1301
- this.game.spatula.coords = { x: 0, y: 0, z: 0 };
1302
-
1303
- this.game.stage = CoopStates.capturing;
1304
- this.game.zoneNumber = 0;
1305
- this.game.activeZone = null;
1306
- this.game.capturing = 0;
1307
- this.game.captureProgress = 0;
1308
- this.game.numCapturing = 0;
1309
- this.game.stageName = CoopStagesById[CoopStates.capturing];
1310
- this.game.capturePercent = 0.0;
1296
+
1297
+ if (this.game.gameModeId !== GameModes.ffa) this.game.teamScore = [0, 0, 0];
1298
+
1299
+ if (this.game.gameModeId === GameModes.spatula) {
1300
+ this.game.spatula.controlledBy = 0;
1301
+ this.game.spatula.controlledByTeam = 0;
1302
+ this.game.spatula.coords = { x: 0, y: 0, z: 0 };
1303
+ }
1304
+
1305
+ if (this.game.gameModeId === GameModes.kotc) {
1306
+ this.game.stage = CoopStates.capturing;
1307
+ this.game.zoneNumber = 0;
1308
+ this.game.activeZone = null;
1309
+ this.game.capturing = 0;
1310
+ this.game.captureProgress = 0;
1311
+ this.game.numCapturing = 0;
1312
+ this.game.stageName = CoopStagesById[CoopStates.capturing];
1313
+ this.game.capturePercent = 0.0;
1314
+ }
1311
1315
 
1312
1316
  this.#emit('gameReset');
1313
1317
  }