Author: sveinung
Date: Mon Mar 13 15:19:41 2017
New Revision: 35104

URL: http://svn.gna.org/viewcvs/freeciv?rev=35104&view=rev
Log:
Rule change: close "Recycle Unit" loop hole.

The action "Help Wonder" prevents the player from doing it in a city that
has enough shields to finish its current production. This protects against
a cheating player avoiding rules about what items can receive help from it
by receiving the help for a (finished) legal item and then build an item
that can't receive help from "Help Wonder". Give the action "Recycle Unit"
the same protection. This makes it consistent with "Help Wonder".

See hrm Feature #644056

Modified:
    trunk/common/actions.c
    trunk/doc/README.actions

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=35104&r1=35103&r2=35104&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Mon Mar 13 15:19:41 2017
@@ -1858,6 +1858,7 @@
     break;
 
   case ACTION_HELP_WONDER:
+  case ACTION_RECYCLE_UNIT:
     /* It is only possible to help the production if the production needs
      * the help. (If not it would be possible to add shields for something
      * that can't legally receive help if it is build later) */
@@ -1873,13 +1874,6 @@
           < city_production_build_shield_cost(target_city))) {
       return TRI_NO;
     }
-
-    break;
-
-  case ACTION_RECYCLE_UNIT:
-    /* FIXME: The next item may be forbidden from receiving help. But
-     * forbidding the player from recycling a unit because the production
-     * has enough, like Help Wonder does, would be a rule change. */
 
     break;
 

Modified: trunk/doc/README.actions
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=35104&r1=35103&r2=35104&view=diff
==============================================================================
--- trunk/doc/README.actions    (original)
+++ trunk/doc/README.actions    Mon Mar 13 15:19:41 2017
@@ -261,6 +261,7 @@
  * actor must be aware that the target exists
  * "Help Wonder" must be impossible
  * actor must be on the same tile as the target
+ * target city must need the extra shields to complete its production.
 
 "Join City" - Add the actor to the target city's population.
  * UI name can be set using ui_name_join_city


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

Reply via email to