Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
Icecreamdudes committed Mar 23, 2024
1 parent 172910b commit a07de64
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions js/dice.js
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,22 @@
canClick() { return player.d.diceCooldown.lt(0) },
unlocked() { return true },
onClick() {
let max = new Decimal(0)
for (let i = 0; i < player.d.diceRolls.length; i++)
{
player.d.diceRolls[i] = Decimal.add(getRandomInt(player.d.diceSides.sub(player.d.lowestRoll)), player.d.lowestRoll)
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.diceRolls[i])
max = max.mul(player.d.diceSides)
}
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.dicePointsMult)
player.d.gainedDicePointsDisplay = player.d.gainedDicePoints
if (player.d.gainedDicePoints.gt(max))
{
player.d.gainedDicePoints = max
}
player.d.gainedDicePoints = player.d.gainedDicePoints.mul(player.d.dicePointsMult)
player.d.gainedDicePointsDisplay = player.d.gainedDicePoints
player.d.dicePoints = player.d.dicePoints.add(player.d.gainedDicePoints)
player.d.diceCooldown = new Decimal(1)

player.d.autoRollCooldown = player.d.autoRollTime
layers.d.addDiceEffect()
},
style: { width: '100px', "min-height": '100px' },
Expand Down

0 comments on commit a07de64

Please sign in to comment.