forked from len0rd/rockbox
FS12727: Fix buggy strength calculation in superdom
Change-Id: Ib72385a488d7459af80b42972143b18ac2c2982f
This commit is contained in:
parent
db8049d168
commit
6af637645a
1 changed files with 13 additions and 5 deletions
|
@ -385,9 +385,13 @@ static int calc_strength(int colour, int x, int y)
|
|||
if(a && b) /* diagonally adjacent, give less influence */
|
||||
{
|
||||
score += 5;
|
||||
if(board[x + a][y + b].tank || board[x + a][y + b].farm)
|
||||
if(board[x + a][y + b].tank)
|
||||
score += 15;
|
||||
if(board[x + a][y + b].plane || board[x + a][y + b].ind)
|
||||
if(board[x + a][y + b].farm)
|
||||
score += 15;
|
||||
if(board[x + a][y + b].plane)
|
||||
score += 20;
|
||||
if (board[x + a][y + b].ind)
|
||||
score += 20;
|
||||
if(board[x + a][y + b].nuke)
|
||||
score += 10;
|
||||
|
@ -397,10 +401,14 @@ static int calc_strength(int colour, int x, int y)
|
|||
else
|
||||
{
|
||||
score += 10;
|
||||
if(board[x + a][y + b].tank || board[x + a][y + b].farm)
|
||||
if(board[x + a][y + b].tank)
|
||||
score += 30;
|
||||
if(board[x + a][y + b].plane || board[x + a][y + b].ind)
|
||||
score += 40;
|
||||
if(board[x + a][y + b].farm)
|
||||
score += 30;
|
||||
if(board[x + a][y + b].plane)
|
||||
score += 20;
|
||||
if(board[x + a][y + b].ind)
|
||||
score += 20;
|
||||
if(board[x + a][y + b].nuke)
|
||||
score += 20;
|
||||
if(board[x + a][y + b].men)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue