Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
August 2005: [Freeciv-Dev] (PR#13683) Reducing the upgrade cost |
[Freeciv-Dev] (PR#13683) Reducing the upgrade cost[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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
upgrade_cost.diff
building.ruleset.diff
|