Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set /a "hp = hp - ((atk*arandom)/((edef*6)/edefbonus))"
- set /a "hp = 50 - ((2*2)/((1*6)/8))"
- PS Y:> $hp = 50 - ((2*2)/((1*6)/8))
- PS Y:> $hp
- 44.6666666666667
- set /a "hp = 50 - ((2*2)/((1*6)/8))"
- SET Whole = Result / 100
- SET "Fraction = Result %% 100"
- SET Result=%Whole%.%Fraction%
- 10*2*2*8 =320
- 1*6 =6
- 320/6 =53
- 53+5 =58
- 58/10 =5
- 2*2*8 =32
- 1*6 =6
- 32/6 =5 (we just lost the fraction digit, so rounding won't work)
- 5*10 =50
- 50+5 =55
- 55/10 =5
Add Comment
Please, Sign In to add comment