Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: Fundamentalism form of government (PR#931)
Home

[Freeciv-Dev] Re: Fundamentalism form of government (PR#931)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Davide Pagnin <nightmare@xxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Fundamentalism form of government (PR#931)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 2 Sep 2001 18:41:00 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sat, Sep 01, 2001 at 11:54:40AM -0700, Davide Pagnin wrote:
>       Hi All!
> Content-Type: multipart/mixed; boundary="------------73F22BD7BF932EAEC421E15F"
> 
> This is a multi-part message in MIME format.
> --------------73F22BD7BF932EAEC421E15F
> Content-Type: text/plain; charset=us-ascii
> Content-Transfer-Encoding: 7bit
> 
>       Hi All!
> 
> This is the patch that tries to introduce fundamentalism.
> 
> Try it and comment!
> 
>       Ciao, Davide

> +  if (government_has_flag(g, G_REDUCED_RESEARCH)) {
> +    if (sci_rate > 50) {
> +      tax_rate = 50 - lux_rate;
> +      sci_rate = 50;
> +    }
> +  }

I would write this as:

> +  if (government_has_flag(g, G_REDUCED_RESEARCH)) {
> +    if (sci_rate > 50) {
> +      sci_rate = 50;
> +      tax_rate = 100 - sci_rate - lux_rate;
> +    }
> +  }

> +  if (government_has_flag(g, G_NO_UNHAPPY_CITIZENS)) {
> +    pcity->ppl_content[4] += pcity->ppl_unhappy[4];
> +    pcity->ppl_unhappy[4] = 0;
> +    pcity->ppl_residue[4] = 0;
> +  }

For robustness this may be written as

> +  if (government_has_flag(g, G_NO_UNHAPPY_CITIZENS)) {
> +    pcity->ppl_content[4] += pcity->ppl_unhappy[4] + pcity->ppl_residue[4];
> +    pcity->ppl_unhappy[4] = 0;
> +    pcity->ppl_residue[4] = 0;
> +  }

>  /**************************************************************************
>  ...
>  **************************************************************************/
> +int unit_has_flag(struct unit_type *ut, int flag)
> +{
> +  assert(flag>=0 && flag<F_LAST);
> +  return BOOL_VAL(ut->flags & (1<<flag));
> +}

This is a nice addition but it should be included separately.


> +  F_FANATIC,          /* Only Fundamentalist govern can build */

      /* Only a Fundamentalist government can build these units */

Overall good at the first glance. Since Fundamentalism is on the todo
list and also the roadmap I see no problem of including it.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 1 + 1 = 3, for large values of 1


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