Skip to content

Commit eac055c

Browse files
committed
FIX - Psychic potential is no loger liited by inhumanity/zen
1 parent 6c585a7 commit eac055c

1 file changed

Lines changed: 25 additions & 13 deletions

File tree

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Calculates the effect of psychic potential based on different factors.
3-
*
3+
*
44
* @param {number} potential - The psychic potential value.
55
* @param {number} imbalance - The imbalance factor.
66
* @param {boolean} inhuman - Indicates if the psychic is inhuman.
@@ -9,15 +9,27 @@
99
*/
1010
export const difficultyRange = [20, 40, 80, 120, 140, 180, 240, 280, 320, 440];
1111
export const psychicPotentialEffect = (potential, imbalance, inhuman, zen) => {
12-
let max = zen ? 9 : inhuman ? 8 : 7;
13-
if (potential < 40) { return difficultyRange[0 + imbalance] }
14-
else if (potential < 80) { return difficultyRange[1 + imbalance] }
15-
else if (potential < 120) { return difficultyRange[2 + imbalance] }
16-
else if (potential < 140) { return difficultyRange[3 + imbalance] }
17-
else if (potential < 180) { return difficultyRange[4 + imbalance] }
18-
else if (potential < 240) { return difficultyRange[5 + imbalance] }
19-
else if (potential < 280) { return difficultyRange[6 + imbalance] }
20-
else if (potential < 320) { return difficultyRange[Math.min(max, 7 + imbalance)] }
21-
else if (potential < 440) { return difficultyRange[Math.min(max, 8 + imbalance)] }
22-
else { return difficultyRange[Math.min(max, 9)] }
23-
}
12+
// let max = zen ? 9 : inhuman ? 8 : 7;
13+
let max = 9;
14+
if (potential < 40) {
15+
return difficultyRange[0 + imbalance];
16+
} else if (potential < 80) {
17+
return difficultyRange[1 + imbalance];
18+
} else if (potential < 120) {
19+
return difficultyRange[2 + imbalance];
20+
} else if (potential < 140) {
21+
return difficultyRange[3 + imbalance];
22+
} else if (potential < 180) {
23+
return difficultyRange[4 + imbalance];
24+
} else if (potential < 240) {
25+
return difficultyRange[5 + imbalance];
26+
} else if (potential < 280) {
27+
return difficultyRange[6 + imbalance];
28+
} else if (potential < 320) {
29+
return difficultyRange[Math.min(max, 7 + imbalance)];
30+
} else if (potential < 440) {
31+
return difficultyRange[Math.min(max, 8 + imbalance)];
32+
} else {
33+
return difficultyRange[Math.min(max, 9)];
34+
}
35+
};

0 commit comments

Comments
 (0)