Needing a bit more help, on a couple of things.
Hope I'm not a bother, but wanted to ask anyways.
Before testing my Battle script, wanted to test sphere's randomness.
. . .
[Explanation:] Reason for importance:
Choices in-game are sometimes determined through parts of the 1/4th ratio:
1-25... 26-50... 51-75... 76-100.
These ranges are skewed, depending on levels which help determine which random choice is made.
Things like whether attacks are a hit, miss, critical, weak.
The random number should range between 0 - 100.
So wrote this up to test sphere's randomness:
var Rnd = 0;
Rnd = Math.floor(Math.random() * 100);
Abort(Math.floor((Math.random() * 100) / Rnd));
[Code_Explanation:] What it's suppose to do is pit one random number against another.
If the random numbers are the same, the answer will come out as "one"
If one of them is doubled, the answer will come out as "two"
And if they're anything else, they'll come out as 0 or something higher than 2
I did some tallying, and figured out:
the most common is 0. Meaning the first number is almost always lower than the second.
-(occurs 7 times for the first 10 counts, and 6 times for the second 10 counts)
Also, the second most common number is 1. Meaning both numbers are the same.
-(occurs 1 time for the first 10 counts, and 2 times for the second 10 counts)
As for 2 or anything higher, both occurred once on each separate counting.
[My question:] Is there anyway to make Math.random() more random?