Freeciv21
Develop your civilization from humble roots to a global empire
actions.h File Reference
#include "fc_types.h"
#include "metaknowledge.h"
#include "requirements.h"
#include "specenum_gen.h"
#include "speclist.h"
+ Include dependency graph for actions.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  action
 
struct  action_enabler
 
struct  action_auto_perf
 

Macros

#define SPECENUM_NAME   action_actor_kind
 
#define SPECENUM_VALUE0   AAK_UNIT
 
#define SPECENUM_VALUE0NAME   N_("a unit")
 
#define SPECENUM_COUNT   AAK_COUNT
 
#define SPECENUM_NAME   action_target_kind
 
#define SPECENUM_VALUE0   ATK_CITY
 
#define SPECENUM_VALUE0NAME   N_("individual cities")
 
#define SPECENUM_VALUE1   ATK_UNIT
 
#define SPECENUM_VALUE1NAME   N_("individual units")
 
#define SPECENUM_VALUE2   ATK_UNITS
 
#define SPECENUM_VALUE2NAME   N_("unit stacks")
 
#define SPECENUM_VALUE3   ATK_TILE
 
#define SPECENUM_VALUE3NAME   N_("tiles")
 
#define SPECENUM_VALUE4   ATK_SELF
 
#define SPECENUM_VALUE4NAME   N_("itself")
 
#define SPECENUM_COUNT   ATK_COUNT
 
#define SPECENUM_NAME   action_sub_target_kind
 
#define SPECENUM_VALUE0   ASTK_NONE
 
#define SPECENUM_VALUE0NAME   N_("nothing")
 
#define SPECENUM_VALUE1   ASTK_BUILDING
 
#define SPECENUM_VALUE1NAME   N_("buildings in")
 
#define SPECENUM_VALUE2   ASTK_TECH
 
#define SPECENUM_VALUE2NAME   N_("techs from")
 
#define SPECENUM_VALUE3   ASTK_EXTRA
 
#define SPECENUM_VALUE3NAME   N_("extras on")
 
#define SPECENUM_VALUE4   ASTK_EXTRA_NOT_THERE
 
#define SPECENUM_VALUE4NAME   N_("create extras on")
 
#define SPECENUM_COUNT   ASTK_COUNT
 
#define SPECENUM_NAME   gen_action
 
#define SPECENUM_VALUE0   ACTION_ESTABLISH_EMBASSY
 
#define SPECENUM_VALUE0NAME   "Establish Embassy"
 
#define SPECENUM_VALUE1   ACTION_ESTABLISH_EMBASSY_STAY
 
#define SPECENUM_VALUE1NAME   "Establish Embassy Stay"
 
#define SPECENUM_VALUE2   ACTION_SPY_INVESTIGATE_CITY
 
#define SPECENUM_VALUE2NAME   "Investigate City"
 
#define SPECENUM_VALUE3   ACTION_INV_CITY_SPEND
 
#define SPECENUM_VALUE3NAME   "Investigate City Spend Unit"
 
#define SPECENUM_VALUE4   ACTION_SPY_POISON
 
#define SPECENUM_VALUE4NAME   "Poison City"
 
#define SPECENUM_VALUE5   ACTION_SPY_POISON_ESC
 
#define SPECENUM_VALUE5NAME   "Poison City Escape"
 
#define SPECENUM_VALUE6   ACTION_SPY_STEAL_GOLD
 
#define SPECENUM_VALUE6NAME   "Steal Gold"
 
#define SPECENUM_VALUE7   ACTION_SPY_STEAL_GOLD_ESC
 
#define SPECENUM_VALUE7NAME   "Steal Gold Escape"
 
#define SPECENUM_VALUE8   ACTION_SPY_SABOTAGE_CITY
 
#define SPECENUM_VALUE8NAME   "Sabotage City"
 
#define SPECENUM_VALUE9   ACTION_SPY_SABOTAGE_CITY_ESC
 
#define SPECENUM_VALUE9NAME   "Sabotage City Escape"
 
#define SPECENUM_VALUE10   ACTION_SPY_TARGETED_SABOTAGE_CITY
 
#define SPECENUM_VALUE10NAME   "Targeted Sabotage City"
 
#define SPECENUM_VALUE11   ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC
 
#define SPECENUM_VALUE11NAME   "Targeted Sabotage City Escape"
 
#define SPECENUM_VALUE12   ACTION_SPY_SABOTAGE_CITY_PRODUCTION
 
#define SPECENUM_VALUE12NAME   "Sabotage City Production"
 
#define SPECENUM_VALUE13   ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC
 
#define SPECENUM_VALUE13NAME   "Sabotage City Production Escape"
 
#define SPECENUM_VALUE14   ACTION_SPY_STEAL_TECH
 
#define SPECENUM_VALUE14NAME   "Steal Tech"
 
#define SPECENUM_VALUE15   ACTION_SPY_STEAL_TECH_ESC
 
#define SPECENUM_VALUE15NAME   "Steal Tech Escape Expected"
 
#define SPECENUM_VALUE16   ACTION_SPY_TARGETED_STEAL_TECH
 
#define SPECENUM_VALUE16NAME   "Targeted Steal Tech"
 
#define SPECENUM_VALUE17   ACTION_SPY_TARGETED_STEAL_TECH_ESC
 
#define SPECENUM_VALUE17NAME   "Targeted Steal Tech Escape Expected"
 
#define SPECENUM_VALUE18   ACTION_SPY_INCITE_CITY
 
#define SPECENUM_VALUE18NAME   "Incite City"
 
#define SPECENUM_VALUE19   ACTION_SPY_INCITE_CITY_ESC
 
#define SPECENUM_VALUE19NAME   "Incite City Escape"
 
#define SPECENUM_VALUE20   ACTION_TRADE_ROUTE
 
#define SPECENUM_VALUE20NAME   "Establish Trade Route"
 
#define SPECENUM_VALUE21   ACTION_MARKETPLACE
 
#define SPECENUM_VALUE21NAME   "Enter Marketplace"
 
#define SPECENUM_VALUE22   ACTION_HELP_WONDER
 
#define SPECENUM_VALUE22NAME   "Help Wonder"
 
#define SPECENUM_VALUE23   ACTION_SPY_BRIBE_UNIT
 
#define SPECENUM_VALUE23NAME   "Bribe Unit"
 
#define SPECENUM_VALUE24   ACTION_SPY_SABOTAGE_UNIT
 
#define SPECENUM_VALUE24NAME   "Sabotage Unit"
 
#define SPECENUM_VALUE25   ACTION_SPY_SABOTAGE_UNIT_ESC
 
#define SPECENUM_VALUE25NAME   "Sabotage Unit Escape"
 
#define SPECENUM_VALUE26   ACTION_CAPTURE_UNITS
 
#define SPECENUM_VALUE26NAME   "Capture Units"
 
#define SPECENUM_VALUE27   ACTION_FOUND_CITY
 
#define SPECENUM_VALUE27NAME   "Found City"
 
#define SPECENUM_VALUE28   ACTION_JOIN_CITY
 
#define SPECENUM_VALUE28NAME   "Join City"
 
#define SPECENUM_VALUE29   ACTION_STEAL_MAPS
 
#define SPECENUM_VALUE29NAME   "Steal Maps"
 
#define SPECENUM_VALUE30   ACTION_STEAL_MAPS_ESC
 
#define SPECENUM_VALUE30NAME   "Steal Maps Escape"
 
#define SPECENUM_VALUE31   ACTION_BOMBARD
 
#define SPECENUM_VALUE31NAME   "Bombard"
 
#define SPECENUM_VALUE32   ACTION_BOMBARD2
 
#define SPECENUM_VALUE32NAME   "Bombard 2"
 
#define SPECENUM_VALUE33   ACTION_BOMBARD3
 
#define SPECENUM_VALUE33NAME   "Bombard 3"
 
#define SPECENUM_VALUE34   ACTION_SPY_NUKE
 
#define SPECENUM_VALUE34NAME   "Suitcase Nuke"
 
#define SPECENUM_VALUE35   ACTION_SPY_NUKE_ESC
 
#define SPECENUM_VALUE35NAME   "Suitcase Nuke Escape"
 
#define SPECENUM_VALUE36   ACTION_NUKE
 
#define SPECENUM_VALUE36NAME   "Explode Nuclear"
 
#define SPECENUM_VALUE37   ACTION_NUKE_CITY
 
#define SPECENUM_VALUE37NAME   "Nuke City"
 
#define SPECENUM_VALUE38   ACTION_NUKE_UNITS
 
#define SPECENUM_VALUE38NAME   "Nuke Units"
 
#define SPECENUM_VALUE39   ACTION_DESTROY_CITY
 
#define SPECENUM_VALUE39NAME   "Destroy City"
 
#define SPECENUM_VALUE40   ACTION_EXPEL_UNIT
 
#define SPECENUM_VALUE40NAME   "Expel Unit"
 
#define SPECENUM_VALUE41   ACTION_RECYCLE_UNIT
 
#define SPECENUM_VALUE41NAME   "Recycle Unit"
 
#define SPECENUM_VALUE42   ACTION_DISBAND_UNIT
 
#define SPECENUM_VALUE42NAME   "Disband Unit"
 
#define SPECENUM_VALUE43   ACTION_HOME_CITY
 
#define SPECENUM_VALUE43NAME   "Home City"
 
#define SPECENUM_VALUE44   ACTION_UPGRADE_UNIT
 
#define SPECENUM_VALUE44NAME   "Upgrade Unit"
 
#define SPECENUM_VALUE45   ACTION_PARADROP
 
#define SPECENUM_VALUE45NAME   "Paradrop Unit"
 
#define SPECENUM_VALUE46   ACTION_AIRLIFT
 
#define SPECENUM_VALUE46NAME   "Airlift Unit"
 
#define SPECENUM_VALUE47   ACTION_ATTACK
 
#define SPECENUM_VALUE47NAME   "Attack"
 
#define SPECENUM_VALUE48   ACTION_SUICIDE_ATTACK
 
#define SPECENUM_VALUE48NAME   "Suicide Attack"
 
#define SPECENUM_VALUE49   ACTION_STRIKE_BUILDING
 
#define SPECENUM_VALUE49NAME   "Surgical Strike Building"
 
#define SPECENUM_VALUE50   ACTION_STRIKE_PRODUCTION
 
#define SPECENUM_VALUE50NAME   "Surgical Strike Production"
 
#define SPECENUM_VALUE51   ACTION_CONQUER_CITY
 
#define SPECENUM_VALUE51NAME   "Conquer City"
 
#define SPECENUM_VALUE52   ACTION_CONQUER_CITY2
 
#define SPECENUM_VALUE52NAME   "Conquer City 2"
 
#define SPECENUM_VALUE53   ACTION_HEAL_UNIT
 
#define SPECENUM_VALUE53NAME   "Heal Unit"
 
#define SPECENUM_VALUE54   ACTION_TRANSFORM_TERRAIN
 
#define SPECENUM_VALUE54NAME   "Transform Terrain"
 
#define SPECENUM_VALUE55   ACTION_CULTIVATE
 
#define SPECENUM_VALUE55NAME   "Cultivate"
 
#define SPECENUM_VALUE56   ACTION_PLANT
 
#define SPECENUM_VALUE56NAME   "Plant"
 
#define SPECENUM_VALUE57   ACTION_PILLAGE
 
#define SPECENUM_VALUE57NAME   "Pillage"
 
#define SPECENUM_VALUE58   ACTION_FORTIFY
 
#define SPECENUM_VALUE58NAME   "Fortify"
 
#define SPECENUM_VALUE59   ACTION_ROAD
 
#define SPECENUM_VALUE59NAME   "Build Road"
 
#define SPECENUM_VALUE60   ACTION_CONVERT
 
#define SPECENUM_VALUE60NAME   "Convert Unit"
 
#define SPECENUM_VALUE61   ACTION_BASE
 
#define SPECENUM_VALUE61NAME   "Build Base"
 
#define SPECENUM_VALUE62   ACTION_MINE
 
#define SPECENUM_VALUE62NAME   "Build Mine"
 
#define SPECENUM_VALUE63   ACTION_IRRIGATE
 
#define SPECENUM_VALUE63NAME   "Build Irrigation"
 
#define SPECENUM_VALUE64   ACTION_CLEAN_POLLUTION
 
#define SPECENUM_VALUE64NAME   "Clean Pollution"
 
#define SPECENUM_VALUE65   ACTION_CLEAN_FALLOUT
 
#define SPECENUM_VALUE65NAME   "Clean Fallout"
 
#define SPECENUM_VALUE66   ACTION_TRANSPORT_ALIGHT
 
#define SPECENUM_VALUE66NAME   "Transport Alight"
 
#define SPECENUM_VALUE67   ACTION_TRANSPORT_UNLOAD
 
#define SPECENUM_VALUE67NAME   "Transport Unload"
 
#define SPECENUM_VALUE68   ACTION_TRANSPORT_DISEMBARK1
 
#define SPECENUM_VALUE68NAME   "Transport Disembark"
 
#define SPECENUM_VALUE69   ACTION_TRANSPORT_DISEMBARK2
 
#define SPECENUM_VALUE69NAME   "Transport Disembark 2"
 
#define SPECENUM_VALUE70   ACTION_TRANSPORT_BOARD
 
#define SPECENUM_VALUE70NAME   "Transport Board"
 
#define SPECENUM_VALUE71   ACTION_TRANSPORT_EMBARK
 
#define SPECENUM_VALUE71NAME   "Transport Embark"
 
#define SPECENUM_VALUE72   ACTION_SPY_SPREAD_PLAGUE
 
#define SPECENUM_VALUE72NAME   "Spread Plague"
 
#define SPECENUM_VALUE73   ACTION_SPY_ATTACK
 
#define SPECENUM_VALUE73NAME   "Spy Attack"
 
#define SPECENUM_VALUE74   ACTION_USER_ACTION1
 
