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

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

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#13683) Reducing the upgrade cost
From: "Alexander Sayenko" <sayenko@xxxxxxxxx>
Date: Tue, 16 Aug 2005 08:02:50 -0700
Reply-to: bugs@xxxxxxxxxxx

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

Hi

This is a new version of the patch that reduces the upgrade cost of units. A
new feature is that the unit_upgrade_price () function also checks for the
EFT_UPGRADE_BONUS effect value that reduces the upgrade cost.

There is also a patch for the building.ruleset file that demonstrates how to
use a new effect "Upgrade_Bonus". The Leonardo Worshop will reduce the
upgrade price by 20%. Together with Invention, Industrialization, and Mass
Production, the upgrade price will be reduced by 50%. Since Leonardo
Workshop is obsoleted by Automobiles (?), the upgrade price will be reduced
by 30% at the end of a game.

TODO:

The unit_upgrade_price () function uses the get_player_bonus() function
which means that attaching the "Upgrade_Bonus" effect to buildings will have
no effect. Ideally, the get_city_bonus () function should be used. However,
there is no way to get a pointer to a city from the unit_upgrade_price ()
function. As a result, changes in the interface are necessary.

Sincerely,
Sayenko Alexander

Attachment: upgrade_cost.diff
Description: Binary data

Attachment: building.ruleset.diff
Description: Binary data


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