diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2024-07-19 18:23:53 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2024-07-19 18:26:28 -0400 |
commit | 6af637645aa30088500ee8dcac3f4d5f596dabce (patch) | |
tree | c15a32e1a58f1a1af4c0ecd6aabdd8b64a07781d | |
parent | db8049d168d8a2957941af45c9829cf3f4203ce8 (diff) | |
download | rockbox-6af637645a.tar.gz rockbox-6af637645a.zip |
FS12727: Fix buggy strength calculation in superdom
Change-Id: Ib72385a488d7459af80b42972143b18ac2c2982f
-rw-r--r-- | apps/plugins/superdom.c | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/apps/plugins/superdom.c b/apps/plugins/superdom.c index efa6f4a22a..2af290bc23 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) 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].farm) score += 30; - if(board[x + a][y + b].plane || board[x + a][y + b].ind) - score += 40; + 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) |