Author: sveinung
Date: Mon Oct 10 13:55:33 2016
New Revision: 34081

URL: http://svn.gna.org/viewcvs/freeciv?rev=34081&view=rev
Log:
Move "Attack" blocks "Conquer City" hard coding.

The rule doesn't depend on the ruleset. It therefore doesn't belong in
load_ruleset_game(). Move it to the other unconditional action blocking
rules in autoadjust_ruleset_data().

See patch #7794

Modified:
    trunk/server/rssanity.c
    trunk/server/ruleset.c

Modified: trunk/server/rssanity.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rssanity.c?rev=34081&r1=34080&r2=34081&view=diff
==============================================================================
--- trunk/server/rssanity.c     (original)
+++ trunk/server/rssanity.c     Mon Oct 10 13:55:33 2016
@@ -1382,6 +1382,12 @@
        * semantics. */
       { ACTION_DISBAND_UNIT, ACTION_HELP_WONDER },
       { ACTION_DISBAND_UNIT, ACTION_RECYCLE_UNIT },
+
+      /* Hard code that the ability to perform a regular attack blocks city
+       * conquest. Is redundant as long as the requirement that the target
+       * tile has no units remains hard coded. Kept "just in case" that
+       * changes. */
+      { ACTION_CONQUER_CITY, ACTION_ATTACK },
     };
 
     int i;

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=34081&r1=34080&r2=34081&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Mon Oct 10 13:55:33 2016
@@ -5856,9 +5856,6 @@
         BV_SET(action_by_number(ACTION_CONQUER_CITY)->blocked_by,
                ACTION_NUKE);
       }
-
-      BV_SET(action_by_number(ACTION_CONQUER_CITY)->blocked_by,
-             ACTION_ATTACK);
 
       /* If the poison city action should empty the granary. */
       /* TODO: empty granary and reduce population should become separate


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to