Skip to content
This repository has been archived by the owner on Jul 5, 2018. It is now read-only.

Commit

Permalink
num allowed failures
Browse files Browse the repository at this point in the history
  • Loading branch information
South-Paw committed Jul 1, 2018
1 parent 632dfdd commit d558654
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,10 @@ class SalienScript {
async playBossZone() {
const min = 120;
const max = 180;
const defaultAllowedFailures = 10;

let nextHeal = Math.floor(new Date().getTime() / 1000) + Math.floor(Math.random() * (max - min + 1) + min);
let allowedBossFails = 10;
let allowedBossFails = defaultAllowedFailures;

// eslint-disable-next-line no-constant-condition
while (true) {
Expand All @@ -231,7 +232,7 @@ class SalienScript {
}

// if we didn't get an error, reset the allowed failure count
allowedBossFails = 10;
allowedBossFails = defaultAllowedFailures;

if (!report.boss_status) {
this.logger('@@ Boss -- Waiting...');
Expand All @@ -244,7 +245,7 @@ class SalienScript {
if (report.boss_status.boss_players) {
console.log(''); // eslint-disable-line no-console

// TODO: format player name so it doesn't screw up our neat output
// TODO: format player name better so it doesn't screw up our neat output

report.boss_status.boss_players.forEach(player => {
let scoreCard = ` ${`${player.name}`.padEnd(30)}`;
Expand Down

0 comments on commit d558654

Please sign in to comment.