#define SPECENUM_VALUE74NAME   "User Action 1"
 
#define SPECENUM_VALUE75   ACTION_USER_ACTION2
 
#define SPECENUM_VALUE75NAME   "User Action 2"
 
#define SPECENUM_VALUE76   ACTION_USER_ACTION3
 
#define SPECENUM_VALUE76NAME   "User Action 3"
 
#define SPECENUM_BITVECTOR   bv_actions
 
#define SPECENUM_COUNT   ACTION_COUNT
 
#define ACTION_ANY   ACTION_COUNT
 
#define ACTION_NONE   ACTION_COUNT
 
#define MAX_NUM_ACTIONS   ACTION_COUNT
 
#define NUM_ACTIONS   MAX_NUM_ACTIONS
 
#define SPECENUM_NAME   action_battle_kind
 
#define SPECENUM_VALUE0   ABK_NONE
 
#define SPECENUM_VALUE0NAME   N_("no battle")
 
#define SPECENUM_VALUE1   ABK_STANDARD
 
#define SPECENUM_VALUE1NAME   N_("battle")
 
#define SPECENUM_VALUE2   ABK_DIPLOMATIC
 
#define SPECENUM_VALUE2NAME   N_("diplomatic battle")
 
#define SPECENUM_COUNT   ABK_COUNT
 
#define SPECENUM_NAME   moves_actor_kind
 
#define SPECENUM_VALUE0   MAK_STAYS
 
#define SPECENUM_VALUE0NAME   N_("stays")
 
#define SPECENUM_VALUE1   MAK_REGULAR
 
#define SPECENUM_VALUE1NAME   N_("regular")
 
#define SPECENUM_VALUE2   MAK_TELEPORT
 
#define SPECENUM_VALUE2NAME   N_("teleport")
 
#define SPECENUM_VALUE3   MAK_ESCAPE
 
#define SPECENUM_VALUE3NAME   N_("escape")
 
#define SPECENUM_VALUE4   MAK_FORCED
 
#define SPECENUM_VALUE4NAME   N_("forced")
 
#define SPECENUM_VALUE5   MAK_UNREPRESENTABLE
 
#define SPECENUM_VALUE5NAME   N_("unrepresentable")
 
#define SPECENUM_NAME   action_requester
 
#define SPECENUM_VALUE0   ACT_REQ_PLAYER
 
#define SPECENUM_VALUE0NAME   N_("the player")
 
#define SPECENUM_VALUE1   ACT_REQ_RULES
 
#define SPECENUM_VALUE1NAME   N_("the game rules")
 
#define SPECENUM_VALUE2   ACT_REQ_SS_AGENT
 
#define SPECENUM_VALUE2NAME   N_("a server agent")
 
#define SPECENUM_COUNT   ACT_REQ_COUNT
 
#define ACTION_DISTANCE_LAST_NON_SIGNAL   128016
 
#define ACTION_DISTANCE_UNLIMITED   (ACTION_DISTANCE_LAST_NON_SIGNAL + 1)
 
#define ACTION_DISTANCE_MAX   ACTION_DISTANCE_UNLIMITED
 
#define SPECENUM_NAME   act_tgt_compl
 
#define SPECENUM_VALUE0   ACT_TGT_COMPL_SIMPLE
 
#define SPECENUM_VALUE0NAME   N_("simple")
 
#define SPECENUM_VALUE1   ACT_TGT_COMPL_FLEXIBLE
 
#define SPECENUM_VALUE1NAME   N_("flexible")
 
#define SPECENUM_VALUE2   ACT_TGT_COMPL_MANDATORY
 
#define SPECENUM_VALUE2NAME   N_("mandatory")
 
#define enabler_get_action(_enabler_)   action_by_number(_enabler_->action)
 
#define SPECLIST_TAG   action_enabler
 
#define SPECLIST_TYPE   struct action_enabler
 
#define action_enabler_list_iterate(action_enabler_list, aenabler)    TYPED_LIST_ITERATE(struct action_enabler, action_enabler_list, aenabler)
 
#define action_enabler_list_iterate_end   LIST_ITERATE_END
 
#define action_iterate(_act_)
 
#define action_iterate_end
 
#define action_by_result_iterate(_paction_, _act_id_, _result_)
 
#define action_by_result_iterate_end
 
#define action_list_iterate(_act_list_, _act_id_)
 
#define action_list_iterate_end
 
#define action_enablers_iterate(_enabler_)
 
#define action_enablers_iterate_end
 
#define SPECENUM_NAME   action_auto_perf_cause
 
#define SPECENUM_VALUE0   AAPC_UNIT_UPKEEP
 
#define SPECENUM_VALUE0NAME   N_("Unit Upkeep")
 
#define SPECENUM_VALUE1   AAPC_UNIT_MOVED_ADJ
 
#define SPECENUM_VALUE1NAME   N_("Moved Adjacent")
 
#define SPECENUM_COUNT   AAPC_COUNT
 
#define action_auto_perf_iterate(_act_perf_)
 
#define action_auto_perf_iterate_end
 
#define action_auto_perf_by_cause_iterate(_cause_, _act_perf_)
 
#define action_auto_perf_by_cause_iterate_end
 
#define action_auto_perf_actions_iterate(_autoperf_, _act_id_)    action_list_iterate(_autoperf_->alternatives, _act_id_)
 
#define action_auto_perf_actions_iterate_end   action_list_iterate_end
 
#define ACTION_AUTO_UPKEEP_FOOD   0
 
#define ACTION_AUTO_UPKEEP_GOLD   1
 
#define ACTION_AUTO_UPKEEP_SHIELD   2
 
#define ACTION_AUTO_MOVED_ADJ   3
 
#define action_id_get_actor_kind(act_id)    action_get_actor_kind(action_by_number(act_id))
 
#define action_id_get_target_kind(act_id)    action_get_target_kind(action_by_number(act_id))
 
#define action_id_get_sub_target_kind(act_id)    action_get_sub_target_kind(action_by_number(act_id))
 
#define action_has_result_safe(paction, result)    (paction && action_has_result(paction, result))
 
#define action_id_has_result_safe(act_id, result)
 
#define action_id_has_complex_target(act_id)    action_has_complex_target(action_by_number(act_id))
 
#define action_id_requires_details(act_id)    action_requires_details(action_by_number(act_id))
 
#define action_id_get_act_time(act_id, actor_unit, tgt_tile, tgt_extra)
 
#define action_id_distance_accepted(act_id, distance)    action_distance_accepted(action_by_number(act_id), distance)
 
#define action_id_distance_inside_max(act_id, distance)    action_distance_inside_max(action_by_number(act_id), distance)
 
#define action_id_would_be_blocked_by(blocked_id, blocker_id)
 
#define action_id_get_role(act_id)   action_get_role(action_by_number(act_id))
 
#define action_id_get_activity(act_id)    action_get_activity(action_by_number(act_id))
 
#define ACTPROB_IMPOSSIBLE   action_prob_new_impossible()
 
#define ACTPROB_CERTAIN   action_prob_new_certain()
 
#define ACTPROB_NA   action_prob_new_not_relevant()
 
#define ACTPROB_NOT_IMPLEMENTED   action_prob_new_not_impl()
 
#define ACTPROB_NOT_KNOWN   action_prob_new_unknown()
 
#define ACTION_ODDS_PCT_DICE_ROLL_NA   110
 
#define action_id_univs_not_blocking(act_id, act_uni, tgt_uni)    action_univs_not_blocking(action_by_number(act_id), act_uni, tgt_uni)
 

Functions

void actions_init ()
 Initialize the actions and the action enablers. More...
 
void actions_rs_pre_san_gen ()
 Generate action related data based on the currently loaded ruleset. More...
 
void actions_free ()
 Free the actions and the action enablers. More...
 
bool actions_are_ready ()
 Returns TRUE iff the actions are initialized. More...
 
bool action_id_exists (const action_id act_id)
 Returns TRUE iff the specified action ID refers to a valid action. More...
 
struct actionaction_by_number (action_id act_id)
 Return the action with the given id. More...
 
struct actionaction_by_rule_name (const char *name)
 Return the action with the given name. More...
 
enum action_actor_kind action_get_actor_kind (const struct action *paction)
 Get the actor kind of an action. More...
 
enum action_target_kind action_get_target_kind (const struct action *paction)
 Get the target kind of an action. More...
 
enum action_sub_target_kind action_get_sub_target_kind (const struct action *paction)
 Get the sub target kind of an action. More...
 
enum action_battle_kind action_get_battle_kind (const struct action *pact)
 Get the battle kind that can prevent an action. More...
 
int action_number (const struct action *action)
 Get the universal number of the action. More...
 
bool action_has_result (const struct action *paction, enum action_result result)
 Returns TRUE iff performing the specified action has the specified result. More...
 
bool action_has_complex_target (const struct action *paction)
 Returns TRUE iff the specified action allows the player to provide details in addition to actor and target. More...
 
bool action_requires_details (const struct action *paction)
 Returns TRUE iff the specified action REQUIRES the player to provide details in addition to actor and target. More...
 
int action_get_act_time (const struct action *paction, const struct unit *actor_unit, const struct tile *tgt_tile, const struct extra_type *tgt_extra)
 Returns the unit activity time (work) this action takes (requires) or ACT_TIME_INSTANTANEOUS if the action happens at once. More...
 
bool action_creates_extra (const struct action *paction, const struct extra_type *pextra)
 Returns TRUE iff the specified action can create the specified extra. More...
 
bool action_removes_extra (const struct action *paction, const struct extra_type *pextra)
 Returns TRUE iff the specified action can remove the specified extra. More...
 
bool action_id_is_rare_pop_up (action_id act_id)
 Returns TRUE iff a unit's ability to perform this action will pop up the action selection dialog before the player asks for it only in exceptional cases. More...
 
bool action_distance_accepted (const struct action *action, const int distance)
 Returns TRUE iff the specified distance between actor and target is within the range acceptable to the specified action. More...
 
bool action_distance_inside_max (const struct action *action, const int distance)
 Returns TRUE iff the specified distance between actor and target is sm,aller or equal to the max range accepted by the specified action. More...
 
bool action_would_be_blocked_by (const struct action *blocked, const struct action *blocker)
 Returns TRUE iff blocked will be illegal if blocker is legal. More...
 
int action_get_role (const struct action *paction)
 Get the unit type role corresponding to the ability to do the specified action. More...
 
enum unit_activity action_get_activity (const struct action *paction)
 Returns the unit activity this action may cause or ACTIVITY_LAST if the action doesn't result in a unit activity. More...
 
const char * action_rule_name (const struct action *action)
 Get the rule name of the action. More...
 
const char * action_id_rule_name (action_id act_id)
 Get the rule name of the action. More...
 
const QString action_name_translation (const struct action *action)
 Get the action name used when displaying the action in the UI. More...
 
const QString action_id_name_translation (action_id act_id)
 Get the action name used when displaying the action in the UI. More...
 
const QString action_prepare_ui_name (action_id act_id, const char *mnemonic, const struct act_prob prob, const QString &custom)
 Get the UI name ready to show the action in the UI. More...
 
const char * action_ui_name_ruleset_var_name (int act)
 Return ui_name ruleset variable name for the action. More...
 
const char * action_ui_name_default (int act)
 Return default ui_name for the action. More...
 
const char * action_min_range_ruleset_var_name (int act)
 Return min range ruleset variable name for the action or nullptr if min range can't be set in the ruleset. More...
 
int action_min_range_default (int act)
 Return default min range for the action if it is ruleset settable. More...
 
const char * action_max_range_ruleset_var_name (int act)
 Return max range ruleset variable name for the action or nullptr if max range can't be set in the ruleset. More...
 
int action_max_range_default (int act)
 Return default max range for the action if it is ruleset settable. More...
 
const char * action_target_kind_ruleset_var_name (int act)
 Return target kind ruleset variable name for the action or nullptr if min range can't be set in the ruleset. More...
 
const char * action_actor_consuming_always_ruleset_var_name (action_id act)
 Return actor consuming always ruleset variable name for the action or nullptr if actor consuming always can't be set in the ruleset. More...
 
struct action_enabler_list * action_enablers_for_action (action_id action)
 Get all enablers for an action in the current ruleset. More...
 
struct action_enableraction_enabler_new ()
 Create a new action enabler. More...
 
void action_enabler_free (struct action_enabler *enabler)
 Free resources allocated for the action enabler. More...
 
struct action_enableraction_enabler_copy (const struct action_enabler *original)
 Create a new copy of an existing action enabler. More...
 
void action_enabler_add (struct action_enabler *enabler)
 Add an action enabler to the current ruleset. More...
 
bool action_enabler_remove (struct action_enabler *enabler)
 Remove an action enabler from the current ruleset. More...
 
struct req_vec_problemaction_enabler_suggest_repair_oblig (const struct action_enabler *enabler)
 Returns a suggestion to add an obligatory hard requirement to an action enabler or nullptr if no hard obligatory reqs were missing. More...
 
struct req_vec_problemaction_enabler_suggest_repair (const struct action_enabler *enabler)
 Returns a suggestion to fix the specified action enabler or nullptr if no fix is found to be needed. More...
 
struct req_vec_problemaction_enabler_suggest_improvement (const struct action_enabler *enabler)
 Returns a suggestion to improve the specified action enabler or nullptr if nothing to improve is found to be needed. More...
 
req_vec_num_in_item action_enabler_vector_number (const void *enabler, const struct requirement_vector *vec)
 Returns the requirement vector number of the specified requirement vector in the specified action enabler. More...
 
struct requirement_vector * action_enabler_vector_by_number (const void *enabler, req_vec_num_in_item vec)
 Returns a writable pointer to the specified requirement vector in the action enabler or nullptr if the action enabler doesn't have a requirement vector with that requirement vector number. More...
 
const char * action_enabler_vector_by_number_name (req_vec_num_in_item vec)
 Returns the name of the given requirement vector number n in an action enabler or nullptr if enablers don't have a requirement vector with that number. More...
 
