Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9734) A few bugs and wishlist items
Home

[Freeciv-Dev] (PR#9734) A few bugs and wishlist items

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: thorild@xxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#9734) A few bugs and wishlist items
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 19 Aug 2004 10:47:46 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=9734 >

> [thorild@xxxxxxxxxxxx - Wed Aug 18 23:37:19 2004]:
> * There's a silly message when trying to move a nuke into an enemy
>   city that does not contain any troops: "Only ground troops can take
>   over a city." It's fairly obvious that you're planning to more or
>   less destroy the city if you do that, so it would make more sense to
>   ask something like "are you sure?" or just nuke the city, no
>   questions asked.

No questions asked in attached patch.

  - Per
Index: server/unithand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/unithand.c,v
retrieving revision 1.301
diff -u -r1.301 unithand.c
--- server/unithand.c   8 Aug 2004 14:15:14 -0000       1.301
+++ server/unithand.c   19 Aug 2004 17:46:11 -0000
@@ -1134,6 +1133,12 @@
     } else {
       assert(is_enemy_city_tile(pdesttile, pplayer) != NULL);
 
+      if (unit_flag(punit, F_NUCLEAR)) {
+        move_unit(punit, pcity->x, pcity->y, 0);
+        handle_unit_attack_request(punit, punit); /* Boom! */
+        return TRUE;
+      }
+
       /* If there is an enemy city it is empty.
        * If not it would have been caught in the attack case. 
        * FIXME: Move this check into test_unit_move_tile */

[Prev in Thread] Current Thread [Next in Thread]