Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2005:
[Freeciv-Dev] Re: (PR#12961) New command: Raze the bloody city
Home

[Freeciv-Dev] Re: (PR#12961) New command: Raze the bloody city

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#12961) New command: Raze the bloody city
From: "Brian Dunstan" <bdunstan149@xxxxxxxxx>
Date: Mon, 2 May 2005 12:45:15 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12961 >


--- "Per I. Mathisen" <per@xxxxxxxxxxx> wrote:

> 
> <URL:
> http://bugs.freeciv.org/Ticket/Display.html?id=12961
> >
> 
> This patch adds a new unit command that razes a city
> to the ground. This
> is based on an effect, EFT_ALLOW_RAZE_CITY, which
> sets how many turns this
> command takes - a value of zero disables it.
> 
> This should have a severe diplomatic penalty. Once I
> get around to redoing
> reputation, I'll fix that properly, but until then I
> am not sure what to
> do. Perhaps a 5% drop in reputation for each razed
> city would do? We can
> also disallow raze for Republib and Democracy.
> 
>   - Per
> 
> > Index: ai/aicity.c
> 

How about any unit capable of martial law (i.e. land
unit with attack >=1) can eliminate one population
point per turn?

That way, a 3-unit occupation force could raze a size
12 city in 4 turns.  If someone liberated the city
after 2 turns, 6/12 population would be left.




===================================================================
> RCS file: /home/freeciv/CVS/freeciv/ai/aicity.c,v
> retrieving revision 1.217
> diff -u -r1.217 aicity.c
> --- ai/aicity.c       2 May 2005 10:37:18 -0000       1.217
> +++ ai/aicity.c       2 May 2005 19:18:47 -0000
> @@ -305,6 +305,8 @@
>        struct city *palace = find_palace(pplayer);
>  
>        switch (peffect->type) {
> +        case EFT_ALLOW_RAZE_CITY:
> +          break; /* makes no sense for a city - I
> think */
>       case EFT_PROD_TO_GOLD:
>         /* Since coinage contains some entirely spurious
> ruleset values,
>          * we need to return here with some spurious
> want. */
> Index: client/control.c
>
===================================================================
> RCS file:
> /home/freeciv/CVS/freeciv/client/control.c,v
> retrieving revision 1.171
> diff -u -r1.171 control.c
> --- client/control.c  29 Apr 2005 18:39:25 -0000
> 1.171
> +++ client/control.c  2 May 2005 19:18:47 -0000
> @@ -2090,6 +2090,17 @@
> 
>
/**************************************************************************
>  ...
> 
>
**************************************************************************/
> +void key_unit_raze(void)
> +{
> +  if (punit_focus &&
> +      can_unit_do_activity(punit_focus,
> ACTIVITY_RAZE)) {
> +    request_new_unit_activity(punit_focus,
> ACTIVITY_RAZE);
> +  }
> +}
> +
>
+/**************************************************************************
> +...
>
+**************************************************************************/
>  void key_unit_pollution(void)
>  {
>    if (punit_focus &&
> Index: client/control.h
>
===================================================================
> RCS file:
> /home/freeciv/CVS/freeciv/client/control.h,v
> retrieving revision 1.50
> diff -u -r1.50 control.h
> --- client/control.h  26 Apr 2005 19:58:24 -0000      1.50
> +++ client/control.h  2 May 2005 19:18:47 -0000
> @@ -164,6 +164,7 @@
>  void key_unit_patrol(void);
>  void key_unit_paradrop(void);
>  void key_unit_pillage(void);
> +void key_unit_raze(void);
>  void key_unit_pollution(void);
>  void key_unit_road(void);
>  void key_unit_sentry(void);
> Index: client/tilespec.c
>
===================================================================
> RCS file:
> /home/freeciv/CVS/freeciv/client/tilespec.c,v
> retrieving revision 1.299
> diff -u -r1.299 tilespec.c
> --- client/tilespec.c 30 Apr 2005 17:09:25 -0000
> 1.299
> +++ client/tilespec.c 2 May 2005 19:18:47 -0000
> @@ -2797,7 +2797,14 @@
>      case ACTIVITY_TRANSFORM:
>        s = t->sprites.unit.transform;
>        break;
> -    default:
> +    case ACTIVITY_RAZE:
> +      s = t->sprites.unit.pillage;
> +      break;
> +    case ACTIVITY_IDLE:
> +    case ACTIVITY_PATROL_UNUSED:
> +    case ACTIVITY_LAST:
> +    case ACTIVITY_UNKNOWN:
> +      assert(FALSE); /* never here */
>        break;
>      }
>  
> Index: client/gui-gtk-2.0/menu.c
>
===================================================================
> RCS file:
>
/home/freeciv/CVS/freeciv/client/gui-gtk-2.0/menu.c,v
> retrieving revision 1.75
> diff -u -r1.75 menu.c
> --- client/gui-gtk-2.0/menu.c 1 May 2005 16:21:58
> -0000 1.75
> +++ client/gui-gtk-2.0/menu.c 2 May 2005 19:18:48
> -0000
> @@ -126,6 +126,7 @@
>    MENU_ORDER_FALLOUT,
>    MENU_ORDER_SENTRY,
>    MENU_ORDER_PILLAGE,
> +  MENU_ORDER_RAZE,
>    MENU_ORDER_HOMECITY,
>    MENU_ORDER_UNLOAD_TRANSPORTER,
>    MENU_ORDER_LOAD,
> @@ -456,6 +457,9 @@
>     case MENU_ORDER_PILLAGE:
>      key_unit_pillage();
>      break;
> +   case MENU_ORDER_RAZE:
> +    key_unit_raze();
> +    break;
>     case MENU_ORDER_HOMECITY:
>      key_unit_homecity();
>      break;
> @@ -814,6 +818,8 @@
>       orders_menu_callback,   MENU_ORDER_SENTRY                               
>         },
>    { "/" N_("Orders") "/" N_("Pillage"),                     
> "<shift>p",
>       orders_menu_callback,   MENU_ORDER_PILLAGE                              
>         },
> +  { "/" N_("Orders") "/" N_("Raze city"),            "",
> +     orders_menu_callback,   MENU_ORDER_RAZE                                 
>         },
>    { "/" N_("Orders") "/sep2",                                NULL,
>       NULL,                   0,                                      
> "<Separator>"   },
>    { "/" N_("Orders") "/" N_("Make _Homecity"),       
> "h",
> @@ -1363,6 +1369,8 @@
>                         can_unit_do_activity(punit, ACTIVITY_SENTRY));
>        menus_set_sensitive("<main>/_Orders/Pillage",
>                         can_unit_do_activity(punit,
> ACTIVITY_PILLAGE));
> +      menus_set_sensitive("<main>/_Orders/Raze
> city",
> +                       can_unit_do_activity(punit, ACTIVITY_RAZE));
>        menus_set_sensitive("<main>/_Orders/_Disband
> Unit",
>                         !unit_flag(punit, F_UNDISBANDABLE));
>        menus_set_sensitive("<main>/_Orders/Make
> _Homecity",
> Index: common/effects.c
>
===================================================================
> RCS file:
> /home/freeciv/CVS/freeciv/common/effects.c,v
> retrieving revision 1.35
> diff -u -r1.35 effects.c
> --- common/effects.c  2 May 2005 08:57:46 -0000       1.35
> +++ common/effects.c  2 May 2005 19:18:48 -0000
> @@ -138,7 +138,8 @@
>    "Has_Senate",
>    "Inspire_Partisans",
>    "Happiness_To_Gold",
> -  "Fanatics"
> +  "Fanatics",
> +  "Allow_Raze_City"
>  };
>  
>  static bool initialized = FALSE;
> Index: common/effects.h
>
===================================================================
> RCS file:
> /home/freeciv/CVS/freeciv/common/effects.h,v
> retrieving revision 1.21
> diff -u -r1.21 effects.h
> --- common/effects.h  2 May 2005 08:45:19 -0000       1.21
> +++ common/effects.h  2 May 2005 19:18:48 -0000
> @@ -126,6 +126,7 @@
>    EFT_INSPIRE_PARTISANS,
>    EFT_HAPPINESS_TO_GOLD,
>    EFT_FANATICS, /* stupid special case, we hatess
> it */
> +  EFT_ALLOW_RAZE_CITY,
>    EFT_LAST   /* keep this last */
>  };
>  
> Index: common/unit.c
>
===================================================================
> RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
> retrieving revision 1.237
> diff -u -r1.237 unit.c
> --- common/unit.c     30 Apr 2005 17:09:27 -0000      1.237
> +++ common/unit.c     2 May 2005 19:18:49 -0000
> @@ -543,6 +543,8 @@
>      return _("Airbase");
>    case ACTIVITY_FALLOUT:
>      return _("Fallout");
> +  case ACTIVITY_RAZE:
> +    return _("Raze city");
>    case ACTIVITY_UNKNOWN:
>    case ACTIVITY_PATROL_UNUSED:
>    case ACTIVITY_LAST:
> @@ -840,6 +842,10 @@
>      }
>      return TRUE;
>  
> +  case ACTIVITY_RAZE:
> +    return (tile_get_city(ptile) 
> +            && get_player_bonus(pplayer,
> EFT_ALLOW_RAZE_CITY) 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 





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