struct actionaction_is_blocked_by (const action_id act_id, const struct unit *actor_unit, const struct tile *target_tile, const struct city *target_city, const struct unit *target_unit)
 Returns the action that blocks the specified action or nullptr if the specified action isn't blocked. More...
 
bool is_action_enabled_unit_on_city (const action_id wanted_action, const struct unit *actor_unit, const struct city *target_city)
 Returns TRUE if actor_unit can do wanted_action to target_city as far as action enablers are concerned. More...
 
bool is_action_enabled_unit_on_unit (const action_id wanted_action, const struct unit *actor_unit, const struct unit *target_unit)
 Returns TRUE if actor_unit can do wanted_action to target_unit as far as action enablers are concerned. More...
 
bool is_action_enabled_unit_on_units (const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile)
 Returns TRUE if actor_unit can do wanted_action to all units on the target_tile as far as action enablers are concerned. More...
 
bool is_action_enabled_unit_on_tile (const action_id wanted_action, const struct unit *actor_unit, const struct tile *target_tile, const struct extra_type *target_extra)
 Returns TRUE if actor_unit can do wanted_action to the target_tile as far as action enablers are concerned. More...
 
bool is_action_enabled_unit_on_self (const action_id wanted_action, const struct unit *actor_unit)
 Returns TRUE if actor_unit can do wanted_action to itself as far as action enablers are concerned. More...
 
struct act_prob action_prob_vs_city (const struct unit *actor, const action_id act_id, const struct city *victim)
 Get the actor unit's probability of successfully performing the chosen action on the target city. More...
 
struct act_prob action_prob_vs_unit (const struct unit *actor, const action_id act_id, const struct unit *victim)
 Get the actor unit's probability of successfully performing the chosen action on the target unit. More...
 
struct act_prob action_prob_vs_units (const struct unit *actor, const action_id act_id, const struct tile *victims)
 Get the actor unit's probability of successfully performing the chosen action on all units at the target tile. More...
 
struct act_prob action_prob_vs_tile (const struct unit *actor, const action_id act_id, const struct tile *victims, const struct extra_type *target_extra)
 Get the actor unit's probability of successfully performing the chosen action on the target tile. More...
 
struct act_prob action_prob_self (const struct unit *actor, const action_id act_id)
 Get the actor unit's probability of successfully performing the chosen action on itself. More...
 
struct act_prob action_prob_unit_vs_tgt (const struct action *paction, const struct unit *act_unit, const struct city *tgt_city, const struct unit *tgt_unit, const struct tile *tgt_tile, const struct extra_type *sub_tgt)
 Returns the actor unit's probability of successfully performing the specified action against the action specific target. More...
 
struct act_prob action_speculate_unit_on_city (action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct city *target)
 Returns a speculation about the actor unit's probability of successfully performing the chosen action on the target city given the specified game state changes. More...
 
struct act_prob action_speculate_unit_on_units (action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct tile *target)
 Returns a speculation about the actor unit's probability of successfully performing the chosen action on the target unit stack given the specified game state changes. More...
 
struct act_prob action_speculate_unit_on_tile (action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat, const struct tile *target_tile, const struct extra_type *target_extra)
 Returns a speculation about the actor unit's probability of successfully performing the chosen action on the target tile (and, if specified, extra) given the specified game state changes. More...
 
struct act_prob action_speculate_unit_on_self (action_id act_id, const struct unit *actor, const struct city *actor_home, const struct tile *actor_tile, bool omniscient_cheat)
 Returns a speculation about the actor unit's probability of successfully performing the chosen action on itself given the specified game state changes. More...
 
bool action_prob_possible (const struct act_prob probability)
 Returns TRUE iff the given action probability belongs to an action that may be possible. More...
 
bool are_action_probabilitys_equal (const struct act_prob *ap1, const struct act_prob *ap2)
 Returns TRUE iff ap1 and ap2 are equal. More...
 
int action_prob_cmp_pessimist (const struct act_prob ap1, const struct act_prob ap2)
 Compare action probabilities. More...
 
double action_prob_to_0_to_1_pessimist (const struct act_prob ap)
 Returns double in the range [0-1] representing the minimum of the given action probability. More...
 
struct act_prob action_prob_fall_back (const struct act_prob *ap1, const struct act_prob *ap2)
 Returns ap1 with ap2 as fall back in cases where ap1 doesn't happen. More...
 
const QString action_prob_explain (const struct act_prob prob)
 Explain an action probability in a way suitable for a tool tip for the button that starts it. More...
 
struct act_prob action_prob_new_impossible ()
 Returns the impossible action probability. More...
 
struct act_prob action_prob_new_not_relevant ()
 Returns the n/a action probability. More...
 
struct act_prob action_prob_new_not_impl ()
 Returns the "not implemented" action probability. More...
 
struct act_prob action_prob_new_unknown ()
 Returns the "user don't know" action probability. More...
 
struct act_prob action_prob_new_certain ()
 Returns the certain action probability. More...
 
int action_dice_roll_initial_odds (const struct action *paction)
 Returns the initial odds of an action not failing its dice roll. More...
 
int action_dice_roll_odds (const struct player *act_player, const struct unit *act_unit, const struct city *tgt_city, const struct player *tgt_player, const struct action *paction)
 Returns the odds of an action not failing its dice roll. More...
 
bool action_actor_utype_hard_reqs_ok (enum action_result result, const struct unit_type *actor_unittype)
 Returns TRUE if the specified unit type can perform an action with the wanted result given that an action enabler later will enable it. More...
 
bool action_univs_not_blocking (const struct action *paction, struct universal *actor_uni, struct universal *target_uni)
 Is there any action enablers of the given type not blocked by universals? More...
 
bool action_immune_government (struct government *gov, action_id act)
 Will a player with the government gov be immune to the action act? More...
 
bool is_action_possible_on_city (action_id act_id, const struct player *actor_player, const struct city *target_city)
 Returns TRUE if the wanted action can be done to the target city. More...
 
bool is_action_possible_on_unit (action_id act_id, const unit *target_unit)
 Checks if there is any hopes that the action is possible against the target unit (by chacking the target_reqs). More...
 
bool action_maybe_possible_actor_unit (const action_id wanted_action, const struct unit *actor_unit)
 Returns TRUE if the wanted action (as far as the player knows) can be performed right now by the specified actor unit if an approriate target is provided. More...
 
bool action_mp_full_makes_legal (const struct unit *actor, const action_id act_id)
 Returns TRUE if the specified action can't be done now but would have been legal if the unit had full movement. More...
 
void action_list_end (action_id *act_list, int size)
 Terminate an action list of the specified size. More...
 
void action_list_add_all_by_result (action_id *act_list, int *position, enum action_result result)
 Add all actions with the specified result to the specified action list starting at the specified position. More...
 
const struct action_auto_perfaction_auto_perf_by_number (const int num)
 Returns action auto performer rule number num. More...
 
struct action_auto_perfaction_auto_perf_slot_number (const int num)
 Returns action auto performer rule slot number num so it can be filled. More...
 
struct cityaction_tgt_city (struct unit *actor, struct tile *target_tile, bool accept_all_actions)
 Find a city to target for an action on the specified tile. More...
 
struct unitaction_tgt_unit (struct unit *actor, struct tile *target_tile, bool accept_all_actions)
 Find a unit to target for an action at the specified tile. More...
 
struct tileaction_tgt_tile (struct unit *actor, struct tile *target_tile, const struct extra_type *target_extra, bool accept_all_actions)
 Returns the tile iff it, from the point of view of the owner of the actor unit, looks like a target tile. More...
 
struct extra_typeaction_tgt_tile_extra (const struct unit *actor, const struct tile *target_tile, bool accept_all_actions)
 Find an extra to target for an action at the specified tile. More...
 

Macro Definition Documentation

◆ ACTION_ANY

#define ACTION_ANY   ACTION_COUNT

Definition at line 217 of file actions.h.

◆ ACTION_AUTO_MOVED_ADJ

#define ACTION_AUTO_MOVED_ADJ   3

Definition at line 504 of file actions.h.

◆ action_auto_perf_actions_iterate

#define action_auto_perf_actions_iterate (   _autoperf_,
  _act_id_ 
)     action_list_iterate(_autoperf_->alternatives, _act_id_)

Definition at line 494 of file actions.h.

◆ action_auto_perf_actions_iterate_end

#define action_auto_perf_actions_iterate_end   action_list_iterate_end

Definition at line 497 of file actions.h.

◆ action_auto_perf_by_cause_iterate

#define action_auto_perf_by_cause_iterate (   _cause_,
  _act_perf_ 
)
Value:
{ \
if (_act_perf_->cause != _cause_) { \
continue; \
}
#define action_auto_perf_iterate(_act_perf_)
Definition: actions.h:468

Definition at line 483 of file actions.h.

◆ action_auto_perf_by_cause_iterate_end

#define action_auto_perf_by_cause_iterate_end
Value:
} \
action_auto_perf_iterate_end

Definition at line 490 of file actions.h.

◆ action_auto_perf_iterate

#define action_auto_perf_iterate (   _act_perf_)
Value:
{ \
int _ap_num_; \
\
for (_ap_num_ = 0; \
&& (action_auto_perf_by_number(_ap_num_)->cause != AAPC_COUNT); \
_ap_num_++) { \
const struct action_auto_perf *_act_perf_ = \
action_auto_perf_by_number(_ap_num_);
const struct action_auto_perf * action_auto_perf_by_number(const int num)
Returns action auto performer rule number num.
Definition: actions.cpp:5848
#define MAX_NUM_ACTION_AUTO_PERFORMERS
Definition: fc_types.h:48
enum action_auto_perf_cause cause
Definition: actions.h:457

Definition at line 468 of file actions.h.

◆ action_auto_perf_iterate_end

#define action_auto_perf_iterate_end
Value:
} \
}

Definition at line 479 of file actions.h.

◆ ACTION_AUTO_UPKEEP_FOOD

#define ACTION_AUTO_UPKEEP_FOOD   0

Definition at line 501 of file actions.h.

◆ ACTION_AUTO_UPKEEP_GOLD

#define ACTION_AUTO_UPKEEP_GOLD   1

Definition at line 502 of file actions.h.

◆ ACTION_AUTO_UPKEEP_SHIELD

#define ACTION_AUTO_UPKEEP_SHIELD   2

Definition at line 503 of file actions.h.

◆ action_by_result_iterate

#define action_by_result_iterate (   _paction_,
  _act_id_,
  _result_ 
)
Value:
{ \
action_iterate(_act_id_) \
{ \
struct action *_paction_ = action_by_number(_act_id_); \
if (!action_has_result(_paction_, _result_)) { \
continue; \
}
struct action * action_by_number(action_id act_id)
Return the action with the given id.
Definition: actions.cpp:1149
bool action_has_result(const struct action *paction, enum action_result result)
Returns TRUE iff performing the specified action has the specified result.
Definition: actions.cpp:1248

Definition at line 387 of file actions.h.

◆ action_by_result_iterate_end

#define action_by_result_iterate_end
Value:
} \
action_iterate_end; \
}

Definition at line 396 of file actions.h.

◆ ACTION_DISTANCE_LAST_NON_SIGNAL

#define ACTION_DISTANCE_LAST_NON_SIGNAL   128016

Definition at line 277 of file actions.h.

◆ ACTION_DISTANCE_MAX

#define ACTION_DISTANCE_MAX   ACTION_DISTANCE_UNLIMITED

Definition at line 281 of file actions.h.

◆ ACTION_DISTANCE_UNLIMITED

#define ACTION_DISTANCE_UNLIMITED   (ACTION_DISTANCE_LAST_NON_SIGNAL + 1)

Definition at line 279 of file actions.h.

◆ action_enabler_list_iterate

#define action_enabler_list_iterate (   action_enabler_list,
  aenabler 
)     TYPED_LIST_ITERATE(struct action_enabler, action_enabler_list, aenabler)

Definition at line 374 of file actions.h.

◆ action_enabler_list_iterate_end

#define action_enabler_list_iterate_end   LIST_ITERATE_END

Definition at line 376 of file actions.h.

◆ action_enablers_iterate

#define action_enablers_iterate (   _enabler_)
Value:
{ \
action_iterate(_act_) \
{ \
action_enabler_list_iterate(action_enablers_for_action(_act_), \
_enabler_) \
{
struct action_enabler_list * action_enablers_for_action(action_id action)
Get all enablers for an action in the current ruleset.
Definition: actions.cpp:1884

Definition at line 417 of file actions.h.

◆ action_enablers_iterate_end

#define action_enablers_iterate_end
Value:
} \
action_enabler_list_iterate_end; \
} \
action_iterate_end; \
}

Definition at line 425 of file actions.h.

◆ action_has_result_safe

#define action_has_result_safe (   paction,
  result 
)     (paction && action_has_result(paction, result))

Definition at line 535 of file actions.h.

◆ action_id_distance_accepted

#define action_id_distance_accepted (   act_id,
  distance 
)     action_distance_accepted(action_by_number(act_id), distance)

Definition at line 565 of file actions.h.

◆ action_id_distance_inside_max

#define action_id_distance_inside_max (   act_id,
  distance 
)     action_distance_inside_max(action_by_number(act_id), distance)

Definition at line 570 of file actions.h.

◆ action_id_get_act_time

#define action_id_get_act_time (   act_id,
  actor_unit,
  tgt_tile,
  tgt_extra 
)
Value:
action_get_act_time(action_by_number(act_id), actor_unit, tgt_tile, \
tgt_extra)
int action_get_act_time(const struct action *paction, const struct unit *actor_unit, const struct tile *tgt_tile, const struct extra_type *tgt_extra)
Returns the unit activity time (work) this action takes (requires) or ACT_TIME_INSTANTANEOUS if the a...
Definition: actions.cpp:1598

