|
|
|
@ -21,8 +21,9 @@ int hp; |
|
|
|
|
|
|
|
|
|
int dieroll(int num,int sides){ |
|
|
|
|
int total = 0; |
|
|
|
|
for(num;num>0;num--){ |
|
|
|
|
while (num > 0) { |
|
|
|
|
total = total + arc4random_uniform(sides)+1; |
|
|
|
|
num--; |
|
|
|
|
} |
|
|
|
|
return total; |
|
|
|
|
} |
|
|
|
@ -60,10 +61,9 @@ void classProfs(unsigned long* classprofs, int count, int num){ |
|
|
|
|
classprofs[i]=local; |
|
|
|
|
} |
|
|
|
|
//Grab the first N elements, based on the class's value, but first, if we have more profs than available profs, get some random ones
|
|
|
|
|
if(num > count){ |
|
|
|
|
for(count;num > count;count--){ |
|
|
|
|
while (num > count){ |
|
|
|
|
addProf(1lu << arc4random_uniform(18)); |
|
|
|
|
} |
|
|
|
|
count--; |
|
|
|
|
} |
|
|
|
|
for(int i=0;i<=num;i++){ |
|
|
|
|
addProf(classprofs[num]); |
|
|
|
|