1
0
Fork 0
forked from len0rd/rockbox

FS12727: Fix buggy strength calculation in superdom

Change-Id: Ib72385a488d7459af80b42972143b18ac2c2982f
This commit is contained in:
Solomon Peachy 2024-07-19 18:23:53 -04:00
parent db8049d168
commit 6af637645a

View file

@ -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)