Definition at line 552 of file actions.h.

◆ action_id_get_activity

#define action_id_get_activity (   act_id)     action_get_activity(action_by_number(act_id))

Definition at line 583 of file actions.h.

◆ action_id_get_actor_kind

#define action_id_get_actor_kind (   act_id)     action_get_actor_kind(action_by_number(act_id))

Definition at line 519 of file actions.h.

◆ action_id_get_role

#define action_id_get_role (   act_id)    action_get_role(action_by_number(act_id))

Definition at line 580 of file actions.h.

◆ action_id_get_sub_target_kind

#define action_id_get_sub_target_kind (   act_id)     action_get_sub_target_kind(action_by_number(act_id))

Definition at line 526 of file actions.h.

◆ action_id_get_target_kind

#define action_id_get_target_kind (   act_id)     action_get_target_kind(action_by_number(act_id))

Definition at line 522 of file actions.h.

◆ action_id_has_complex_target

#define action_id_has_complex_target (   act_id)     action_has_complex_target(action_by_number(act_id))

Definition at line 542 of file actions.h.

◆ action_id_has_result_safe

#define action_id_has_result_safe (   act_id,
  result 
)
Value:
(action_by_number(act_id) \
&& action_has_result(action_by_number(act_id), result))

Definition at line 537 of file actions.h.

◆ action_id_requires_details

#define action_id_requires_details (   act_id)     action_requires_details(action_by_number(act_id))

Definition at line 545 of file actions.h.

◆ action_id_univs_not_blocking

#define action_id_univs_not_blocking (   act_id,
  act_uni,
  tgt_uni 
)     action_univs_not_blocking(action_by_number(act_id), act_uni, tgt_uni)

Definition at line 754 of file actions.h.

◆ action_id_would_be_blocked_by

#define action_id_would_be_blocked_by (   blocked_id,
  blocker_id 
)
Value:
action_by_number(blocker_id))
bool action_would_be_blocked_by(const struct action *blocked, const struct action *blocker)
Returns TRUE iff blocked will be illegal if blocker is legal.
Definition: actions.cpp:1326

Definition at line 575 of file actions.h.

◆ action_iterate

#define action_iterate (   _act_)
Value:
{ \
action_id _act_; \
for (_act_ = 0; _act_ < NUM_ACTIONS; _act_++) {
#define NUM_ACTIONS
Definition: actions.h:224

Definition at line 378 of file actions.h.

◆ action_iterate_end

#define action_iterate_end
Value:
} \
}

Definition at line 383 of file actions.h.

◆ action_list_iterate

#define action_list_iterate (   _act_list_,
  _act_id_ 
)
Value:
{ \
int _pos_; \
\
for (_pos_ = 0; _pos_ < NUM_ACTIONS; _pos_++) { \
const action_id _act_id_ = _act_list_[_pos_]; \
\
if (_act_id_ == ACTION_NONE) { \
/* No more actions in this list. */ \
break; \
}
#define ACTION_NONE
Definition: actions.h:220
int action_id
Definition: fc_types.h:306

Definition at line 401 of file actions.h.

◆ action_list_iterate_end

#define action_list_iterate_end
Value:
} \
}

Definition at line 413 of file actions.h.

◆ ACTION_NONE

#define ACTION_NONE   ACTION_COUNT

Definition at line 220 of file actions.h.

◆ ACTION_ODDS_PCT_DICE_ROLL_NA

#define ACTION_ODDS_PCT_DICE_ROLL_NA   110

Definition at line 739 of file actions.h.

◆ ACTPROB_CERTAIN

#define ACTPROB_CERTAIN   action_prob_new_certain()

Definition at line 733 of file actions.h.

◆ ACTPROB_IMPOSSIBLE

#define ACTPROB_IMPOSSIBLE   action_prob_new_impossible()

Definition at line 732 of file actions.h.

◆ ACTPROB_NA

#define ACTPROB_NA   action_prob_new_not_relevant()

Definition at line 734 of file actions.h.

◆ ACTPROB_NOT_IMPLEMENTED

#define ACTPROB_NOT_IMPLEMENTED   action_prob_new_not_impl()

Definition at line 735 of file actions.h.

◆ ACTPROB_NOT_KNOWN

#define ACTPROB_NOT_KNOWN   action_prob_new_unknown()

Definition at line 736 of file actions.h.

◆ enabler_get_action

#define enabler_get_action (   _enabler_)    action_by_number(_enabler_->action)

Definition at line 369 of file actions.h.

◆ MAX_NUM_ACTIONS

#define MAX_NUM_ACTIONS   ACTION_COUNT

Definition at line 223 of file actions.h.

◆ NUM_ACTIONS

#define NUM_ACTIONS   MAX_NUM_ACTIONS

Definition at line 224 of file actions.h.

◆ SPECENUM_BITVECTOR

#define SPECENUM_BITVECTOR   bv_actions

Definition at line 212 of file actions.h.

◆ SPECENUM_COUNT [1/7]

#define SPECENUM_COUNT   AAK_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_COUNT [2/7]

#define SPECENUM_COUNT   ATK_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_COUNT [3/7]

#define SPECENUM_COUNT   ASTK_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_COUNT [4/7]

#define SPECENUM_COUNT   ACTION_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_COUNT [5/7]

#define SPECENUM_COUNT   ABK_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_COUNT [6/7]

#define SPECENUM_COUNT   ACT_REQ_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_COUNT [7/7]

#define SPECENUM_COUNT   AAPC_COUNT

Definition at line 442 of file actions.h.

◆ SPECENUM_NAME [1/9]

#define SPECENUM_NAME   action_actor_kind

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [2/9]

#define SPECENUM_NAME   action_target_kind

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [3/9]

#define SPECENUM_NAME   action_sub_target_kind

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [4/9]

#define SPECENUM_NAME   gen_action

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [5/9]

#define SPECENUM_NAME   action_battle_kind

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [6/9]

#define SPECENUM_NAME   moves_actor_kind

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [7/9]

#define SPECENUM_NAME   action_requester

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [8/9]

#define SPECENUM_NAME   act_tgt_compl

Definition at line 433 of file actions.h.

◆ SPECENUM_NAME [9/9]

#define SPECENUM_NAME   action_auto_perf_cause

Definition at line 433 of file actions.h.

◆ SPECENUM_VALUE0 [1/9]

#define SPECENUM_VALUE0   AAK_UNIT

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [2/9]

#define SPECENUM_VALUE0   ATK_CITY

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [3/9]

#define SPECENUM_VALUE0   ASTK_NONE

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [4/9]

#define SPECENUM_VALUE0   ACTION_ESTABLISH_EMBASSY

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [5/9]

#define SPECENUM_VALUE0   ABK_NONE

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [6/9]

#define SPECENUM_VALUE0   MAK_STAYS

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [7/9]

#define SPECENUM_VALUE0   ACT_REQ_PLAYER

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [8/9]

#define SPECENUM_VALUE0   ACT_TGT_COMPL_SIMPLE

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0 [9/9]

#define SPECENUM_VALUE0   AAPC_UNIT_UPKEEP

Definition at line 436 of file actions.h.

◆ SPECENUM_VALUE0NAME [1/9]

#define SPECENUM_VALUE0NAME   N_("a unit")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [2/9]

#define SPECENUM_VALUE0NAME   N_("individual cities")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [3/9]

#define SPECENUM_VALUE0NAME   N_("nothing")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [4/9]

#define SPECENUM_VALUE0NAME   "Establish Embassy"

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [5/9]

#define SPECENUM_VALUE0NAME   N_("no battle")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [6/9]

#define SPECENUM_VALUE0NAME   N_("stays")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [7/9]

#define SPECENUM_VALUE0NAME   N_("the player")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [8/9]

#define SPECENUM_VALUE0NAME   N_("simple")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE0NAME [9/9]

#define SPECENUM_VALUE0NAME   N_("Unit Upkeep")

Definition at line 437 of file actions.h.

◆ SPECENUM_VALUE1 [1/8]

#define SPECENUM_VALUE1   ATK_UNIT

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [2/8]

#define SPECENUM_VALUE1   ASTK_BUILDING

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [3/8]

#define SPECENUM_VALUE1   ACTION_ESTABLISH_EMBASSY_STAY

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [4/8]

#define SPECENUM_VALUE1   ABK_STANDARD

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [5/8]

#define SPECENUM_VALUE1   MAK_REGULAR

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [6/8]

#define SPECENUM_VALUE1   ACT_REQ_RULES

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [7/8]

#define SPECENUM_VALUE1   ACT_TGT_COMPL_FLEXIBLE

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE1 [8/8]

#define SPECENUM_VALUE1   AAPC_UNIT_MOVED_ADJ

Definition at line 439 of file actions.h.

◆ SPECENUM_VALUE10

#define SPECENUM_VALUE10   ACTION_SPY_TARGETED_SABOTAGE_CITY

Definition at line 78 of file actions.h.

◆ SPECENUM_VALUE10NAME

#define SPECENUM_VALUE10NAME   "Targeted Sabotage City"

Definition at line 79 of file actions.h.

◆ SPECENUM_VALUE11

#define SPECENUM_VALUE11   ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC

Definition at line 80 of file actions.h.

◆ SPECENUM_VALUE11NAME

#define SPECENUM_VALUE11NAME   "Targeted Sabotage City Escape"

Definition at line 81 of file actions.h.

◆ SPECENUM_VALUE12

#define SPECENUM_VALUE12   ACTION_SPY_SABOTAGE_CITY_PRODUCTION

Definition at line 82 of file actions.h.

◆ SPECENUM_VALUE12NAME

#define SPECENUM_VALUE12NAME   "Sabotage City Production"

Definition at line 83 of file actions.h.

◆ SPECENUM_VALUE13

#define SPECENUM_VALUE13   ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC

Definition at line 84 of file actions.h.

◆ SPECENUM_VALUE13NAME

#define SPECENUM_VALUE13NAME   "Sabotage City Production Escape"

Definition at line 85 of file actions.h.

◆ SPECENUM_VALUE14

#define SPECENUM_VALUE14   ACTION_SPY_STEAL_TECH

Definition at line 86 of file actions.h.

◆ SPECENUM_VALUE14NAME

#define SPECENUM_VALUE14NAME   "Steal Tech"

Definition at line 87 of file actions.h.

◆ SPECENUM_VALUE15

#define SPECENUM_VALUE15   ACTION_SPY_STEAL_TECH_ESC

Definition at line 88 of file actions.h.

◆ SPECENUM_VALUE15NAME

#define SPECENUM_VALUE15NAME   "Steal Tech Escape Expected"

Definition at line 89 of file actions.h.

◆ SPECENUM_VALUE16

#define SPECENUM_VALUE16   ACTION_SPY_TARGETED_STEAL_TECH

Definition at line 90 of file actions.h.

◆ SPECENUM_VALUE16NAME

#define SPECENUM_VALUE16NAME   "Targeted Steal Tech"

Definition at line 91 of file actions.h.

◆ SPECENUM_VALUE17

#define SPECENUM_VALUE17   ACTION_SPY_TARGETED_STEAL_TECH_ESC

Definition at line 92 of file actions.h.

◆ SPECENUM_VALUE17NAME

#define SPECENUM_VALUE17NAME   "Targeted Steal Tech Escape Expected"

Definition at line 93 of file actions.h.

◆ SPECENUM_VALUE18

#define SPECENUM_VALUE18   ACTION_SPY_INCITE_CITY

Definition at line 94 of file actions.h.

◆ SPECENUM_VALUE18NAME

#define SPECENUM_VALUE18NAME   "Incite City"

Definition at line 95 of file actions.h.

◆ SPECENUM_VALUE19

#define SPECENUM_VALUE19   ACTION_SPY_INCITE_CITY_ESC

Definition at line 96 of file actions.h.

◆ SPECENUM_VALUE19NAME

#define SPECENUM_VALUE19NAME   "Incite City Escape"

Definition at line 97 of file actions.h.

◆ SPECENUM_VALUE1NAME [1/8]

#define SPECENUM_VALUE1NAME   N_("individual units")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [2/8]

#define SPECENUM_VALUE1NAME   N_("buildings in")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [3/8]

#define SPECENUM_VALUE1NAME   "Establish Embassy Stay"

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [4/8]

#define SPECENUM_VALUE1NAME   N_("battle")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [5/8]

#define SPECENUM_VALUE1NAME   N_("regular")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [6/8]

#define SPECENUM_VALUE1NAME   N_("the game rules")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [7/8]

#define SPECENUM_VALUE1NAME   N_("flexible")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE1NAME [8/8]

#define SPECENUM_VALUE1NAME   N_("Moved Adjacent")

Definition at line 440 of file actions.h.

◆ SPECENUM_VALUE2 [1/7]

#define SPECENUM_VALUE2   ATK_UNITS

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE2 [2/7]

#define SPECENUM_VALUE2   ASTK_TECH

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE2 [3/7]

#define SPECENUM_VALUE2   ACTION_SPY_INVESTIGATE_CITY

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE2 [4/7]

#define SPECENUM_VALUE2   ABK_DIPLOMATIC

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE2 [5/7]

#define SPECENUM_VALUE2   MAK_TELEPORT

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE2 [6/7]

#define SPECENUM_VALUE2   ACT_REQ_SS_AGENT

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE2 [7/7]

#define SPECENUM_VALUE2   ACT_TGT_COMPL_MANDATORY

Definition at line 301 of file actions.h.

◆ SPECENUM_VALUE20

#define SPECENUM_VALUE20   ACTION_TRADE_ROUTE

Definition at line 98 of file actions.h.

◆ SPECENUM_VALUE20NAME

#define SPECENUM_VALUE20NAME   "Establish Trade Route"

Definition at line 99 of file actions.h.

◆ SPECENUM_VALUE21

#define SPECENUM_VALUE21   ACTION_MARKETPLACE

Definition at line 100 of file actions.h.

◆ SPECENUM_VALUE21NAME

