Skip to content

Commit

Permalink
Virus detection code modified and fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ermiyaeskandary committed Apr 20, 2016
1 parent 88425f0 commit 6790dfc
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions bot.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,13 +286,20 @@ function AposBot() {
};

this.isVirus = function(blob, cell) {
if (cell.isVirus() && this.compareSize(cell, blob, 1.1)) {
return true;
} else if (cell.isVirus() && cell.color.substring(3, 5).toLowerCase() != "ff") {
if (blob == null) {
if (cell.isVirus()) {
return true;
} else {
return false;
}
return false;
};
}
if (cell.isVirus() && this.compareSize(cell, blob, 1.1)) {
return true;
} else if (cell.isVirus() && cell.color.substring(3, 5).toLowerCase() != "ff") {
return true;
}
return false;
};

this.isSplitTarget = function(that, blob, cell) {
if (that.canSplit(cell, blob)) {
Expand Down

1 comment on commit 6790dfc

@twinec
Copy link

@twinec twinec commented on 6790dfc Jun 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agar.io no longer fully loads with this.

Please sign in to comment.