106 "no partisans in ruleset");
116 City *homecity,
int moves_left)
119 homecity, moves_left, -1,
NULL);
128 City *homecity,
int moves_left,
135#ifndef FREECIV_NDEBUG
168 "create_unit_full: player already has unique unit");
196#ifndef FREECIV_NDEBUG
220 "Can't both enter and frighten a hut at the same time",
369 bool enabled =
FALSE;
427 bool enabled =
FALSE;
520 log_error(
"Illegal direction %d for unit from lua script", dir);
571 "Invalid unit loss reason");
596 "Invalid unit loss reason",
FALSE);
602 if (
self->hp > max) {
622 if (
self->moves_left == 0 &&
self->done_moving) {
626 self->moves_left += change;
628 if (
self->moves_left <= 0) {
629 self->moves_left = 0;
720 "It is a special item, not a city building");
873 }
else if (
cost == -2) {
875 }
else if (
cost == -3) {
897 Q_(
"?fromscript:The %s acquire %s and share this "
898 "advance with you."),
903 Q_(
"?fromscript:The %s acquire %s."),
917 const char *
tname,
const int mod)
951 if (pextra !=
NULL) {
1076 2,
"invalid climate change type");
1090 3,
"must be a percentage",
NULL);
1137 "Can't both enter and frighten a hut at the same time",
1315 if (nationality ==
nullptr) {
enum action_actor_kind action_get_actor_kind(const struct action *paction)
bool is_action_enabled_unit_on_stack(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile)
bool is_action_enabled_unit_on_tile(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile, const struct extra_type *target_extra)
bool is_action_enabled_unit_on_city(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct city *target_city)
bool is_action_enabled_unit_on_unit(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct unit *target_unit)
enum action_target_kind action_get_target_kind(const struct action *paction)
bool is_action_enabled_unit_on_self(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit)
bool is_action_enabled_unit_on_extras(const struct civ_map *nmap, const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile, const struct extra_type *target_extra)
#define action_has_result(_act_, _res_)
const char * default_ai_type_name(void)
void api_edit_change_city_size(lua_State *L, City *pcity, int change, Player *nationality)
static bool ur_transform_unit(struct unit *punit, const struct unit_type *to_unit, int vet_loss)
bool api_edit_perform_action_unit_vs_tile_extra(lua_State *L, Unit *punit, Action *paction, Tile *tgt, const char *sub_tgt)
bool api_edit_perform_action_unit_vs_tile(lua_State *L, Unit *punit, Action *paction, Tile *tgt)
void api_edit_climate_change(lua_State *L, enum climate_change_type type, int effect)
void api_edit_player_give_bulbs(lua_State *L, Player *pplayer, int amount, Tech_Type *tech)
void api_edit_unit_moving_allow(lua_State *L, Unit *punit)
void api_edit_remove_city(lua_State *L, City *pcity)
bool api_edit_trait_mod_set(lua_State *L, Player *pplayer, const char *tname, const int mod)
bool api_edit_unleash_barbarians(lua_State *L, Tile *ptile)
void api_edit_remove_building(lua_State *L, City *pcity, Building_Type *impr)
void api_edit_player_victory(lua_State *L, Player *pplayer)
void api_edit_create_extra(lua_State *L, Tile *ptile, const char *name)
void api_edit_unit_movepoints(lua_State *L, Unit *self, int change)
Unit * api_edit_create_unit(lua_State *L, Player *pplayer, Tile *ptile, Unit_Type *ptype, int veteran_level, City *homecity, int moves_left)
bool api_edit_perform_action_unit_vs_unit(lua_State *L, Unit *punit, Action *paction, Unit *tgt)
void api_edit_player_add_history(lua_State *L, Player *pplayer, int amount)
Tech_Type * api_edit_give_technology(lua_State *L, Player *pplayer, Tech_Type *ptech, int cost, bool notify, const char *reason)
bool api_edit_perform_action_unit_vs_city_impr(lua_State *L, Unit *punit, Action *paction, City *tgt, Building_Type *sub_tgt)
void api_edit_create_building(lua_State *L, City *pcity, Building_Type *impr)
Unit * api_edit_create_unit_full(lua_State *L, Player *pplayer, Tile *ptile, Unit_Type *ptype, int veteran_level, City *homecity, int moves_left, int hp_left, Unit *ptransport)
bool api_edit_transfer_city(lua_State *L, City *pcity, Player *new_owner)
bool api_edit_change_terrain(lua_State *L, Tile *ptile, Terrain *pterr)
void api_edit_create_owned_extra(lua_State *L, Tile *ptile, const char *name, Player *pplayer)
void api_edit_tile_show(lua_State *L, Tile *ptile, Player *pplayer)
void api_edit_unit_kill(lua_State *L, Unit *punit, const char *reason, Player *killer)
bool api_edit_tile_hide(lua_State *L, Tile *ptile, Player *pplayer)
void api_edit_unit_turn(lua_State *L, Unit *punit, Direction dir)
void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer, int count, int sq_radius)
void api_edit_remove_extra(lua_State *L, Tile *ptile, const char *name)
bool api_edit_unit_hitpoints(lua_State *L, Unit *self, int change, const char *reason, Player *killer)
void api_edit_tile_set_label(lua_State *L, Tile *ptile, const char *label)
void api_edit_create_road(lua_State *L, Tile *ptile, const char *name)
void api_edit_change_citizen_nationality(lua_State *L, City *pcity, Player *from, Player *to, int amount)
bool api_edit_perform_action_unit_vs_city(lua_State *L, Unit *punit, Action *paction, City *tgt)
void api_edit_city_add_history(lua_State *L, City *pcity, int amount)
bool api_edit_unit_teleport(lua_State *L, Unit *punit, Tile *dest, Unit *embark_to, bool allow_disembark, bool conquer_city, bool conquer_extra, bool enter_hut, bool frighten_hut)
void api_edit_unit_moving_disallow(lua_State *L, Unit *punit)
bool api_edit_unit_upgrade(lua_State *L, Unit *punit, int vet_loss)
bool api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile, const char *name, Player *nationality)
bool api_edit_create_trade_route(lua_State *L, City *from, City *to)
bool api_edit_unit_move(lua_State *L, Unit *punit, Tile *ptile, int movecost, Unit *embark_to, bool disembark, bool conquer_city, bool conquer_extra, bool enter_hut, bool frighten_hut)
void api_edit_change_infrapoints(lua_State *L, Player *pplayer, int amount)
bool api_edit_perform_action_unit_vs_self(lua_State *L, Unit *punit, Action *paction)
Player * api_edit_create_player(lua_State *L, const char *username, Nation_Type *pnation, const char *ai)
bool api_edit_unit_transform(lua_State *L, Unit *punit, Unit_Type *ptype, int vet_loss)
void api_edit_change_gold(lua_State *L, Player *pplayer, int amount)
Player * api_edit_civil_war(lua_State *L, Player *pplayer, int probability)
bool api_edit_perform_action_unit_vs_city_tech(lua_State *L, Unit *punit, Action *paction, City *tgt, Tech_Type *sub_tgt)
void api_edit_create_base(lua_State *L, Tile *ptile, const char *name, Player *pplayer)
@ CLIMATE_CHANGE_GLOBAL_WARMING
@ CLIMATE_CHANGE_NUCLEAR_WINTER
bool unleash_barbarians(struct tile *ptile)
void dbv_clr(struct dbv *pdbv, int bit)
void citizens_nation_move(struct city *pcity, const struct player_slot *pslot_from, const struct player_slot *pslot_to, int move)
bool city_has_building(const struct city *pcity, const struct impr_type *pimprove)
void city_remove_improvement(struct city *pcity, const struct impr_type *pimprove)
#define city_tile(_pcity_)
static citizens city_size_get(const struct city *pcity)
#define city_owner(_pcity_)
void auto_arrange_workers(struct city *pcity)
bool city_change_size(struct city *pcity, citizens size, struct player *nationality, const char *reason)
bool city_refresh(struct city *pcity)
static struct ai_type * self
static void enter_hut(QVariant data1, QVariant data2)
static void frighten_hut(QVariant data1, QVariant data2)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int const struct action *paction struct unit struct city * pcity
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit int cost
#define IDENTITY_NUMBER_ZERO
const struct ft_color ftc_server
void send_game_info(struct conn_list *dest)
bool is_special_improvement(const struct impr_type *pimprove)
bool is_wonder(const struct impr_type *pimprove)
bool is_great_wonder(const struct impr_type *pimprove)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define fc_assert_action(condition, action)
#define log_error(message,...)
void luascript_log(struct fc_lua *fcl, enum log_level level, const char *format,...)
struct fc_lua * luascript_get_fcl(lua_State *L)
#define LUASCRIPT_CHECK_STATE(L,...)
#define LUASCRIPT_CHECK_SELF(L, value,...)
#define LUASCRIPT_CHECK_ARG_NIL(L, value, narg, type,...)
#define LUASCRIPT_CHECK_ARG(L, check, narg, msg,...)
#define LUASCRIPT_CHECK(L, check, msg,...)
enum direction8 Direction
bool same_pos(const struct tile *tile1, const struct tile *tile2)
void assign_continent_numbers(void)
bool really_gives_vision(struct player *me, struct player *them)
void send_tile_info(struct conn_list *dest, struct tile *ptile, bool send_unknown)
void send_all_known_tiles(struct conn_list *dest)
bool need_to_reassign_continents(const struct terrain *oldter, const struct terrain *newter)
void climate_change(bool warming, int effect)
void create_extra(struct tile *ptile, struct extra_type *pextra, struct player *pplayer)
void map_show_tile(struct player *src_player, struct tile *ptile)
void tile_change_side_effects(struct tile *ptile, bool refresh_city)
bool map_is_known_and_seen(const struct tile *ptile, const struct player *pplayer, enum vision_layer vlayer)
void fix_tile_on_terrain_change(struct tile *ptile, struct terrain *oldter, bool extend_rivers)
void update_tile_knowledge(struct tile *ptile)
bool can_exist_at_tile(const struct civ_map *nmap, const struct unit_type *utype, const struct tile *ptile)
enum unit_move_result unit_move_to_tile_test(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity, const struct tile *src_tile, const struct tile *dst_tile, bool igzoc, bool enter_transport, struct unit *embark_to, bool enter_enemy_city)
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
enum unit_move_result unit_teleport_to_tile_test(const struct civ_map *nmap, const struct unit *punit, enum unit_activity activity, const struct tile *src_tile, const struct tile *dst_tile, bool enter_transport, struct unit *embark_to, bool enter_enemy_city)
const char * nation_plural_for_player(const struct player *pplayer)
void notify_research(const struct research *presearch, const struct player *exclude, enum event_type event, const struct ft_color color, const char *format,...)
void notify_player(const struct player *pplayer, const struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
void notify_research_embassies(const struct research *presearch, const struct player *exclude, enum event_type event, const struct ft_color color, const char *format,...)
bool pplayers_allied(const struct player *pplayer, const struct player *pplayer2)
void player_status_add(struct player *plr, enum player_status pstatus)
bool civil_war_triggered(struct player *pplayer)
void send_player_info_c(struct player *src, struct conn_list *dest)
struct player * civil_war(struct player *pplayer)
bool civil_war_possible(struct player *pplayer, bool conquering_city, bool honour_server_option)
const char * research_advance_name_translation(const struct research *presearch, Tech_type_id tech)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
int research_pretty_name(const struct research *presearch, char *buf, size_t buf_len)
bool game_was_started(void)
enum server_states server_state(void)
enum rfc_status create_command_newcomer(const char *name, const char *ai, bool check, struct nation_type *pnation, struct player **newplayer, char *buf, size_t buflen)
enum rfc_status create_command_pregame(const char *name, const char *ai, bool check, struct player **newplayer, char *buf, size_t buflen)
struct packet_game_info info
struct civ_game::@32::@36 server
bool reveal_trade_partner
struct player_ai ai_common
struct conn_list * connections
struct player_economic economic
struct player_slot * slot
int fc_strcasecmp(const char *str0, const char *str1)
struct advance * advance_by_number(const Tech_type_id atype)
bool is_future_tech(Tech_type_id tech)
Tech_type_id advance_number(const struct advance *padvance)
#define terrain_has_flag(terr, flag)
void tile_change_terrain(struct tile *ptile, struct terrain *pterrain)
bool tile_extra_rm_apply(struct tile *ptile, struct extra_type *tgt)
bool tile_set_label(struct tile *ptile, const char *label)
struct city * tile_city(const struct tile *ptile)
#define tile_terrain(_tile)
#define tile_has_extra(ptile, pextra)
struct goods_type * goods_from_city_to_unit(const struct city *src, const struct unit *punit)
bool can_establish_trade_route(const struct city *pc1, const struct city *pc2, int priority)
#define trade_partners_iterate_end
#define trade_partners_iterate(c, p)
enum unit_upgrade_result unit_transform_result(const struct civ_map *nmap, const struct unit *punit, const struct unit_type *to_unittype)
void unit_virtual_destroy(struct unit *punit)
bool unit_transported(const struct unit *pcargo)
bool unit_has_orders(const struct unit *punit)
bool could_unit_be_in_transport(const struct unit *pcargo, const struct unit *ptrans)
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer, bool everyone_non_allied)
bool unit_perform_action(struct player *pplayer, const int actor_id, const int target_id, const int sub_tgt_id_incoming, const char *name, const action_id action_type, const enum action_requester requester)
void create_trade_route(struct city *from, struct city *to, struct goods_type *goods)
const struct unit_type * unit_type_get(const struct unit *punit)
struct unit_type * unit_type_array_first(void)
int num_role_units(int role)
bool utype_player_already_has_this_unique(const struct player *pplayer, const struct unit_type *putype)
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
int utype_veteran_levels(const struct unit_type *punittype)
const char * utype_rule_name(const struct unit_type *punittype)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
const struct unit_type * unit_type_array_last(void)
static bool utype_has_flag(const struct unit_type *punittype, int flag)