Im geting 0s as damage and this shouldnt be possible as i setup my formula so that the damage should be at minimum a 1% of the characters max hp, the formula is at follows:
b.mhp * (0.05 - Math.min((((b.def+b.level)-(a.atk+a.level))/1000),0.4))
To my understanding math.min should return the leeser of the 2 values, i gave it a 0.04 which would make it at max 0.05-0.04 so b.mhp*0.01 which should equal to 1% max hp at minimum damage, yet im getting 0 as damage in the latter parts of my testplay with an overpowered defense gear (for testing purposes) this should make the player take around 8 to 12 dmg (mhp is at 1200) accounting variance and multipliers.
Please point me if anything is wrong on the formula approach 😅
b.mhp * (0.05 - Math.min((((b.def+b.level)-(a.atk+a.level))/1000),0.4))
To my understanding math.min should return the leeser of the 2 values, i gave it a 0.04 which would make it at max 0.05-0.04 so b.mhp*0.01 which should equal to 1% max hp at minimum damage, yet im getting 0 as damage in the latter parts of my testplay with an overpowered defense gear (for testing purposes) this should make the player take around 8 to 12 dmg (mhp is at 1200) accounting variance and multipliers.
Please point me if anything is wrong on the formula approach 😅