#define SPECENUM_VALUE21NAME   "Enter Marketplace"

Definition at line 101 of file actions.h.

◆ SPECENUM_VALUE22

#define SPECENUM_VALUE22   ACTION_HELP_WONDER

Definition at line 102 of file actions.h.

◆ SPECENUM_VALUE22NAME

#define SPECENUM_VALUE22NAME   "Help Wonder"

Definition at line 103 of file actions.h.

◆ SPECENUM_VALUE23

#define SPECENUM_VALUE23   ACTION_SPY_BRIBE_UNIT

Definition at line 104 of file actions.h.

◆ SPECENUM_VALUE23NAME

#define SPECENUM_VALUE23NAME   "Bribe Unit"

Definition at line 105 of file actions.h.

◆ SPECENUM_VALUE24

#define SPECENUM_VALUE24   ACTION_SPY_SABOTAGE_UNIT

Definition at line 106 of file actions.h.

◆ SPECENUM_VALUE24NAME

#define SPECENUM_VALUE24NAME   "Sabotage Unit"

Definition at line 107 of file actions.h.

◆ SPECENUM_VALUE25

#define SPECENUM_VALUE25   ACTION_SPY_SABOTAGE_UNIT_ESC

Definition at line 108 of file actions.h.

◆ SPECENUM_VALUE25NAME

#define SPECENUM_VALUE25NAME   "Sabotage Unit Escape"

Definition at line 109 of file actions.h.

◆ SPECENUM_VALUE26

#define SPECENUM_VALUE26   ACTION_CAPTURE_UNITS

Definition at line 110 of file actions.h.

◆ SPECENUM_VALUE26NAME

#define SPECENUM_VALUE26NAME   "Capture Units"

Definition at line 111 of file actions.h.

◆ SPECENUM_VALUE27

#define SPECENUM_VALUE27   ACTION_FOUND_CITY

Definition at line 112 of file actions.h.

◆ SPECENUM_VALUE27NAME

#define SPECENUM_VALUE27NAME   "Found City"

Definition at line 113 of file actions.h.

◆ SPECENUM_VALUE28

#define SPECENUM_VALUE28   ACTION_JOIN_CITY

Definition at line 114 of file actions.h.

◆ SPECENUM_VALUE28NAME

#define SPECENUM_VALUE28NAME   "Join City"

Definition at line 115 of file actions.h.

◆ SPECENUM_VALUE29

#define SPECENUM_VALUE29   ACTION_STEAL_MAPS

Definition at line 116 of file actions.h.

◆ SPECENUM_VALUE29NAME

#define SPECENUM_VALUE29NAME   "Steal Maps"

Definition at line 117 of file actions.h.

◆ SPECENUM_VALUE2NAME [1/7]

#define SPECENUM_VALUE2NAME   N_("unit stacks")

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE2NAME [2/7]

#define SPECENUM_VALUE2NAME   N_("techs from")

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE2NAME [3/7]

#define SPECENUM_VALUE2NAME   "Investigate City"

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE2NAME [4/7]

#define SPECENUM_VALUE2NAME   N_("diplomatic battle")

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE2NAME [5/7]

#define SPECENUM_VALUE2NAME   N_("teleport")

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE2NAME [6/7]

#define SPECENUM_VALUE2NAME   N_("a server agent")

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE2NAME [7/7]

#define SPECENUM_VALUE2NAME   N_("mandatory")

Definition at line 302 of file actions.h.

◆ SPECENUM_VALUE3 [1/4]

#define SPECENUM_VALUE3   ATK_TILE

Definition at line 247 of file actions.h.

◆ SPECENUM_VALUE3 [2/4]

#define SPECENUM_VALUE3   ASTK_EXTRA

Definition at line 247 of file actions.h.

◆ SPECENUM_VALUE3 [3/4]

#define SPECENUM_VALUE3   ACTION_INV_CITY_SPEND

Definition at line 247 of file actions.h.

◆ SPECENUM_VALUE3 [4/4]

#define SPECENUM_VALUE3   MAK_ESCAPE

Definition at line 247 of file actions.h.

◆ SPECENUM_VALUE30

#define SPECENUM_VALUE30   ACTION_STEAL_MAPS_ESC

Definition at line 118 of file actions.h.

◆ SPECENUM_VALUE30NAME

#define SPECENUM_VALUE30NAME   "Steal Maps Escape"

Definition at line 119 of file actions.h.

◆ SPECENUM_VALUE31

#define SPECENUM_VALUE31   ACTION_BOMBARD

Definition at line 120 of file actions.h.

◆ SPECENUM_VALUE31NAME

#define SPECENUM_VALUE31NAME   "Bombard"

Definition at line 121 of file actions.h.

◆ SPECENUM_VALUE32

#define SPECENUM_VALUE32   ACTION_BOMBARD2

Definition at line 122 of file actions.h.

◆ SPECENUM_VALUE32NAME

#define SPECENUM_VALUE32NAME   "Bombard 2"

Definition at line 123 of file actions.h.

◆ SPECENUM_VALUE33

#define SPECENUM_VALUE33   ACTION_BOMBARD3

Definition at line 124 of file actions.h.

◆ SPECENUM_VALUE33NAME

#define SPECENUM_VALUE33NAME   "Bombard 3"

Definition at line 125 of file actions.h.

◆ SPECENUM_VALUE34

#define SPECENUM_VALUE34   ACTION_SPY_NUKE

Definition at line 126 of file actions.h.

◆ SPECENUM_VALUE34NAME

#define SPECENUM_VALUE34NAME   "Suitcase Nuke"

Definition at line 127 of file actions.h.

◆ SPECENUM_VALUE35

#define SPECENUM_VALUE35   ACTION_SPY_NUKE_ESC

Definition at line 128 of file actions.h.

◆ SPECENUM_VALUE35NAME

#define SPECENUM_VALUE35NAME   "Suitcase Nuke Escape"

Definition at line 129 of file actions.h.

◆ SPECENUM_VALUE36

#define SPECENUM_VALUE36   ACTION_NUKE

Definition at line 130 of file actions.h.

◆ SPECENUM_VALUE36NAME

#define SPECENUM_VALUE36NAME   "Explode Nuclear"

Definition at line 131 of file actions.h.

◆ SPECENUM_VALUE37

#define SPECENUM_VALUE37   ACTION_NUKE_CITY

Definition at line 132 of file actions.h.

◆ SPECENUM_VALUE37NAME

#define SPECENUM_VALUE37NAME   "Nuke City"

Definition at line 133 of file actions.h.

◆ SPECENUM_VALUE38

#define SPECENUM_VALUE38   ACTION_NUKE_UNITS

Definition at line 134 of file actions.h.

◆ SPECENUM_VALUE38NAME

#define SPECENUM_VALUE38NAME   "Nuke Units"

Definition at line 135 of file actions.h.

◆ SPECENUM_VALUE39

#define SPECENUM_VALUE39   ACTION_DESTROY_CITY

Definition at line 136 of file actions.h.

◆ SPECENUM_VALUE39NAME

#define SPECENUM_VALUE39NAME   "Destroy City"

Definition at line 137 of file actions.h.

◆ SPECENUM_VALUE3NAME [1/4]

#define SPECENUM_VALUE3NAME   N_("tiles")

Definition at line 248 of file actions.h.

◆ SPECENUM_VALUE3NAME [2/4]

#define SPECENUM_VALUE3NAME   N_("extras on")

Definition at line 248 of file actions.h.

◆ SPECENUM_VALUE3NAME [3/4]

#define SPECENUM_VALUE3NAME   "Investigate City Spend Unit"

Definition at line 248 of file actions.h.

◆ SPECENUM_VALUE3NAME [4/4]

#define SPECENUM_VALUE3NAME   N_("escape")

Definition at line 248 of file actions.h.

◆ SPECENUM_VALUE4 [1/4]

#define SPECENUM_VALUE4   ATK_SELF

Definition at line 249 of file actions.h.

◆ SPECENUM_VALUE4 [2/4]

#define SPECENUM_VALUE4   ASTK_EXTRA_NOT_THERE

Definition at line 249 of file actions.h.

◆ SPECENUM_VALUE4 [3/4]

#define SPECENUM_VALUE4   ACTION_SPY_POISON

Definition at line 249 of file actions.h.

◆ SPECENUM_VALUE4 [4/4]

#define SPECENUM_VALUE4   MAK_FORCED

Definition at line 249 of file actions.h.

◆ SPECENUM_VALUE40

#define SPECENUM_VALUE40   ACTION_EXPEL_UNIT

Definition at line 138 of file actions.h.

◆ SPECENUM_VALUE40NAME

#define SPECENUM_VALUE40NAME   "Expel Unit"

Definition at line 139 of file actions.h.

◆ SPECENUM_VALUE41

#define SPECENUM_VALUE41   ACTION_RECYCLE_UNIT

Definition at line 140 of file actions.h.

◆ SPECENUM_VALUE41NAME

#define SPECENUM_VALUE41NAME   "Recycle Unit"

Definition at line 141 of file actions.h.

◆ SPECENUM_VALUE42

#define SPECENUM_VALUE42   ACTION_DISBAND_UNIT

Definition at line 142 of file actions.h.

◆ SPECENUM_VALUE42NAME

#define SPECENUM_VALUE42NAME   "Disband Unit"

Definition at line 143 of file actions.h.

◆ SPECENUM_VALUE43

#define SPECENUM_VALUE43   ACTION_HOME_CITY

Definition at line 144 of file actions.h.

◆ SPECENUM_VALUE43NAME

#define SPECENUM_VALUE43NAME   "Home City"

Definition at line 145 of file actions.h.

◆ SPECENUM_VALUE44

#define SPECENUM_VALUE44   ACTION_UPGRADE_UNIT

Definition at line 146 of file actions.h.

◆ SPECENUM_VALUE44NAME

#define SPECENUM_VALUE44NAME   "Upgrade Unit"

Definition at line 147 of file actions.h.

◆ SPECENUM_VALUE45

#define SPECENUM_VALUE45   ACTION_PARADROP

Definition at line 148 of file actions.h.

◆ SPECENUM_VALUE45NAME

#define SPECENUM_VALUE45NAME   "Paradrop Unit"

Definition at line 149 of file actions.h.

◆ SPECENUM_VALUE46

#define SPECENUM_VALUE46   ACTION_AIRLIFT

Definition at line 150 of file actions.h.

◆ SPECENUM_VALUE46NAME

#define SPECENUM_VALUE46NAME   "Airlift Unit"

Definition at line 151 of file actions.h.

◆ SPECENUM_VALUE47

#define SPECENUM_VALUE47   ACTION_ATTACK

Definition at line 152 of file actions.h.

◆ SPECENUM_VALUE47NAME

#define SPECENUM_VALUE47NAME   "Attack"

Definition at line 153 of file actions.h.

◆ SPECENUM_VALUE48

#define SPECENUM_VALUE48   ACTION_SUICIDE_ATTACK

Definition at line 154 of file actions.h.

◆ SPECENUM_VALUE48NAME

#define SPECENUM_VALUE48NAME   "Suicide Attack"

Definition at line 155 of file actions.h.

◆ SPECENUM_VALUE49

#define SPECENUM_VALUE49   ACTION_STRIKE_BUILDING

Definition at line 156 of file actions.h.

◆ SPECENUM_VALUE49NAME

#define SPECENUM_VALUE49NAME   "Surgical Strike Building"

Definition at line 157 of file actions.h.

◆ SPECENUM_VALUE4NAME [1/4]

#define SPECENUM_VALUE4NAME   N_("itself")

Definition at line 250 of file actions.h.

◆ SPECENUM_VALUE4NAME [2/4]

#define SPECENUM_VALUE4NAME   N_("create extras on")

Definition at line 250 of file actions.h.

◆ SPECENUM_VALUE4NAME [3/4]

#define SPECENUM_VALUE4NAME   "Poison City"

Definition at line 250 of file actions.h.

◆ SPECENUM_VALUE4NAME [4/4]

#define SPECENUM_VALUE4NAME   N_("forced")

Definition at line 250 of file actions.h.

◆ SPECENUM_VALUE5 [1/2]

#define SPECENUM_VALUE5   ACTION_SPY_POISON_ESC

Definition at line 251 of file actions.h.

◆ SPECENUM_VALUE5 [2/2]

#define SPECENUM_VALUE5   MAK_UNREPRESENTABLE

Definition at line 251 of file actions.h.

◆ SPECENUM_VALUE50

#define SPECENUM_VALUE50   ACTION_STRIKE_PRODUCTION

Definition at line 158 of file actions.h.

◆ SPECENUM_VALUE50NAME

#define SPECENUM_VALUE50NAME   "Surgical Strike Production"

Definition at line 159 of file actions.h.

◆ SPECENUM_VALUE51

#define SPECENUM_VALUE51   ACTION_CONQUER_CITY

Definition at line 160 of file actions.h.

◆ SPECENUM_VALUE51NAME

#define SPECENUM_VALUE51NAME   "Conquer City"

Definition at line 161 of file actions.h.

◆ SPECENUM_VALUE52

#define SPECENUM_VALUE52   ACTION_CONQUER_CITY2

Definition at line 162 of file actions.h.

◆ SPECENUM_VALUE52NAME

#define SPECENUM_VALUE52NAME   "Conquer City 2"

Definition at line 163 of file actions.h.

◆ SPECENUM_VALUE53

#define SPECENUM_VALUE53   ACTION_HEAL_UNIT

Definition at line 164 of file actions.h.

◆ SPECENUM_VALUE53NAME

#define SPECENUM_VALUE53NAME   "Heal Unit"

Definition at line 165 of file actions.h.

◆ SPECENUM_VALUE54

#define SPECENUM_VALUE54   ACTION_TRANSFORM_TERRAIN

Definition at line 166 of file actions.h.

◆ SPECENUM_VALUE54NAME

#define SPECENUM_VALUE54NAME   "Transform Terrain"

