HandleEvent(BeginTurn)'MAQ_Terraform' pre { int_t i; int_t j; int_t ran; location_t MGGoodLoc; location_t MGUnitLoc; unit_t MGGoodUnit; if (GetCurrentRound() == 0) { for (i=0; i<=GetMapWidth()-1 ; i=i+1) { for (j=0; j<=GetMapHeight()-1 ; j=j+1) { MakeLocation(MGGoodLoc, i, j); ran=random(3); if (TerrainType(MGGoodLoc)==2 || TerrainType(MGGoodLoc)==3){//tundra or glacier if (ran==0){ terraform(MGGoodLoc,4);//change to grassland } elseif (ran==1){ terraform(MGGoodLoc,1);//change to plains } else{ terraform(MGGoodLoc,0);//change to forest } } elseif (TerrainType(MGGoodLoc)==18 || TerrainType(MGGoodLoc)==20 || TerrainType(MGGoodLoc)==21) { //brown hills, white hills, or white mountains if (ran==0){ terraform(MGGoodLoc,9);//change to hills } elseif (ran==1){ terraform(MGGoodLoc,1);//change to plains } else{ terraform(MGGoodLoc,0);//change to forest } } elseif (TerrainType(MGGoodLoc)==9) {//hills if (ran<=1){ terraform(MGGoodLoc,4);//change to grassland } } elseif (TerrainType(MGGoodLoc)==8 ) {//mountains if (ran==0){ terraform(MGGoodLoc,4);//change to grassland } if (ran==1){ terraform(MGGoodLoc,0);//change to forest } } } } DisableTrigger('MAQ_Terraform'); } elseif (GetCurrentRound () > 1) {//if someone reloads slic DisableTrigger('MAQ_Terraform'); } }