Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7179) Request/preliminary patch: nuke affects surr
Home

[Freeciv-Dev] Re: (PR#7179) Request/preliminary patch: nuke affects surr

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: drewt@xxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7179) Request/preliminary patch: nuke affects surrounding infrastructure and reputation
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 1 Jan 2004 04:48:16 -0800
Reply-to: rt@xxxxxxxxxxx

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

On Wed, 31 Dec 2003, Guest wrote:
> The patch adds these behaviours:

A good patch, a good idea. A few changes I'd like to see, though.

> * 66% chance that dropping a nuke will cause a player to lose
> (GAME_MAX_REPUTATION * 0.02) units of reputation
> * 20% chance of further reputation loss of (GAME_MAX_REPUTATION * 0.03)
> * for each surrounding tile railroads and farmland are removed, there's
> a 50% chance of irrigation removal and a 33% chance of road removal

We increase game reputation by two points every turn, so is a 2% or 3%
drop in reputation really going to amount to much?

> +  /* not a city tile, get rid of some infrastructure */
> +     if(map_has_special(x, y, S_FARMLAND)) {
> +     map_clear_special(x, y, S_FARMLAND);
> +     send_tile_info(NULL, x, y);
> +     }

Read style guide about proper indentation, please.

> +     if ((map_has_special(x, y, S_IRRIGATION)) && (myrand(2) == 1)) {

All such constants (2) should be #define'd in the .h file with a
descriptive name.

> -     map_set_special(x, y, S_POLLUTION);
> -     send_tile_info(NULL, x, y);
> +       map_set_special(x, y, S_POLLUTION);
> +       send_tile_info(NULL, x, y);

Use diff -w to avoid such spurious changes.

  - Per




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