Definition at line 167 of file actions.h.

◆ SPECENUM_VALUE55

#define SPECENUM_VALUE55   ACTION_CULTIVATE

Definition at line 168 of file actions.h.

◆ SPECENUM_VALUE55NAME

#define SPECENUM_VALUE55NAME   "Cultivate"

Definition at line 169 of file actions.h.

◆ SPECENUM_VALUE56

#define SPECENUM_VALUE56   ACTION_PLANT

Definition at line 170 of file actions.h.

◆ SPECENUM_VALUE56NAME

#define SPECENUM_VALUE56NAME   "Plant"

Definition at line 171 of file actions.h.

◆ SPECENUM_VALUE57

#define SPECENUM_VALUE57   ACTION_PILLAGE

Definition at line 172 of file actions.h.

◆ SPECENUM_VALUE57NAME

#define SPECENUM_VALUE57NAME   "Pillage"

Definition at line 173 of file actions.h.

◆ SPECENUM_VALUE58

#define SPECENUM_VALUE58   ACTION_FORTIFY

Definition at line 174 of file actions.h.

◆ SPECENUM_VALUE58NAME

#define SPECENUM_VALUE58NAME   "Fortify"

Definition at line 175 of file actions.h.

◆ SPECENUM_VALUE59

#define SPECENUM_VALUE59   ACTION_ROAD

Definition at line 176 of file actions.h.

◆ SPECENUM_VALUE59NAME

#define SPECENUM_VALUE59NAME   "Build Road"

Definition at line 177 of file actions.h.

◆ SPECENUM_VALUE5NAME [1/2]

#define SPECENUM_VALUE5NAME   "Poison City Escape"

Definition at line 252 of file actions.h.

◆ SPECENUM_VALUE5NAME [2/2]

#define SPECENUM_VALUE5NAME   N_("unrepresentable")

Definition at line 252 of file actions.h.

◆ SPECENUM_VALUE6

#define SPECENUM_VALUE6   ACTION_SPY_STEAL_GOLD

Definition at line 70 of file actions.h.

◆ SPECENUM_VALUE60

#define SPECENUM_VALUE60   ACTION_CONVERT

Definition at line 178 of file actions.h.

◆ SPECENUM_VALUE60NAME

#define SPECENUM_VALUE60NAME   "Convert Unit"

Definition at line 179 of file actions.h.

◆ SPECENUM_VALUE61

#define SPECENUM_VALUE61   ACTION_BASE

Definition at line 180 of file actions.h.

◆ SPECENUM_VALUE61NAME

#define SPECENUM_VALUE61NAME   "Build Base"

Definition at line 181 of file actions.h.

◆ SPECENUM_VALUE62

#define SPECENUM_VALUE62   ACTION_MINE

Definition at line 182 of file actions.h.

◆ SPECENUM_VALUE62NAME

#define SPECENUM_VALUE62NAME   "Build Mine"

Definition at line 183 of file actions.h.

◆ SPECENUM_VALUE63

#define SPECENUM_VALUE63   ACTION_IRRIGATE

Definition at line 184 of file actions.h.

◆ SPECENUM_VALUE63NAME

#define SPECENUM_VALUE63NAME   "Build Irrigation"

Definition at line 185 of file actions.h.

◆ SPECENUM_VALUE64

#define SPECENUM_VALUE64   ACTION_CLEAN_POLLUTION

Definition at line 186 of file actions.h.

◆ SPECENUM_VALUE64NAME

#define SPECENUM_VALUE64NAME   "Clean Pollution"

Definition at line 187 of file actions.h.

◆ SPECENUM_VALUE65

#define SPECENUM_VALUE65   ACTION_CLEAN_FALLOUT

Definition at line 188 of file actions.h.

◆ SPECENUM_VALUE65NAME

#define SPECENUM_VALUE65NAME   "Clean Fallout"

Definition at line 189 of file actions.h.

◆ SPECENUM_VALUE66

#define SPECENUM_VALUE66   ACTION_TRANSPORT_ALIGHT

Definition at line 190 of file actions.h.

◆ SPECENUM_VALUE66NAME

#define SPECENUM_VALUE66NAME   "Transport Alight"

Definition at line 191 of file actions.h.

◆ SPECENUM_VALUE67

#define SPECENUM_VALUE67   ACTION_TRANSPORT_UNLOAD

Definition at line 192 of file actions.h.

◆ SPECENUM_VALUE67NAME

#define SPECENUM_VALUE67NAME   "Transport Unload"

Definition at line 193 of file actions.h.

◆ SPECENUM_VALUE68

#define SPECENUM_VALUE68   ACTION_TRANSPORT_DISEMBARK1

Definition at line 194 of file actions.h.

◆ SPECENUM_VALUE68NAME

#define SPECENUM_VALUE68NAME   "Transport Disembark"

Definition at line 195 of file actions.h.

◆ SPECENUM_VALUE69

#define SPECENUM_VALUE69   ACTION_TRANSPORT_DISEMBARK2

Definition at line 196 of file actions.h.

◆ SPECENUM_VALUE69NAME

#define SPECENUM_VALUE69NAME   "Transport Disembark 2"

Definition at line 197 of file actions.h.

◆ SPECENUM_VALUE6NAME

#define SPECENUM_VALUE6NAME   "Steal Gold"

Definition at line 71 of file actions.h.

◆ SPECENUM_VALUE7

#define SPECENUM_VALUE7   ACTION_SPY_STEAL_GOLD_ESC

Definition at line 72 of file actions.h.

◆ SPECENUM_VALUE70

#define SPECENUM_VALUE70   ACTION_TRANSPORT_BOARD

Definition at line 198 of file actions.h.

◆ SPECENUM_VALUE70NAME

#define SPECENUM_VALUE70NAME   "Transport Board"

Definition at line 199 of file actions.h.

◆ SPECENUM_VALUE71

#define SPECENUM_VALUE71   ACTION_TRANSPORT_EMBARK

Definition at line 200 of file actions.h.

◆ SPECENUM_VALUE71NAME

#define SPECENUM_VALUE71NAME   "Transport Embark"

Definition at line 201 of file actions.h.

◆ SPECENUM_VALUE72

#define SPECENUM_VALUE72   ACTION_SPY_SPREAD_PLAGUE

Definition at line 202 of file actions.h.

◆ SPECENUM_VALUE72NAME

#define SPECENUM_VALUE72NAME   "Spread Plague"

Definition at line 203 of file actions.h.

◆ SPECENUM_VALUE73

#define SPECENUM_VALUE73   ACTION_SPY_ATTACK

Definition at line 204 of file actions.h.

◆ SPECENUM_VALUE73NAME

#define SPECENUM_VALUE73NAME   "Spy Attack"

Definition at line 205 of file actions.h.

◆ SPECENUM_VALUE74

#define SPECENUM_VALUE74   ACTION_USER_ACTION1

Definition at line 206 of file actions.h.

◆ SPECENUM_VALUE74NAME

#define SPECENUM_VALUE74NAME   "User Action 1"

Definition at line 207 of file actions.h.

◆ SPECENUM_VALUE75

#define SPECENUM_VALUE75   ACTION_USER_ACTION2

Definition at line 208 of file actions.h.

◆ SPECENUM_VALUE75NAME

#define SPECENUM_VALUE75NAME   "User Action 2"

Definition at line 209 of file actions.h.

◆ SPECENUM_VALUE76

#define SPECENUM_VALUE76   ACTION_USER_ACTION3

Definition at line 210 of file actions.h.

◆ SPECENUM_VALUE76NAME

#define SPECENUM_VALUE76NAME   "User Action 3"

Definition at line 211 of file actions.h.

◆ SPECENUM_VALUE7NAME

#define SPECENUM_VALUE7NAME   "Steal Gold Escape"

Definition at line 73 of file actions.h.

◆ SPECENUM_VALUE8

#define SPECENUM_VALUE8   ACTION_SPY_SABOTAGE_CITY

Definition at line 74 of file actions.h.

◆ SPECENUM_VALUE8NAME

#define SPECENUM_VALUE8NAME   "Sabotage City"

Definition at line 75 of file actions.h.

◆ SPECENUM_VALUE9

#define SPECENUM_VALUE9   ACTION_SPY_SABOTAGE_CITY_ESC

Definition at line 76 of file actions.h.

◆ SPECENUM_VALUE9NAME

#define SPECENUM_VALUE9NAME   "Sabotage City Escape"

Definition at line 77 of file actions.h.

◆ SPECLIST_TAG

#define SPECLIST_TAG   action_enabler

Definition at line 371 of file actions.h.

◆ SPECLIST_TYPE

#define SPECLIST_TYPE   struct action_enabler

Definition at line 372 of file actions.h.

Function Documentation

◆ action_actor_consuming_always_ruleset_var_name()

const char* action_actor_consuming_always_ruleset_var_name ( action_id  act)

Return actor consuming always ruleset variable name for the action or nullptr if actor consuming always can't be set in the ruleset.

TODO: make actions generic and put actor consuming always in a field of the action.

Definition at line 6836 of file actions.cpp.

Referenced by load_action_actor_consuming_always(), and save_action_actor_consuming_always().

◆ action_actor_utype_hard_reqs_ok()

bool action_actor_utype_hard_reqs_ok ( enum action_result  result,
const struct unit_type actor_unittype 
)

Returns TRUE if the specified unit type can perform an action with the wanted result given that an action enabler later will enable it.

This is done by checking the action result's hard requirements. Hard requirements must be TRUE before an action can be done. The reason why is usually that code dealing with the action assumes that the requirements are true. A requirement may also end up here if it can't be expressed in a requirement vector or if its absence makes the action pointless.

Parameters
resultthe action result to check the hard reqs for
actor_unittypethe unit type that may be able to act
Returns
TRUE iff the specified unit type can perform the wanted action given that an action enabler later will enable it.

Definition at line 2776 of file actions.cpp.

Referenced by action_enabler_suggest_improvement(), action_not_enabled_reason(), and unit_can_act_cache_set().

◆ action_auto_perf_by_number()

const struct action_auto_perf* action_auto_perf_by_number ( const int  num)

Returns action auto performer rule number num.

Used in action_auto_perf_iterate()

WARNING: If the cause of the returned action performer rule is AAPC_COUNT it means that it is unused.

Definition at line 5848 of file actions.cpp.

Referenced by save_action_auto_actions(), save_action_auto_uflag_block(), and save_game_ruleset().

◆ action_auto_perf_slot_number()

struct action_auto_perf* action_auto_perf_slot_number ( const int  num)

Returns action auto performer rule slot number num so it can be filled.

Definition at line 5832 of file actions.cpp.

Referenced by action_auto_perf_by_number(), handle_ruleset_action_auto(), load_ruleset_cities(), load_ruleset_game(), and sanity_check_ruleset_data().

◆ action_by_number()

struct action* action_by_number ( action_id  act_id)

Return the action with the given id.

Returns nullptr if no action with the given id exists.

Definition at line 1149 of file actions.cpp.

Referenced by action_by_rule_name(), action_enabler_suggest_improvement(), action_enabler_suggest_repair_oblig(), action_entry(), action_entry_update(), action_is_blocked_by(), action_is_hostile(), action_list_add_all_by_result(), action_maybe_possible_actor_unit(), action_not_enabled_reason(), action_selection_refresh(), action_target_neg_util(), adv_best_government(), adv_unit_move(), api_find_action(), freeciv::path_finder::path_finder_private::attempt_paradrop(), auto_settlers_speculate_can_act_at(), freeciv::detail::vertex::child_for_action(), city_gold_worth(), go_act_menu::create(), dai_diplomat_city(), dai_evaluate_tile_for_air_attack(), dai_unit_move(), dai_upgrade_units(), dir_opposite(), enabler_first_self_contradiction(), enabler_tile_tgt_local_diplrel_implies_claimed(), execute_orders(), fix_enabler_item::fix_enabler_item(), get_caravan_enter_city_trade_bonus(), handle_city_sabotage_list(), handle_ruleset_action(), handle_unit_action_answer(), handle_unit_action_query(), handle_unit_type_upgrade(), helptext_building(), helptext_government(), helptext_unit(), illegal_action(), key_unit_action_select_tgt(), load_action_actor_consuming_always(), load_action_kind(), load_action_range(), load_action_range_max(), load_action_ui_name(), load_ruleset_game(), may_unit_act_vs_tile_extra(), need_war_player_hlp(), popup_action_selection(), rscompat_enabler_add_obligatory_hard_reqs(), rscompat_old_slow_invasions_3_1(), sanity_check_ruleset_data(), save_action_actor_consuming_always(), save_action_kind(), save_action_max_range(), save_action_range(), save_action_ui_name(), save_game_ruleset(), send_ruleset_actions(), settler_evaluate_improvements(), tai_tile_worker_task_select(), texai_tile_worker_task_select(), unit_activity_complete(), unit_activity_targeted_internal(), unit_can_act_cache_set(), unit_order_list_is_sane(), unit_perform_action(), unit_upgrade_price(), universal_kind_values(), universal_value_initial(), upgrade_unit_order_targets(), and utype_may_do_escape_action().

◆ action_by_rule_name()

struct action* action_by_rule_name ( const char *  name)

Return the action with the given name.

Returns nullptr if no action with the given name exists.

Definition at line 1169 of file actions.cpp.

Referenced by api_find_action_by_name(), tab_enabler::edit_type(), load_ruleset_game(), sg_load_savefile(), and universal_by_number().

◆ action_creates_extra()

bool action_creates_extra ( const struct action paction,
const struct extra_type pextra 
)

Returns TRUE iff the specified action can create the specified extra.

Definition at line 1649 of file actions.cpp.

Referenced by go_act_menu::create(), execute_orders(), helptext_unit(), and unit_order_list_is_sane().

◆ action_dice_roll_initial_odds()

int action_dice_roll_initial_odds ( const struct action paction)

Returns the initial odds of an action not failing its dice roll.

