Author: sveinung
Date: Sat Sep 24 22:02:05 2016
New Revision: 33876

URL: http://svn.gna.org/viewcvs/freeciv?rev=33876&view=rev
Log:
"Bombard" needs attack strength.

See patch #7712

Modified:
    trunk/common/actions.c
    trunk/data/alien/units.ruleset
    trunk/data/civ1/units.ruleset
    trunk/data/civ2/units.ruleset
    trunk/data/civ2civ3/units.ruleset
    trunk/data/classic/units.ruleset
    trunk/data/experimental/units.ruleset
    trunk/data/multiplayer/units.ruleset
    trunk/data/sandbox/units.ruleset
    trunk/data/stub/units.ruleset
    trunk/data/webperimental/units.ruleset
    trunk/doc/README.actions

Modified: trunk/common/actions.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/common/actions.c?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/common/actions.c      (original)
+++ trunk/common/actions.c      Sat Sep 24 22:02:05 2016
@@ -1080,6 +1080,12 @@
       /* Reason: Can't bombard if it never fires. */
       return FALSE;
     }
+
+    if (actor_unittype->attack_strength <= 0) {
+      /* Reason: Can't bombard without attack strength. */
+      return FALSE;
+    }
+
     break;
 
   case ACTION_UPGRADE_UNIT:

Modified: trunk/data/alien/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/alien/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/alien/units.ruleset      (original)
+++ trunk/data/alien/units.ruleset      Sat Sep 24 22:02:05 2016
@@ -368,6 +368,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/civ1/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ1/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/civ1/units.ruleset       (original)
+++ trunk/data/civ1/units.ruleset       Sat Sep 24 22:02:05 2016
@@ -270,6 +270,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard" (do not appear in Civ1)
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/civ2/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/civ2/units.ruleset       (original)
+++ trunk/data/civ2/units.ruleset       Sat Sep 24 22:02:05 2016
@@ -283,6 +283,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/civ2civ3/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/civ2civ3/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/civ2civ3/units.ruleset   (original)
+++ trunk/data/civ2civ3/units.ruleset   Sat Sep 24 22:02:05 2016
@@ -397,6 +397,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/classic/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/classic/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/classic/units.ruleset    (original)
+++ trunk/data/classic/units.ruleset    Sat Sep 24 22:02:05 2016
@@ -371,6 +371,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/experimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/experimental/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/experimental/units.ruleset       (original)
+++ trunk/data/experimental/units.ruleset       Sat Sep 24 22:02:05 2016
@@ -385,6 +385,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/multiplayer/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/multiplayer/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/multiplayer/units.ruleset        (original)
+++ trunk/data/multiplayer/units.ruleset        Sat Sep 24 22:02:05 2016
@@ -370,6 +370,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/sandbox/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/sandbox/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/sandbox/units.ruleset    (original)
+++ trunk/data/sandbox/units.ruleset    Sat Sep 24 22:02:05 2016
@@ -408,6 +408,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/stub/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/stub/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/stub/units.ruleset       (original)
+++ trunk/data/stub/units.ruleset       Sat Sep 24 22:02:05 2016
@@ -298,6 +298,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/data/webperimental/units.ruleset
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/data/webperimental/units.ruleset?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/data/webperimental/units.ruleset      (original)
+++ trunk/data/webperimental/units.ruleset      Sat Sep 24 22:02:05 2016
@@ -377,6 +377,7 @@
 ;   paratroopers_mr_sub = the move rate which is subtracted after paradropping
 ;                         (whole movement points)
 ;  "Bombard"
+;   attack       = base attack strength
 ;   bombard_rate = the number of shots fired at enemy units when attacking
 ;  "Join City"
 ;   pop_cost = the number of population added to the target city

Modified: trunk/doc/README.actions
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/doc/README.actions?rev=33876&r1=33875&r2=33876&view=diff
==============================================================================
--- trunk/doc/README.actions    (original)
+++ trunk/doc/README.actions    Sat Sep 24 22:02:05 2016
@@ -314,6 +314,7 @@
  * UI name can be set using ui_name_bombard
  * if force_capture_units is true "Capture Units" must be impossible
  * actor must have a bombard_rate > 0
+ * actor must have an attack > 0
  * actor must be on a tile next to the target or, if bombard_max_range
    allows it, futher away.
  * target can't be in a city the actor player isn't at war with.


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

Reply via email to