yolkbot 0.1.1-alpha.22 → 0.1.1-alpha.24
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/browser/build/global.js +1 -1
- package/browser/build/module.js +1 -1
- package/package.json +1 -1
- package/src/bot.js +7 -7
package/package.json
CHANGED
package/src/bot.js
CHANGED
|
@@ -977,15 +977,15 @@ export class Bot {
|
|
|
977
977
|
|
|
978
978
|
if (killed) {
|
|
979
979
|
killed.playing = false;
|
|
980
|
-
killed.
|
|
980
|
+
killed.streak = 0;
|
|
981
981
|
killed.lastDeathTime = Date.now();
|
|
982
|
-
|
|
982
|
+
killed.hp = 100;
|
|
983
|
+
killed.hpShield = 0;
|
|
983
984
|
}
|
|
984
985
|
|
|
985
|
-
if (killer)
|
|
986
|
-
// console.log(`Player ${killer.name} is on a streak of ${killer.kills} kills.`);
|
|
986
|
+
if (killer) killer.streak++;
|
|
987
987
|
|
|
988
|
-
this.emit('playerDeath', killed, killer);
|
|
988
|
+
this.emit('playerDeath', killed, killer);
|
|
989
989
|
}
|
|
990
990
|
|
|
991
991
|
#processFirePacket() {
|
|
@@ -1300,7 +1300,7 @@ export class Bot {
|
|
|
1300
1300
|
if (action == GameActions.reset) {
|
|
1301
1301
|
// console.log('owner reset game');
|
|
1302
1302
|
|
|
1303
|
-
this.
|
|
1303
|
+
Object.values(this.players).forEach((player) => player.streak = 0);
|
|
1304
1304
|
|
|
1305
1305
|
if (this.game.gameModeId !== GameModes.ffa) this.game.teamScore = [0, 0, 0];
|
|
1306
1306
|
|
|
@@ -1352,7 +1352,7 @@ export class Bot {
|
|
|
1352
1352
|
const oldTeam = player.team;
|
|
1353
1353
|
|
|
1354
1354
|
player.team = toTeam;
|
|
1355
|
-
player.
|
|
1355
|
+
player.streak = 0;
|
|
1356
1356
|
|
|
1357
1357
|
this.emit('playerSwitchTeam', player, oldTeam, toTeam);
|
|
1358
1358
|
}
|