Skip to content

Commit

Permalink
fixes #40
Browse files Browse the repository at this point in the history
  • Loading branch information
EFHIII committed Mar 20, 2024
1 parent 752eb21 commit 3bc0161
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
6 changes: 4 additions & 2 deletions balatro-sim.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const jokerCosts = [
5, 4, 4, 4, 4, 4, 6, 5, 7, 5,
7, 4, 7, 7, 7, 6, 8, 6, 6, 8,
6, 5, 5, 6, 6, 6, 6, 4, 5, 4,
3, 4, 4, 4, 4, 6, 8, 6, 6, 5
3, 4, 4, 4, 4, 6, 8, 6, 6, 5,
5, 5, 6, 6, 6, 9, 4, 8, 4, 6
];

const jokerRarity = [
Expand All @@ -48,7 +49,8 @@ const jokerRarity = [
2, 1, 1, 1, 1, 1, 2, 1, 2, 1,
3, 1, 2, 2, 2, 2, 3, 2, 2, 3,
2, 2, 1, 2, 2, 2, 2, 1, 2, 1,
1, 1, 1, 1, 2, 2, 3, 2, 2, 2
1, 1, 1, 1, 1, 2, 3, 2, 2, 2,
2, 1, 2, 2, 2, 3, 1, 3, 1, 2
];

const powersOfTen = [];
Expand Down
15 changes: 9 additions & 6 deletions breakdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ const jokerCosts = [
5, 4, 4, 4, 4, 4, 6, 5, 7, 5,
7, 4, 7, 7, 7, 6, 8, 6, 6, 8,
6, 5, 5, 6, 6, 6, 6, 4, 5, 4,
3, 4, 4, 4, 4, 6, 8, 6, 6, 5
3, 4, 4, 4, 4, 6, 8, 6, 6, 5,
5, 5, 6, 6, 6, 9, 4, 8, 4, 6
];


Expand All @@ -49,7 +50,8 @@ const _jokerRarity = [
2, 1, 1, 1, 1, 1, 2, 1, 2, 1,
3, 1, 2, 2, 2, 2, 3, 2, 2, 3,
2, 2, 1, 2, 2, 2, 2, 1, 2, 1,
1, 1, 1, 1, 2, 2, 3, 2, 2, 2
1, 1, 1, 1, 1, 2, 3, 2, 2, 2,
2, 1, 2, 2, 2, 3, 1, 3, 1, 2
];

const powersOfTen = [];
Expand Down Expand Up @@ -692,10 +694,6 @@ class Hand {
if(this.bd) this.breakdownPlusChips([joker], 80);
}
break;
case 159:
// Castle
this.compiledChips += joker[VALUE] * 3;
break;
case 145:
// Lucky Cat
this.mult = bigTimes(1 + (joker[VALUE] + this.jokersExtraValue[j]) / 5, this.mult);
Expand Down Expand Up @@ -738,6 +736,10 @@ class Hand {
this.mult = bigTimes(1 + joker[VALUE] * 0.5, this.mult);
if(this.bd) this.breakdownTimesMult([joker], 1 + joker[VALUE] * 0.5);
break;
case 159:
// Castle
this.compiledChips += joker[VALUE] * 3;
break;
}

if(joker[EDITION] === POLYCHROME) {
Expand Down Expand Up @@ -1896,6 +1898,7 @@ class Hand {
const joker = this.jokers[j];

this.compiledValues.push(0);
console.log(_jokerRarity[this.actualJokers[j][JOKER]], this.actualJokers[j][JOKER]);
this.jokerRarities.push(_jokerRarity[this.actualJokers[j][JOKER]]);

if(joker[JOKER_DISABLED]) continue;
Expand Down

0 comments on commit 3bc0161

Please sign in to comment.