Author: sveinung
Date: Wed Apr 29 14:51:00 2015
New Revision: 28945

URL: http://svn.gna.org/viewcvs/freeciv?rev=28945&view=rev
Log:
ruledit: Trying to join or found a city has no illegal action move cost.

Founding and joining a city became action enabler controlled in Freeciv 3.0.
There is no punishment for illegally trying to do either of them in the old
hard coded rules.

Add this rule to all Illegal_Action_Move_Cost effects when upgrading a
ruleset in the 2.6 format.

See bug #23548

Modified:
    trunk/server/rscompat.c

Modified: trunk/server/rscompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rscompat.c?rev=28945&r1=28944&r2=28945&view=diff
==============================================================================
--- trunk/server/rscompat.c     (original)
+++ trunk/server/rscompat.c     Wed Apr 29 14:51:00 2015
@@ -185,6 +185,16 @@
       struct effect *contacts = effect_copy(peffect);
 
       contacts->type = EFT_HAVE_CONTACTS;
+    }
+
+    if (peffect->type == EFT_ILLEGAL_ACTION_MOVE_COST) {
+      /* Founding and joining a city became action enabler controlled in
+       * Freeciv 3.0. Old hard coded rules had no punishment for trying to
+       * do those when it is illegal according to the rules. */
+      effect_req_append(peffect, req_from_str("Action", "Local", FALSE,
+                                              FALSE, "Found City"));
+      effect_req_append(peffect, req_from_str("Action", "Local", FALSE,
+                                              FALSE, "Join City"));
     }
   }
 


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

Reply via email to