More stuff implemented.

This commit is contained in:
Eric Fredricksen
2010-06-24 22:27:31 -07:00
parent 665148d2ba
commit add8b2cf6c
5 changed files with 66 additions and 62 deletions
+19
View File
@@ -1,3 +1,22 @@
// TODO These code bits don't really belong here.
var randseed = Math.floor(Math.random() * 0xFFFFFFFF);
function Random(n) {
return Rand32Rough() % n;
}
function Rand32Rough() {
// http://www.merlyn.demon.co.uk/js-randm.htm#MR
var T32 = 0x100000000;
var constant = 134775813;
var X = constant * randseed + 1;
return (randseed = X % T32);
}
var K = {};
K.Spells = [