Definition at line 5580 of file actions.cpp.

Referenced by action_dice_roll_odds(), effect_list_sanity_cb(), and helptext_unit().

◆ action_dice_roll_odds()

int action_dice_roll_odds ( const struct player act_player,
const struct unit act_unit,
const struct city tgt_city,
const struct player tgt_player,
const struct action paction 
)

Returns the odds of an action not failing its dice roll.

Definition at line 5657 of file actions.cpp.

Referenced by action_failed_dice_roll().

◆ action_distance_accepted()

bool action_distance_accepted ( const struct action action,
const int  distance 
)

Returns TRUE iff the specified distance between actor and target is within the range acceptable to the specified action.

Definition at line 1314 of file actions.cpp.

◆ action_distance_inside_max()

bool action_distance_inside_max ( const struct action action,
const int  distance 
)

Returns TRUE iff the specified distance between actor and target is sm,aller or equal to the max range accepted by the specified action.

Definition at line 1303 of file actions.cpp.

Referenced by action_distance_accepted(), action_not_enabled_reason(), and sanity_check_ruleset_data().

◆ action_enabler_add()

◆ action_enabler_copy()

struct action_enabler* action_enabler_copy ( const struct action_enabler original)

Create a new copy of an existing action enabler.

Definition at line 1839 of file actions.cpp.

Referenced by fix_enabler_item::fix_enabler_item(), rscompat_enabler_add_obligatory_hard_reqs(), rscompat_old_slow_invasions_3_1(), and rscompat_postprocess().

◆ action_enabler_free()

void action_enabler_free ( struct action_enabler enabler)

Free resources allocated for the action enabler.

Definition at line 1827 of file actions.cpp.

Referenced by actions_free(), tab_enabler::add_now(), and fix_enabler_item::~fix_enabler_item().

◆ action_enabler_new()

◆ action_enabler_remove()

bool action_enabler_remove ( struct action_enabler enabler)

Remove an action enabler from the current ruleset.

Returns TRUE on success.

Definition at line 1870 of file actions.cpp.

Referenced by tab_enabler::edit_type(), and rscompat_postprocess().

◆ action_enabler_suggest_improvement()

struct req_vec_problem* action_enabler_suggest_improvement ( const struct action_enabler enabler)

Returns a suggestion to improve the specified action enabler or nullptr if nothing to improve is found to be needed.

It is the responsibility of the caller to free the suggestion when it is done with it. A possible improvement isn't always an error.

Parameters
enablerthe enabler to improve
Returns
a suggestion to improve the specified action enabler

Definition at line 2251 of file actions.cpp.

Referenced by fix_enabler_item::find_next_problem(), and sanity_check_ruleset_data().

◆ action_enabler_suggest_repair()

struct req_vec_problem* action_enabler_suggest_repair ( const struct action_enabler enabler)

Returns a suggestion to fix the specified action enabler or nullptr if no fix is found to be needed.

It is the responsibility of the caller to free the suggestion when it is done with it.

Definition at line 2187 of file actions.cpp.

Referenced by action_enabler_suggest_improvement(), fix_enabler_item::find_next_problem(), rscompat_enabler_add_obligatory_hard_reqs(), and sanity_check_ruleset_data().

◆ action_enabler_suggest_repair_oblig()

struct req_vec_problem* action_enabler_suggest_repair_oblig ( const struct action_enabler enabler)

Returns a suggestion to add an obligatory hard requirement to an action enabler or nullptr if no hard obligatory reqs were missing.

It is the responsibility of the caller to free the suggestion when it is done with it.

Parameters
enablerthe action enabler to suggest a fix for.
Returns
a problem with fix suggestions or nullptr if no obligatory hard requirement problems were detected.

Definition at line 1902 of file actions.cpp.

Referenced by action_enabler_suggest_repair().

◆ action_enabler_vector_by_number()

struct requirement_vector* action_enabler_vector_by_number ( const void *  enabler,
req_vec_num_in_item  number 
)

Returns a writable pointer to the specified requirement vector in the action enabler or nullptr if the action enabler doesn't have a requirement vector with that requirement vector number.

Parameters
enablerthe action enabler that may own the vector.
numberthe item's requirement vector number.
Returns
a pointer to the specified requirement vector.

Definition at line 2325 of file actions.cpp.

Referenced by rscompat_enabler_add_obligatory_hard_reqs(), and fix_enabler_item::vector_getter().

◆ action_enabler_vector_by_number_name()

const char* action_enabler_vector_by_number_name ( req_vec_num_in_item  vec)

Returns the name of the given requirement vector number n in an action enabler or nullptr if enablers don't have a requirement vector with that number.

Parameters
vecthe requirement vector to name
Returns
the requirement vector name or nullptr.

Definition at line 2349 of file actions.cpp.

Referenced by rscompat_enabler_add_obligatory_hard_reqs(), and fix_enabler_item::vector_namer().

◆ action_enabler_vector_number()

req_vec_num_in_item action_enabler_vector_number ( const void *  enabler,
const struct requirement_vector *  vec 
)

Returns the requirement vector number of the specified requirement vector in the specified action enabler.

Parameters
enablerthe action enabler that may own the vector.
vecthe requirement vector to number.
Returns
the requirement vector number the vector has in this enabler.

Definition at line 2302 of file actions.cpp.

Referenced by action_enabler_suggest_repair(), action_enabler_suggest_repair_oblig(), enabler_first_self_contradiction(), and enabler_tile_tgt_local_diplrel_implies_claimed().

◆ action_enablers_for_action()

◆ action_get_act_time()

int action_get_act_time ( const struct action paction,
const struct unit actor_unit,
const struct tile tgt_tile,
const struct extra_type tgt_extra 
)

Returns the unit activity time (work) this action takes (requires) or ACT_TIME_INSTANTANEOUS if the action happens at once.

See update_unit_activity() and tile_activity_time()

Definition at line 1598 of file actions.cpp.

◆ action_get_activity()

enum unit_activity action_get_activity ( const struct action paction)

◆ action_get_actor_kind()

◆ action_get_battle_kind()

enum action_battle_kind action_get_battle_kind ( const struct action pact)

Get the battle kind that can prevent an action.

Definition at line 1169 of file actions.cpp.

Referenced by helptext_unit().

◆ action_get_role()

int action_get_role ( const struct action paction)

Get the unit type role corresponding to the ability to do the specified action.

Definition at line 1544 of file actions.cpp.

◆ action_get_sub_target_kind()

enum action_sub_target_kind action_get_sub_target_kind ( const struct action paction)

Get the sub target kind of an action.

Definition at line 1169 of file actions.cpp.

Referenced by action_sub_target_id_for_action(), go_act_menu::create(), execute_orders(), and helptext_unit().

◆ action_get_target_kind()

◆ action_has_complex_target()

bool action_has_complex_target ( const struct action paction)

Returns TRUE iff the specified action allows the player to provide details in addition to actor and target.

Returns FALSE if the action doesn't support any additional details.

Definition at line 1262 of file actions.cpp.

Referenced by may_unit_act_vs_tile_extra().

◆ action_has_result()

◆ action_id_exists()

◆ action_id_is_rare_pop_up()

bool action_id_is_rare_pop_up ( action_id  act_id)

Returns TRUE iff a unit's ability to perform this action will pop up the action selection dialog before the player asks for it only in exceptional cases.

An example of an exceptional case is when the player tries to move a unit to a tile it can't move to but can perform this action to.

Definition at line 1290 of file actions.cpp.

Referenced by action_tgt_tile(), may_unit_act_vs_city(), may_unit_act_vs_tile_extra(), and may_unit_act_vs_unit().

◆ action_id_name_translation()

const QString action_id_name_translation ( action_id  act_id)

◆ action_id_rule_name()

◆ action_immune_government()

bool action_immune_government ( struct government gov,
action_id  act 
)

Will a player with the government gov be immune to the action act?

Definition at line 5687 of file actions.cpp.

Referenced by adv_best_government(), and helptext_government().

◆ action_is_blocked_by()

struct action* action_is_blocked_by ( const action_id  act_id,
const struct unit actor_unit,
const struct tile target_tile_arg,
const struct city target_city_arg,
const struct unit target_unit 
)

Returns the action that blocks the specified action or nullptr if the specified action isn't blocked.

An action that can block another blocks when it is forced and possible.

Definition at line 2530 of file actions.cpp.

Referenced by action_not_enabled_reason().

◆ action_list_add_all_by_result()

void action_list_add_all_by_result ( action_id act_list,
int *  position,
enum action_result  result 
)

Add all actions with the specified result to the specified action list starting at the specified position.

Parameters
act_listthe list to add the actions to
positionindex in act_list that is updated as action are added
resultall actions with this result are added.

Definition at line 5898 of file actions.cpp.

Referenced by adv_data_phase_init(), auto_settlers_ruleset_init(), dai_upgrade_units(), and helptext_building().

◆ action_list_end()

void action_list_end ( action_id act_list,
int  size 
)

Terminate an action list of the specified size.

Parameters
act_listthe list to end
sizethe number of elements to include in the list

Definition at line 5881 of file actions.cpp.

Referenced by adv_data_phase_init(), auto_settlers_ruleset_init(), dai_upgrade_units(), and helptext_building().

◆ action_max_range_default()

int action_max_range_default ( int  act)

Return default max range for the action if it is ruleset settable.

Definition at line 6633 of file actions.cpp.

Referenced by load_action_range_max(), and save_action_max_range().

◆ action_max_range_ruleset_var_name()

const char* action_max_range_ruleset_var_name ( int  act)

Return max range ruleset variable name for the action or nullptr if max range can't be set in the ruleset.

TODO: make actions generic and put max_range in a field of the action.

Definition at line 6528 of file actions.cpp.

Referenced by load_action_range(), load_action_range_max(), save_action_max_range(), and save_action_range().

◆ action_maybe_possible_actor_unit()

bool action_maybe_possible_actor_unit ( const action_id  wanted_action,
const struct unit actor_unit 
)

Returns TRUE if the wanted action (as far as the player knows) can be performed right now by the specified actor unit if an approriate target is provided.

Definition at line 5765 of file actions.cpp.

Referenced by can_unit_paradrop(), and handle_unit_get_actions().

◆ action_min_range_default()

int action_min_range_default ( int  act)

Return default min range for the action if it is ruleset settable.

Definition at line 6430 of file actions.cpp.

Referenced by load_action_range(), and save_action_range().

◆ action_min_range_ruleset_var_name()

const char* action_min_range_ruleset_var_name ( int  act)

Return min range ruleset variable name for the action or nullptr if min range can't be set in the ruleset.

TODO: make actions generic and put min_range in a field of the action.

Definition at line 6334 of file actions.cpp.

Referenced by load_action_range(), and save_action_range().

◆ action_mp_full_makes_legal()

bool action_mp_full_makes_legal ( const struct unit actor,
const action_id  act_id 
)

Returns TRUE if the specified action can't be done now but would have been legal if the unit had full movement.

Definition at line 5817 of file actions.cpp.

Referenced by action_not_enabled_reason(), and execute_orders().

◆ action_name_translation()

◆ action_number()

int action_number ( const struct action action)

◆ action_prepare_ui_name()

const QString action_prepare_ui_name ( action_id  act_id,
const char *  mnemonic,
const struct act_prob  prob,
const QString &  custom 
)

Get the UI name ready to show the action in the UI.

It is possible to add a client specific mnemonic; it is assumed that if the mnemonic appears in the action name it can be escaped by doubling. Success probability information is interpreted and added to the text. A custom text can be inserted before the probability information.

Definition at line 1412 of file actions.cpp.

Referenced by action_entry(), action_entry_update(), and action_id_name_translation().

◆ action_prob_cmp_pessimist()

int action_prob_cmp_pessimist ( const struct act_prob  ap1,
const struct act_prob  ap2 
)

Compare action probabilities.

Prioritize the lowest possible value.

Definition at line 5428 of file actions.cpp.

Referenced by compare_units().

◆ action_prob_explain()

const QString action_prob_explain ( const struct act_prob  prob)

Explain an action probability in a way suitable for a tool tip for the button that starts it.

Returns
an explanation of what an action probability means

Definition at line 1504 of file actions.cpp.

Referenced by act_sel_action_tool_tip().

◆ action_prob_fall_back()

struct act_prob action_prob_fall_back ( const struct act_prob ap1,
const struct act_prob ap2 
)

Returns ap1 with ap2 as fall back in cases where ap1 doesn't happen.

