Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: Open patches? (PR#720)
Home

[Freeciv-Dev] Re: Open patches? (PR#720)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Lino Mastrodomenico <mastro@xxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Open patches? (PR#720)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2001 09:57:34 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Oct 10, 2001 at 02:56:29PM -0700, Lino Mastrodomenico wrote:
> Raimar Falke wrote:
> > Are there any patches which aren't committed and I didn't responded to
> > in the last two days?
> 
> What about patch PR#720?
> 
> A short summary about this patch: it introduces a new server option, 
> "fulltradesize", for decreasing the power of the smallpox strategy.
> 
> There is a trade penalty in all cities smaller than this value: the penalty 
> is 100% (no trade at all) for sizes up to fulltradesize/3, and decreases 
> gradually to 0% (no penalty except the normal corruption) for 
> size=fulltradesize.
> 
> I suggest setting it to 6, so you get:
>   size 0,1,2:   0 trade
>   size 3:       25% trade
>   size 4:       50% trade
>   size 5:       75% trade
>   size 6+:      full trade (no penalty but "normal" corruption)

The approach is ok. However I think the model/interface
isn't. Especially I dislike the fulltradesize/3 thing. What do you
think about two variables: notrade_citysize(default to 0) and
fulltrade_citysize (default to 1) and the following code:

 assert(notrade_citysize<fulltrade_citysize);
 if(city_size<=notrade_citysize)
    trade=0;
 else if(city_size>=fulltrade_citysize)
    trade=base_trade;
 else
    
trade=(base_trade*(city_size-notrade_citysize))/(fulltrade_citysize-notrade_citysize);

To get the same behavior as above set notrade_citysize to 2 and
fulltrade_citysize to 6.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "I haven't lost my mind - it's backed up on tape somewhere."


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