Complete.Org: Mailing Lists: Archives: freeciv-ai: October 2002:
[freeciv-ai] do not allow 100% tax on despotism
Home

[freeciv-ai] do not allow 100% tax on despotism

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv ai <freeciv-ai@xxxxxxxxxxx>
Subject: [freeciv-ai] do not allow 100% tax on despotism
From: Jordi Negrevernis i Font <jorneg@xxxxxxxxxxx>
Date: Sat, 12 Oct 2002 20:54:19 +0200


Sometimes the ai gets stopped in a 100% tax under despotism and can't change to republic to research more easily.

This normally happens when the ai begins to build defensive units like crazy.

This little patch does not leave the ai reach more that 80% tax under despotism. The check for despotism is more comparing strings; i don't know if there is a better way.

--- aihand.c.orig       Sat Oct 12 20:19:20 2002
+++ aihand.c    Sat Oct 12 19:39:24 2002
@@ -225,6 +225,11 @@
     pplayer->economic.tax = 10 * n;
   }
 
+  /* do not allow a Despotism to have a 100% Tax rate */
+  if ( !mystrcasecmp(g->name_orig, "Despotism") ) {
+    if ( pplayer->economic.tax >= 80 ) pplayer->economic.tax = 80;
+  }
+
 /* once we have tech_want established, can compare it to cash want here -- 
Syela */
   pplayer->economic.science = 100 - pplayer->economic.tax - 
pplayer->economic.luxury;
   while (pplayer->economic.science > maxrate * 10) {

[Prev in Thread] Current Thread [Next in Thread]