1 /****************************************************************************
2 Freeciv - Copyright (C) 2004 - The Freeciv Team
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12 ****************************************************************************/
15 #include <fc_config.h>
25 /****************************************************************************
26 Return current culture score of the city.
27 ****************************************************************************/
28 int city_culture(const struct city
*pcity
)
30 return pcity
->history
+ get_city_bonus(pcity
, EFT_PERFORMANCE
);
33 /****************************************************************************
34 How much history city gains this turn.
35 ****************************************************************************/
36 int city_history_gain(const struct city
*pcity
)
38 return get_city_bonus(pcity
, EFT_HISTORY
);
41 /****************************************************************************
42 Return current culture score of the player.
43 ****************************************************************************/
44 int player_culture(const struct player
*plr
)
46 int culture
= plr
->culture
+ get_player_bonus(plr
, EFT_NATION_PERFORMANCE
);
48 city_list_iterate(plr
->cities
, pcity
) {
49 culture
+= city_culture(pcity
);
50 } city_list_iterate_end
;
55 /****************************************************************************
56 How much nation-wide history player gains this turn. Does NOT include
57 history gains of individual cities.
58 ****************************************************************************/
59 int nation_history_gain(const struct player
*pplayer
)
61 return get_player_bonus(pplayer
, EFT_NATION_HISTORY
);