Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2005:
[Freeciv-Dev] Re: (PR#13683) Reducing the upgrade cost
Home

[Freeciv-Dev] Re: (PR#13683) Reducing the upgrade cost

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: sayenko@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13683) Reducing the upgrade cost
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 16 Aug 2005 09:14:36 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Tying the bonus to techs seems like a good solution to me.  These 
bonuses are pretty small and should act to just decrease costs slowly 
over time.

However the bonus should not affect the 2*missing part of the upgrade 
cost.  It should never be possible to drop the cost below (2 gold) * 
(the difference in shield costs).  The bonus should only affect the 
squared part of the calculation.  We could even make it affect the 
*exponent* of this calculation so it became

   eft = get_player_bonus(pplayer, EFT_UPGRADE_COST);
   cost = 2 * missing + 20 * power(missing, (double)eft / 100.0);

or for extra points the 20 could be put into the ruleset as well.

   eft = get_player_bonus(pplayer, EFT_UPGRADE_EXPONENT);
   eft2 = get_player_bonus(pplayer, EFT_UPGRADE_MULTIPLIER);
   cost = 2 * missing + eft2 * power(missing, (double)eft / 100.0);

Note that these values are actually inside unit_buy_gold_cost and should 
probably remain there - so changes here will decrease unit purchase 
costs too.

-jason





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