Dec 19th 2014, 22:42:33
I'm not 100% fluent with php- but it does has many similiarities to VB6...
This appears to be a case select after having the computer generate a number from 0 to 100
if($c->govt == 'M'){
$rand = rand(0,100);
switch($rand){
case $rand < 12: change_govt($c,'D'); break;
case $rand < 20: change_govt($c,'I'); break;
case $rand < 50: change_govt($c,'R'); break;
default: change_govt($c,'F'); break;
}
So if your # is less than 12 select Demo
from 13-20 select Dictator
and from 21-50 select Republic
51-100 Fascist
===============================================================
I would have it read-
case $rand < 80: change_govt($c,'D'); break;
default: change_govt($c,'F'); break;
Since the bot hugest advantage is the buy/sell off market have it more likely to select Demo.
Resistance is futile. You will be assimilated.