Author: sveinung
Date: Fri Mar 10 11:37:46 2017
New Revision: 35093

URL: http://svn.gna.org/viewcvs/freeciv?rev=35093&view=rev
Log:
Remove redundant needs war explanation code.

It is impossible to do "Conquer City" to a city that contains any units.
This means that the target city can't contain a unit from a nation the actor
isn't at war with. Remove action specific action not enabled explanation
code that is supposed to detect this.

See hrm Feature #643526

Modified:
    branches/S3_0/server/unithand.c

Modified: branches/S3_0/server/unithand.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S3_0/server/unithand.c?rev=35093&r1=35092&r2=35093&view=diff
==============================================================================
--- branches/S3_0/server/unithand.c     (original)
+++ branches/S3_0/server/unithand.c     Fri Mar 10 11:37:46 2017
@@ -563,19 +563,6 @@
       }
 
       if ((tunit = is_non_attack_unit_tile(target_tile, unit_owner(actor)))
-          && rel_may_become_war(unit_owner(actor), unit_owner(tunit))) {
-        return unit_owner(tunit);
-      }
-    }
-    break;
-
-  case ACTION_CONQUER_CITY:
-    {
-      struct unit *tunit;
-
-      if (target_tile
-          && (tunit = is_non_attack_unit_tile(target_tile,
-                                              unit_owner(actor)))
           && rel_may_become_war(unit_owner(actor), unit_owner(tunit))) {
         return unit_owner(tunit);
       }
@@ -610,6 +597,7 @@
   case ACTION_PARADROP:
   case ACTION_AIRLIFT:
   case ACTION_HEAL_UNIT:
+  case ACTION_CONQUER_CITY:
     /* No special help. */
     break;
   case ACTION_COUNT:


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

Reply via email to