summaryrefslogtreecommitdiff
path: root/apps/plugins/superdom.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/superdom.c')
-rw-r--r--apps/plugins/superdom.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c
index efa6f4a22a..10373e1cc9 100644
--- a/apps/plugins/superdom.c
+++ b/apps/plugins/superdom.c
@@ -385,9 +385,13 @@ static int calc_strength(int colour, int x, int y)
385 if(a && b) /* diagonally adjacent, give less influence */ 385 if(a && b) /* diagonally adjacent, give less influence */
386 { 386 {
387 score += 5; 387 score += 5;
388 if(board[x + a][y + b].tank || board[x + a][y + b].farm) 388 if(board[x + a][y + b].tank)
389 score += 15; 389 score += 15;
390 if(board[x + a][y + b].plane || board[x + a][y + b].ind) 390 if(board[x + a][y + b].farm)
391 score += 15;
392 if(board[x + a][y + b].plane)
393 score += 20;
394 if (board[x + a][y + b].ind)
391 score += 20; 395 score += 20;
392 if(board[x + a][y + b].nuke) 396 if(board[x + a][y + b].nuke)
393 score += 10; 397 score += 10;
@@ -397,10 +401,14 @@ static int calc_strength(int colour, int x, int y)
397 else 401 else
398 { 402 {
399 score += 10; 403 score += 10;
400 if(board[x + a][y + b].tank || board[x + a][y + b].farm) 404 if(board[x + a][y + b].tank)
405 score += 30;
406 if(board[x + a][y + b].farm)
401 score += 30; 407 score += 30;
402 if(board[x + a][y + b].plane || board[x + a][y + b].ind) 408 if(board[x + a][y + b].plane)
403 score += 40; 409 score += 20;
410 if(board[x + a][y + b].ind)
411 score += 20;
404 if(board[x + a][y + b].nuke) 412 if(board[x + a][y + b].nuke)
405 score += 20; 413 score += 20;
406 if(board[x + a][y + b].men) 414 if(board[x + a][y + b].men)
@@ -1943,7 +1951,7 @@ static void computer_allocate(void)
1943 } 1951 }
1944 if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100) 1952 if(superdom_settings.compdiff>=AI_BUILD_INDS_FARMS_LEVEL && compres.cash>=PRICE_FACTORY+100)
1945 { 1953 {
1946 int i = 0; 1954 int cnt = 0;
1947 do 1955 do
1948 { 1956 {
1949 if(compres.farms<compres.inds) 1957 if(compres.farms<compres.inds)
@@ -1966,7 +1974,7 @@ static void computer_allocate(void)
1966 break; 1974 break;
1967 } 1975 }
1968 } 1976 }
1969 } while(compres.cash>=PRICE_FACTORY + 100 && i++ < 3); 1977 } while(compres.cash>=PRICE_FACTORY + 100 && cnt++ < 3);
1970 } 1978 }
1971 /* AI will buy nukes first if possible */ 1979 /* AI will buy nukes first if possible */
1972 if(compres.cash > PRICE_NUKE + PRICE_TANK && superdom_settings.compdiff>=AI_BUILD_NUKES_LEVEL) 1980 if(compres.cash > PRICE_NUKE + PRICE_TANK && superdom_settings.compdiff>=AI_BUILD_NUKES_LEVEL)