Small fixes for aicity.c
Per Inge Mathisen <per-0/[email protected]>
| Newsgroups | gmane.games.freeciv.ai |
|---|---|
| Message-ID | <[email protected]> |
This patch contains some small fixes for aicity.c building evaluation, that have been committed. - Per
fix1.diff
(text/plain, 1.5 KB)
Index: ai/aicity.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
retrieving revision 1.172
diff -u -r1.172 aicity.c
--- ai/aicity.c 23 Sep 2004 19:50:46 -0000 1.172
+++ ai/aicity.c 24 Sep 2004 21:36:05 -0000
@@ -415,7 +415,7 @@
break;
case EFT_SEA_DEFEND:
if (ai_handicap(pplayer, H_DEFENSIVE)) {
- v += amount; /* make AI slow */
+ v += amount / 10; /* make AI slow */
}
if (is_ocean(map_get_terrain(pcity->x, pcity->y))) {
v += ai->threats.ocean[-map_get_continent(pcity->x, pcity->y)]
@@ -437,7 +437,7 @@
break;
case EFT_AIR_DEFEND:
if (ai_handicap(pplayer, H_DEFENSIVE)) {
- v += amount * 15; /* make AI slow */
+ v += amount / 15; /* make AI slow */
}
v += (ai->threats.air && ai->threats.continent[ptile->continent])
? amount/10 * 5 + amount/10 * c : c;
@@ -450,13 +450,13 @@
break;
case EFT_LAND_DEFEND:
if (ai_handicap(pplayer, H_DEFENSIVE)) {
- v += amount * 10; /* make AI slow */
+ v += amount / 10; /* make AI slow */
}
if (ai->threats.continent[ptile->continent]
|| capital
|| (ai->threats.invasions
&& is_water_adjacent_to_tile(pcity->x, pcity->y))) {
- v += !ai->threats.igwall ? 15 + (capital * amount / 10) : 10;
+ v += amount / (!ai->threats.igwall ? (15 - capital * 5) : 15);
}
v += (1 + ai->threats.invasions + !ai->threats.igwall) * c;
break;