132 bool may_be_on_center);
140 int tindex,
int max_dist);
const char * api_methods_unit_type_rule_name(lua_State *L, Unit_Type *punit_type)
Return rule name for Unit_Type.
int api_methods_tile_nat_x(lua_State *L, Tile *ptile)
Return the native x coordinate of the tile.
int api_methods_tile_num_units(lua_State *L, Tile *ptile)
Return number of units on tile.
bool api_methods_is_city_unhappy(lua_State *L, City *pcity)
Return TRUE iff city is unhappy.
bool api_methods_is_gov_center(lua_State *L, City *pcity)
Return TRUE iff city is government center.
bool api_methods_unit_type_can_exist_at_tile(lua_State *L, Unit_Type *punit_type, Tile *ptile)
Return TRUE iff the unit type can exist on the tile.
int api_methods_player_num_cities(lua_State *L, Player *pplayer)
Return the number of cities pplayer has.
const char * api_methods_nation_type_name_translation(lua_State *L, Nation_Type *pnation)
Return translated adjective for Nation_Type.
const char * api_methods_achievement_rule_name(lua_State *L, Achievement *pach)
Return rule name for Achievement.
bool api_methods_player_has_wonder(lua_State *L, Player *pplayer, Building_Type *building)
Return TRUE iff player has wonder.
const char * api_methods_terrain_rule_name(lua_State *L, Terrain *pterrain)
Return rule name for Terrain.
Tile * api_methods_unit_tile_get(lua_State *L, Unit *punit)
Return the tile of the unit.
City_List_Link * api_methods_private_player_city_list_head(lua_State *L, Player *pplayer)
Return list head for city list for Player.
const char * api_methods_disaster_rule_name(lua_State *L, Disaster *pdis)
Return rule name for Disaster.
int api_methods_tile_nat_y(lua_State *L, Tile *ptile)
Return the native y coordinate of the tile.
int api_methods_game_year_fragment(lua_State *L)
Return the current year fragment.
int api_methods_city_culture_get(lua_State *L, City *pcity)
How much culture city has?
const char * api_methods_action_rule_name(lua_State *L, Action *pact)
Return rule name for Action.
const char * api_methods_unit_type_name_translation(lua_State *L, Unit_Type *punit_type)
Return translated name for Unit_Type.
Unit_List_Link * api_methods_private_player_unit_list_head(lua_State *L, Player *pplayer)
Return list head for unit list for Player.
int api_methods_player_num_units(lua_State *L, Player *pplayer)
Return the number of units pplayer has.
City_List_Link * api_methods_city_list_next_link(lua_State *L, City_List_Link *link)
Return next list link or nullptr when link is the last link.
int api_methods_tile_map_x(lua_State *L, Tile *ptile)
Return the map x coordinate of the tile.
City * api_methods_city_list_link_data(lua_State *L, City_List_Link *link)
Return City for list link.
bool api_methods_is_city_happy(lua_State *L, City *pcity)
Return TRUE iff city happy.
City * api_methods_tile_city(lua_State *L, Tile *ptile)
Return City on ptile, else nullptr.
Tile * api_methods_city_tile_get(lua_State *L, City *pcity)
Return the tile of the city.
int api_methods_player_number(lua_State *L, Player *pplayer)
Return player number.
const char * api_methods_government_name_translation(lua_State *L, Government *pgovernment)
Return translated name for Government.
const char * api_methods_government_rule_name(lua_State *L, Government *pgovernment)
Return rule name for Government.
bool api_methods_player_shares_research(lua_State *L, Player *pplayer, Player *aplayer)
Return TRUE if players share research.
int api_methods_city_size_get(lua_State *L, City *pcity)
Return the size of the city.
const char * api_methods_nation_type_plural_translation(lua_State *L, Nation_Type *pnation)
Return translated plural noun for Nation_Type.
Tile * api_methods_private_tile_for_outward_index(lua_State *L, Tile *pstart, int tindex)
Return tile for nth iteration index (for internal use)
bool api_methods_tile_has_extra(lua_State *L, Tile *ptile, const char *name)
Return TRUE if there is a extra with rule name name on ptile.
int api_methods_tile_sq_distance(lua_State *L, Tile *ptile1, Tile *ptile2)
Return squared distance between tiles 1 and 2.
Unit * api_methods_unit_list_link_data(lua_State *L, Unit_List_Link *link)
Return Unit for list link.
bool api_methods_unit_type_has_role(lua_State *L, Unit_Type *punit_type, const char *role)
Return TRUE if punit_type has role.
const char * api_methods_research_rule_name(lua_State *L, Player *pplayer)
Return name of the research group player belongs to.
const char * api_methods_disaster_name_translation(lua_State *L, Disaster *pdis)
Return translated name for Disaster.
const char * api_methods_research_name_translation(lua_State *L, Player *pplayer)
Return name of the research group player belongs to.
int api_methods_player_culture_get(lua_State *L, Player *pplayer)
How much culture player has?
const char * api_methods_tech_type_rule_name(lua_State *L, Tech_Type *ptech)
Return rule name for Tech_Type.
int api_methods_game_turn_deprecated(lua_State *L)
Return the current turn, as if real turns started from 0.
const char * api_methods_action_name_translation(lua_State *L, Action *pact)
Return translated name for Action.
const char * api_methods_terrain_name_translation(lua_State *L, Terrain *pterrain)
Return translated name for Terrain.
bool api_methods_building_type_is_great_wonder(lua_State *L, Building_Type *pbuilding)
Return TRUE if pbuilding is a great wonder.
int api_methods_private_tile_next_outward_index(lua_State *L, Tile *pstart, int tindex, int max_dist)
Return nth tile iteration index (for internal use) Will return the next index, or an index < 0 when d...
bool api_methods_tile_has_road(lua_State *L, Tile *ptile, const char *name)
Return TRUE if there is a road with rule name name on ptile.
int api_methods_game_turn(lua_State *L)
Return the current turn.
bool api_methods_player_knows_tech(lua_State *L, Player *pplayer, Tech_Type *ptech)
Return TRUE if Player knows advance ptech.
bool api_methods_enemy_tile(lua_State *L, Tile *ptile, Player *against)
Is tile occupied by enemies.
bool api_methods_building_type_is_small_wonder(lua_State *L, Building_Type *pbuilding)
Return TRUE if pbuilding is a small wonder.
int api_methods_game_year(lua_State *L)
Return the current year.
const char * api_methods_building_type_name_translation(lua_State *L, Building_Type *pbuilding)
Return translated name for Building_Type.
bool api_methods_building_type_is_wonder(lua_State *L, Building_Type *pbuilding)
Return TRUE if pbuilding is a wonder.
int api_methods_city_inspire_partisans(lua_State *L, City *self, Player *inspirer)
How much city inspires partisans for a player.
int api_methods_city_map_sq_radius(lua_State *L, City *pcity)
Return the square raduis of the city map.
bool api_methods_city_has_building(lua_State *L, City *pcity, Building_Type *building)
Return TRUE iff city has building.
const char * api_methods_achievement_name_translation(lua_State *L, Achievement *pach)
Return translated name for Achievement.
Unit_List_Link * api_methods_private_unit_cargo_list_head(lua_State *L, Unit *punit)
Return list head for cargo list for Unit.
const char * api_methods_game_ruleset_name(lua_State *L)
Return name of the current ruleset.
bool api_methods_unit_type_has_flag(lua_State *L, Unit_Type *punit_type, const char *flag)
Return TRUE if punit_type has flag.
bool api_methods_building_type_is_improvement(lua_State *L, Building_Type *pbuilding)
Return TRUE if pbuilding is a building.
bool api_methods_tile_city_exists_within_max_city_map(lua_State *L, Tile *ptile, bool may_be_on_center)
Return TRUE if there is a city inside the maximum city radius from ptile.
bool api_methods_player_has_flag(lua_State *L, Player *pplayer, const char *flag)
Does player have flag set?
const Direction * api_methods_unit_orientation_get(lua_State *L, Unit *punit)
Get unit orientation.
bool api_methods_unit_city_can_be_built_here(lua_State *L, Unit *punit)
Can punit found a city on its tile?
Unit_List_Link * api_methods_private_tile_unit_list_head(lua_State *L, Tile *ptile)
Return list head for unit list for Tile.
const char * api_methods_game_year_text(lua_State *L)
Return the current year fragment.
bool api_methods_tile_has_base(lua_State *L, Tile *ptile, const char *name)
Return TRUE if there is a base with rule name name on ptile.
const char * api_methods_game_rulesetdir(lua_State *L)
Return name of the current ruleset.
int api_methods_player_gold(lua_State *L, Player *pplayer)
Return gold for Player.
const char * api_methods_building_type_rule_name(lua_State *L, Building_Type *pbuilding)
Return rule name for Building_Type.
const char * api_methods_player_controlling_gui(lua_State *L, Player *pplayer)
Return gui type string of the controlling connection.
const char * api_methods_tech_type_name_translation(lua_State *L, Tech_Type *ptech)
Return translated name for Tech_Type.
Unit_List_Link * api_methods_unit_list_next_link(lua_State *L, Unit_List_Link *link)
Return next list link or nullptr when link is the last link.
int api_methods_tile_map_y(lua_State *L, Tile *ptile)
Return the map y coordinate of the tile.
Unit * api_methods_unit_transporter(lua_State *L, Unit *punit)
Return Unit that transports punit, if any.
const char * api_methods_nation_type_rule_name(lua_State *L, Nation_Type *pnation)
Return rule name for Nation_Type.
const char * api_methods_terrain_class_name(lua_State *L, Terrain *pterrain)
Return name of the terrain's class.
bool api_methods_is_city_celebrating(lua_State *L, City *pcity)
Return TRUE iff city is celebrating.
bool api_methods_is_capital(lua_State *L, City *pcity)
Return TRUE if city is capital.
const struct city_list_link City_List_Link
enum direction8 Direction
const struct unit_list_link Unit_List_Link