Said in math that is: P(A) + P(A') * P(B)

This is useful to calculate the probability of doing action A or, when A is impossible, falling back to doing action B.

Definition at line 5479 of file actions.cpp.

◆ action_prob_new_certain()

struct act_prob action_prob_new_certain ( )

Returns the certain action probability.

Definition at line 4264 of file actions.cpp.

◆ action_prob_new_impossible()

struct act_prob action_prob_new_impossible ( )

Returns the impossible action probability.

Definition at line 4264 of file actions.cpp.

◆ action_prob_new_not_impl()

struct act_prob action_prob_new_not_impl ( )

Returns the "not implemented" action probability.

Definition at line 4264 of file actions.cpp.

◆ action_prob_new_not_relevant()

struct act_prob action_prob_new_not_relevant ( )

Returns the n/a action probability.

Definition at line 4264 of file actions.cpp.

◆ action_prob_new_unknown()

struct act_prob action_prob_new_unknown ( )

Returns the "user don't know" action probability.

Definition at line 4264 of file actions.cpp.

◆ action_prob_possible()

◆ action_prob_self()

struct act_prob action_prob_self ( const struct unit actor,
const action_id  act_id 
)

Get the actor unit's probability of successfully performing the chosen action on itself.

Definition at line 4264 of file actions.cpp.

Referenced by do_disband_alternative(), execute_orders(), and handle_unit_get_actions().

◆ action_prob_to_0_to_1_pessimist()

double action_prob_to_0_to_1_pessimist ( const struct act_prob  ap)

Returns double in the range [0-1] representing the minimum of the given action probability.

Definition at line 5479 of file actions.cpp.

Referenced by unit_survive_autoattack().

◆ action_prob_unit_vs_tgt()

struct act_prob action_prob_unit_vs_tgt ( const struct action paction,
const struct unit act_unit,
const struct city tgt_city,
const struct unit tgt_unit,
const struct tile tgt_tile,
const struct extra_type extra_tgt 
)

Returns the actor unit's probability of successfully performing the specified action against the action specific target.

Parameters
pactionthe action to perform
act_unitthe actor unit
tgt_citythe target for city targeted actions
tgt_unitthe target for unit targeted actions
tgt_tilethe target for tile and unit stack targeted actions
extra_tgtthe target for extra sub targeted actions
Returns
the action probability of performing the action

Definition at line 4264 of file actions.cpp.

Referenced by illegal_action().

◆ action_prob_vs_city()

struct act_prob action_prob_vs_city ( const struct unit actor,
const action_id  act_id,
const struct city victim 
)

Get the actor unit's probability of successfully performing the chosen action on the target city.

Definition at line 4264 of file actions.cpp.

Referenced by can_unit_change_homecity_to(), dai_diplomat_city(), do_disband_alternative(), execute_orders(), handle_unit_get_actions(), may_unit_act_vs_city(), unit_can_add_or_build_city(), unit_can_airlift_to(), and unit_can_help_build_wonder_here().

◆ action_prob_vs_tile()

struct act_prob action_prob_vs_tile ( const struct unit actor,
const action_id  act_id,
const struct tile victims,
const struct extra_type target_extra 
)

Get the actor unit's probability of successfully performing the chosen action on the target tile.

Definition at line 4264 of file actions.cpp.

Referenced by action_sub_target_id_for_action(), action_tgt_tile(), do_disband_alternative(), execute_orders(), handle_city_name_suggestion_req(), handle_unit_get_actions(), may_unit_act_vs_tile_extra(), and unit_can_add_or_build_city().

◆ action_prob_vs_unit()

struct act_prob action_prob_vs_unit ( const struct unit actor,
const action_id  act_id,
const struct unit victim 
)

Get the actor unit's probability of successfully performing the chosen action on the target unit.

Definition at line 4264 of file actions.cpp.

Referenced by can_unit_alight_or_be_unloaded(), dai_diplomat_bribe_nearby(), do_disband_alternative(), execute_orders(), handle_unit_get_actions(), and may_unit_act_vs_unit().

◆ action_prob_vs_units()

struct act_prob action_prob_vs_units ( const struct unit actor,
const action_id  act_id,
const struct tile victims 
)

Get the actor unit's probability of successfully performing the chosen action on all units at the target tile.

Definition at line 4264 of file actions.cpp.

Referenced by action_tgt_tile(), do_disband_alternative(), execute_orders(), and handle_unit_get_actions().

◆ action_removes_extra()

bool action_removes_extra ( const struct action paction,
const struct extra_type pextra 
)

Returns TRUE iff the specified action can remove the specified extra.

Definition at line 1732 of file actions.cpp.

Referenced by go_act_menu::create(), execute_orders(), helptext_unit(), and unit_order_list_is_sane().

◆ action_requires_details()

bool action_requires_details ( const struct action paction)

Returns TRUE iff the specified action REQUIRES the player to provide details in addition to actor and target.

Returns FALSE if the action doesn't support any additional details or if they can be set by Freeciv it self.

Definition at line 1275 of file actions.cpp.

◆ action_rule_name()

◆ action_speculate_unit_on_city()

struct act_prob action_speculate_unit_on_city ( action_id  act_id,
const struct unit actor,
const struct city actor_home,
const struct tile actor_tile,
bool  omniscient_cheat,
const struct city target 
)

Returns a speculation about the actor unit's probability of successfully performing the chosen action on the target city given the specified game state changes.

Definition at line 4264 of file actions.cpp.

Referenced by auto_settlers_speculate_can_act_at(), and get_discounted_reward().

◆ action_speculate_unit_on_self()

struct act_prob action_speculate_unit_on_self ( action_id  act_id,
const struct unit actor,
const struct city actor_home,
const struct tile actor_tile,
bool  omniscient_cheat 
)

Returns a speculation about the actor unit's probability of successfully performing the chosen action on itself given the specified game state changes.

Definition at line 4264 of file actions.cpp.

Referenced by auto_settlers_speculate_can_act_at().

◆ action_speculate_unit_on_tile()

struct act_prob action_speculate_unit_on_tile ( action_id  act_id,
const struct unit actor,
const struct city actor_home,
const struct tile actor_tile,
bool  omniscient_cheat,
const struct tile target_tile,
const struct extra_type target_extra 
)

Returns a speculation about the actor unit's probability of successfully performing the chosen action on the target tile (and, if specified, extra) given the specified game state changes.

Definition at line 4264 of file actions.cpp.

Referenced by auto_settlers_speculate_can_act_at(), settler_evaluate_improvements(), tai_tile_worker_task_select(), and texai_tile_worker_task_select().

◆ action_speculate_unit_on_units()

struct act_prob action_speculate_unit_on_units ( action_id  act_id,
const struct unit actor,
const struct city actor_home,
const struct tile actor_tile,
bool  omniscient_cheat,
const struct tile target 
)

Returns a speculation about the actor unit's probability of successfully performing the chosen action on the target unit stack given the specified game state changes.

Definition at line 4264 of file actions.cpp.

Referenced by auto_settlers_speculate_can_act_at().

◆ action_target_kind_ruleset_var_name()

const char* action_target_kind_ruleset_var_name ( int  act)

Return target kind ruleset variable name for the action or nullptr if min range can't be set in the ruleset.

TODO: make actions generic and put target_kind in a field of the action.

Definition at line 6736 of file actions.cpp.

Referenced by load_action_kind(), and save_action_kind().

◆ action_tgt_city()

struct city* action_tgt_city ( struct unit actor,
struct tile target_tile,
bool  accept_all_actions 
)

Find a city to target for an action on the specified tile.

Returns nullptr if no proper target is found.

If the only action(s) that can be performed against a target has the rare_pop_up property the target will only be considered valid if the accept_all_actions argument is TRUE.

Definition at line 6983 of file actions.cpp.

Referenced by freeciv::path_finder::path_finder_private::attempt_action_move(), handle_unit_get_actions(), unit_move(), and unit_move_handling().

◆ action_tgt_tile()

struct tile* action_tgt_tile ( struct unit actor,
struct tile target,
const struct extra_type target_extra,
bool  accept_all_actions 
)

Returns the tile iff it, from the point of view of the owner of the actor unit, looks like a target tile.

Returns nullptr if the player knows that the actor unit can't do any action (that specifies its target as a tile) to the tile.

If the owner of the actor unit doesn't have the knowledge needed to know for sure if the unit can act the tile will be returned.

If the only action(s) that can be performed against a target has the rare_pop_up property the target will only be considered valid if the accept_all_actions argument is TRUE.

Definition at line 7078 of file actions.cpp.

Referenced by freeciv::path_finder::path_finder_private::attempt_action_move(), and unit_move_handling().

◆ action_tgt_tile_extra()

struct extra_type* action_tgt_tile_extra ( const struct unit actor,
const struct tile target_tile,
bool  accept_all_actions 
)

Find an extra to target for an action at the specified tile.

Returns the first extra found that the actor may act against at the tile or nullptr if no proper target is found. (Note that some actions requires the absence of an extra since they result in its creation while other requires its presence.)

If the only action(s) that can be performed against a target has the rare_pop_up property the target will only be considered valid if the accept_all_actions argument is TRUE.

Definition at line 7191 of file actions.cpp.

Referenced by freeciv::path_finder::path_finder_private::attempt_action_move(), handle_unit_get_actions(), and unit_move_handling().

◆ action_tgt_unit()

struct unit* action_tgt_unit ( struct unit actor,
struct tile target_tile,
bool  accept_all_actions 
)

Find a unit to target for an action at the specified tile.

Returns the first unit found at the tile that the actor may act against or nullptr if no proper target is found.

If the only action(s) that can be performed against a target has the rare_pop_up property the target will only be considered valid if the accept_all_actions argument is TRUE.

Definition at line 7050 of file actions.cpp.

Referenced by freeciv::path_finder::path_finder_private::attempt_action_move(), execute_orders(), handle_unit_get_actions(), and unit_move_handling().

◆ action_ui_name_default()

const char* action_ui_name_default ( int  act)

Return default ui_name for the action.

Definition at line 6087 of file actions.cpp.

Referenced by load_action_ui_name(), and save_action_ui_name().

◆ action_ui_name_ruleset_var_name()

const char* action_ui_name_ruleset_var_name ( int  act)

Return ui_name ruleset variable name for the action.

TODO: make actions generic and put ui_name in a field of the action.

Definition at line 5919 of file actions.cpp.

Referenced by load_ruleset_game(), and save_game_ruleset().

◆ action_univs_not_blocking()

bool action_univs_not_blocking ( const struct action paction,
struct universal actor_uni,
struct universal target_uni 
)

Is there any action enablers of the given type not blocked by universals?

Definition at line 5856 of file actions.cpp.

◆ action_would_be_blocked_by()

bool action_would_be_blocked_by ( const struct action blocked,
const struct action blocker 
)

Returns TRUE iff blocked will be illegal if blocker is legal.

Definition at line 1326 of file actions.cpp.

Referenced by autoadjust_ruleset_data().

◆ actions_are_ready()

bool actions_are_ready ( )

Returns TRUE iff the actions are initialized.

Doesn't care about action enablers.

Definition at line 1037 of file actions.cpp.

Referenced by action_prepare_ui_name(), and go_act_menu::update().

◆ actions_free()

void actions_free ( )

Free the actions and the action enablers.

Definition at line 994 of file actions.cpp.

Referenced by game_ruleset_free().

◆ actions_init()

void actions_init ( )

Initialize the actions and the action enablers.

Definition at line 934 of file actions.cpp.

Referenced by game_ruleset_init().

◆ actions_rs_pre_san_gen()

void actions_rs_pre_san_gen ( )

Generate action related data based on the currently loaded ruleset.

Done before ruleset sanity checking and ruleset compatibility post processing.

Definition at line 984 of file actions.cpp.

Referenced by handle_rulesets_ready(), and load_rulesetdir().

◆ are_action_probabilitys_equal()

bool are_action_probabilitys_equal ( const struct act_prob ap1,
const struct act_prob ap2 
)

Returns TRUE iff ap1 and ap2 are equal.

Definition at line 5419 of file actions.cpp.

◆ is_action_enabled_unit_on_city()

bool is_action_enabled_unit_on_city ( const action_id  wanted_action,
const struct unit actor_unit,
const struct city target_city 
)

Returns TRUE if actor_unit can do wanted_action to target_city as far as action enablers are concerned.

See note in is_action_enabled for why the action may still be disabled.

Definition at line 3948 of file actions.cpp.

Referenced by action_auto_perf_unit_do(), action_is_blocked_by(), dai_caravan_goto(), dai_manage_caravan(), dai_unit_attack(), handle_unit_action_query(), handle_unit_type_upgrade(), occupy_move(), unit_can_airlift_to(), and unit_do_disband_trad().

◆ is_action_enabled_unit_on_self()

bool is_action_enabled_unit_on_self ( const action_id  wanted_action,
const struct unit actor_unit 
)

Returns TRUE if actor_unit can do wanted_action to itself as far as action enablers are concerned.

See note in is_action_enabled() for why the action still may be disabled.

Definition at line 4196 of file actions.cpp.

Referenced by action_auto_perf_unit_do(), action_is_blocked_by(), can_unit_do_activity_targeted_at(), and unit_do_disband_trad().

◆ is_action_enabled_unit_on_tile()

bool is_action_enabled_unit_on_tile ( const action_id  wanted_action,
const struct unit actor_unit,
const struct tile target_tile,
const struct extra_type target_extra 
)

Returns TRUE if actor_unit can do wanted_action to the target_tile as far as action enablers are concerned.

See note in is_action_enabled for why the action may still be disabled.

Definition at line 4136 of file actions.cpp.

Referenced by action_auto_perf_unit_do(), action_is_blocked_by(), adv_unit_move(), freeciv::path_finder::path_finder_private::attempt_paradrop(), freeciv::path_finder::path_finder_private::attempt_unload(), can_unit_do_activity_targeted_at(), dai_unit_attack(), dai_unit_move(), diplomat_bribe(), and occupy_move().

◆ is_action_enabled_unit_on_unit()

bool is_action_enabled_unit_on_unit ( const action_id  wanted_action,
const struct unit actor_unit,
const struct unit target_unit 
)

◆ is_action_enabled_unit_on_units()

bool is_action_enabled_unit_on_units ( const action_id  wanted_action,
const struct unit actor_unit,
const struct tile target_tile 
)

Returns TRUE if actor_unit can do wanted_action to all units on the target_tile as far as action enablers are concerned.

See note in is_action_enabled for why the action may still be disabled.

Definition at line 4078 of file actions.cpp.

Referenced by action_auto_perf_unit_do(), action_is_blocked_by(), and dai_unit_attack().

◆ is_action_possible_on_city()

bool is_action_possible_on_city ( action_id  act_id,
const struct player actor_player,
const struct city target_city 
)

Returns TRUE if the wanted action can be done to the target city.

Definition at line 5734 of file actions.cpp.

Referenced by adjust_improvement_wants_by_effects(), dai_choose_diplomat_offensive(), find_city_to_diplomat(), and impr_protects_vs_actions().

◆ is_action_possible_on_unit()

bool is_action_possible_on_unit ( action_id  act_id,
const unit target_unit 
)

Checks if there is any hopes that the action is possible against the target unit (by chacking the target_reqs).

Definition at line 5752 of file actions.cpp.

Referenced by popup_info_text().