Skip to content

Commit

Permalink
Update equip.js
Browse files Browse the repository at this point in the history
  • Loading branch information
cyomega committed May 15, 2024
1 parent 25ce529 commit a3604bf
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions equip.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,10 @@ $(document).ready(function() {
function achieveCheck(stat, statMin) {
let achieve = 0;
let i = stat.length;
while (i--) {
if (statMin[i] == -1)
continue;
achieve += Math.min(stat[i], statMin[i]);
}
if (achieve == goal)
return 1;
else
return achieve / goal;
while (i--)
if (statMin[i] != -1)
achieve += Math.min(stat[i], statMin[i]);
return achieve == goal ? 1 : achieve / goal;
}
let equip = [[], [], [], [], [], [], [], [], [], [], [], []];
let statMin = [];
Expand Down Expand Up @@ -270,7 +265,7 @@ $(document).ready(function() {
let noCount = true;
if (type[i][j][1] > 1) {
noCount = false;
for (let k = 0; k < j; k++) {
if (j != 0) for (let k = 0; k < j; k++) {
if (type[i][k][1] < 2)
continue;
if (i != 9) {
Expand Down

0 comments on commit a3604bf

Please sign in to comment.