Author: sveinung
Date: Tue Aug  4 13:28:12 2015
New Revision: 29324

URL: http://svn.gna.org/viewcvs/freeciv?rev=29324&view=rev
Log:
Unhard code that a unit must have a move fragment left to Bombard

See patch #6166

Modified:
    trunk/common/actions.c
    trunk/data/alien/game.ruleset
    trunk/data/civ2civ3/game.ruleset
    trunk/doc/README.actions
    trunk/server/rscompat.c

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=29324&r1=29323&r2=29324&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Tue Aug  4 13:28:12 2015
@@ -678,11 +678,6 @@
       return FALSE;
     }
 
-    /* TODO: Move to the ruleset. */
-    if (actor_unit->moves_left <= 0) {
-      return FALSE;
-    }
-
     /* FIXME: Target of Bombard should be city and units. */
     if (tile_city(target_tile)
         && !pplayers_at_war(city_owner(tile_city(target_tile)),

Modified: trunk/data/alien/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/game.ruleset?rev=29324&r1=29323&r2=29324&view=diff
==============================================================================
--- trunk/data/alien/game.ruleset       (original)
+++ trunk/data/alien/game.ruleset       Tue Aug  4 13:28:12 2015
@@ -337,6 +337,7 @@
     { "type",   "name", "range", "present"
       "Unitflag", "Bombarder", "Local", TRUE
       "UnitState", "Transported", "Local", FALSE
+      "MinMoveFrags", "1", "Local", TRUE
     }
 target_reqs    =
     { "type",   "name", "range", "present"

Modified: trunk/data/civ2civ3/game.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/game.ruleset?rev=29324&r1=29323&r2=29324&view=diff
==============================================================================
--- trunk/data/civ2civ3/game.ruleset    (original)
+++ trunk/data/civ2civ3/game.ruleset    Tue Aug  4 13:28:12 2015
@@ -437,6 +437,7 @@
     { "type",   "name", "range", "present"
       "Unitflag", "Bombarder", "Local", TRUE
       "UnitState", "Transported", "Local", FALSE
+      "MinMoveFrags", "1", "Local", TRUE
     }
 target_reqs    =
     { "type",   "name", "range", "present"

Modified: trunk/doc/README.actions
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=29324&r1=29323&r2=29324&view=diff
==============================================================================
--- trunk/doc/README.actions    (original)
+++ trunk/doc/README.actions    Tue Aug  4 13:28:12 2015
@@ -241,7 +241,6 @@
  * UI name can be set using ui_name_bombard
  * actor must have a bombard_rate > 0
  * actor must be on the same tile as the target or on the tile next to it.
- * actor must have at least 1 move fragment left.
  * target can't be in a city the actor player isn't at war with.
  * target must be foreign.
  * target owner must be at war with actor.

Modified: trunk/server/rscompat.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/rscompat.c?rev=29324&r1=29323&r2=29324&view=diff
==============================================================================
--- trunk/server/rscompat.c     (original)
+++ trunk/server/rscompat.c     Tue Aug  4 13:28:12 2015
@@ -349,6 +349,11 @@
                               req_from_str("UnitState", "Local", FALSE,
                                            FALSE, "Transported"));
 
+    /* The actor unit must have a move fragment left. */
+    requirement_vector_append(&enabler->actor_reqs,
+                              req_from_str("MinMoveFrags", "Local", FALSE,
+                                           TRUE, "1"));
+
     /* The target can't be on an ocean tile. */
     requirement_vector_append(&enabler->target_reqs,
                               req_from_str("TerrainClass", "Local", FALSE,


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

Reply via email to