Skip to content

Commit

Permalink
corrected bonus flag
Browse files Browse the repository at this point in the history
  • Loading branch information
hjjerrychen committed Nov 26, 2018
1 parent 0702743 commit e9b8673
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function setREP(){
}

function setBonus(){
buffer[buffer.length - 1].bonus = !buffer[buffer.length - 1].bonus;
buffer[0].bonus = !buffer[0].bonus;
setType(this);
renderBufferedElement();
}
Expand Down Expand Up @@ -184,7 +184,6 @@ function addJump(){
spinV: false,
fly: false,
cof: false,
bonus: false,
invalid: false,
bv: 0.0,
goeValue: 0.0,
Expand Down Expand Up @@ -223,7 +222,7 @@ function renderBufferedElement(){
elementDisplay.append("+REP");
}

if (buffer[i].bonus !== false){
if (buffer[0].bonus !== false){
elementDisplay.append(" x");
}

Expand Down Expand Up @@ -344,7 +343,7 @@ function calculateBuffer(){
//base score calculation

buffer[i].bs = buffer[i].bv;
if (buffer[i].bonus === true){
if (buffer[0].bonus === true){
buffer[i].bs *= 1.1;
}
if (buffer[i].rep === true){
Expand Down

0 comments on commit e9b8673

Please sign in to comment.