yolkbot 0.1.1-alpha.23 → 0.1.1-alpha.25
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 +4 -4
package/package.json
CHANGED
package/src/bot.js
CHANGED
|
@@ -979,13 +979,13 @@ export class Bot {
|
|
|
979
979
|
killed.playing = false;
|
|
980
980
|
killed.streak = 0;
|
|
981
981
|
killed.lastDeathTime = Date.now();
|
|
982
|
-
|
|
982
|
+
killed.hp = 100;
|
|
983
|
+
killed.hpShield = 0;
|
|
983
984
|
}
|
|
984
985
|
|
|
985
986
|
if (killer) killer.streak++;
|
|
986
|
-
// console.log(`Player ${killer.name} is on a streak of ${killer.streak} kills.`);
|
|
987
987
|
|
|
988
|
-
this.emit('playerDeath', killed, killer);
|
|
988
|
+
this.emit('playerDeath', killed, killer);
|
|
989
989
|
}
|
|
990
990
|
|
|
991
991
|
#processFirePacket() {
|
|
@@ -1753,7 +1753,7 @@ export class Bot {
|
|
|
1753
1753
|
return this.pathing.nodeList.hasLineOfSight(this.me.position, target.position);
|
|
1754
1754
|
}
|
|
1755
1755
|
|
|
1756
|
-
getBestTarget(customFilter) {
|
|
1756
|
+
getBestTarget(customFilter = () => true) {
|
|
1757
1757
|
const options = Object.values(this.players)
|
|
1758
1758
|
.filter((player) => player)
|
|
1759
1759
|
.filter((player) => player !== this.me)
|