Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | actres |
Enumerations | |
enum | dice_roll_type { DRT_NONE , DRT_DIPLCHANCE , DRT_CERTAIN } |
#define SPECENUM_COUNT ASTK_COUNT |
#define SPECENUM_VALUE0 ACT_TGT_COMPL_SIMPLE |
#define SPECENUM_VALUE1 ASTK_BUILDING |
#define SPECENUM_VALUE1 ACT_TGT_COMPL_FLEXIBLE |
#define SPECENUM_VALUE1 ABK_STANDARD |
#define SPECENUM_VALUE2 ACT_TGT_COMPL_MANDATORY |
#define SPECENUM_VALUE2 ABK_DIPLOMATIC |
#define SPECENUM_VALUE3 ASTK_EXTRA |
#define SPECENUM_VALUE4 ATK_EXTRAS |
#define SPECENUM_VALUE4 ASTK_EXTRA_NOT_THERE |
enum unit_activity actres_activity_result | ( | enum action_result | result | ) |
Map actres to an activity that gets started.
result | Action result to map to activity |
Definition at line 301 of file actres.c.
Referenced by action_new(), and actres_get_act_time().
bool actres_creates_extra | ( | enum action_result | result, |
const struct extra_type * | pextra | ||
) |
Does action with the result create the extra
result | Action result to check |
pextra | Extra to check |
Definition at line 789 of file actres.c.
Referenced by go_act_menu::create(), execute_orders(), helptext_unit(), real_menus_init(), real_menus_update(), unit_order_list_is_sane(), and utype_can_create_extra().
enum dice_roll_type actres_dice_type | ( | enum action_result | result | ) |
Map actres to initial odds type.
result | Action result to check odds for |
Definition at line 364 of file actres.c.
Referenced by action_dice_roll_initial_odds().
Free resources allocated by the action results system
Definition at line 250 of file actres.c.
Referenced by game_ruleset_free().
int actres_get_act_time | ( | enum action_result | result, |
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.
enum action_battle_kind actres_get_battle_kind | ( | enum action_result | result | ) |
Get the battle kind that can prevent an action.
Definition at line 272 of file actres.c.
Referenced by action_prob_battle_then_dice_roll(), and helptext_unit().
Initialize action results system
Definition at line 243 of file actres.c.
Referenced by game_ruleset_init().
bool actres_is_hostile | ( | enum action_result | result | ) |
Returns TRUE iff the specified action result indicates hostile action.
Definition at line 286 of file actres.c.
Referenced by local_dipl_rel_action_cache_set(), local_dipl_rel_tile_other_tgt_action_cache_set(), tgt_citytile_act_cache_set(), unit_can_act_cache_set(), and unit_state_action_cache_set().
bool actres_legal_target_kind | ( | enum action_result | result, |
enum action_target_kind | tgt_kind | ||
) |
Returns TRUE iff the specified action result works with the specified action target kind.
Definition at line 560 of file actres.c.
Referenced by sanity_check_ruleset_data().
int actres_max_range_default | ( | enum action_result | result | ) |
Return default max range for the action if it is ruleset settable.
Definition at line 466 of file actres.c.
Referenced by load_action_range_max(), and save_action_max_range().
int actres_min_range_default | ( | enum action_result | result | ) |
Return default min range for the action if it is ruleset settable.
Definition at line 376 of file actres.c.
Referenced by load_action_range(), and save_action_range().
enum fc_tristate actres_possible | ( | const struct civ_map * | nmap, |
enum action_result | result, | ||
const struct req_context * | actor, | ||
const struct req_context * | target, | ||
const struct extra_type * | target_extra, | ||
enum fc_tristate | def, | ||
bool | omniscient, | ||
const struct city * | homecity | ||
) |
Could an action with this kind of result be made?
Definition at line 835 of file actres.c.
Referenced by is_action_possible().
bool actres_removes_extra | ( | enum action_result | result, |
const struct extra_type * | pextra | ||
) |
Does action with the result remove the extra
result | Action result to check |
pextra | Extra to check |
Definition at line 810 of file actres.c.
Referenced by go_act_menu::create(), execute_orders(), helptext_unit(), real_menus_init(), real_menus_update(), unit_order_list_is_sane(), and utype_can_remove_extra().
enum action_sub_target_kind actres_sub_target_kind_default | ( | enum action_result | result | ) |
Return default sub target kind for the action with the specified result.
Definition at line 672 of file actres.c.
Referenced by action_new().
enum act_tgt_compl actres_target_compl_calc | ( | enum action_result | result | ) |
Returns the sub target complexity for the action with the specified result when it has the specified target kind and sub target kind.
Definition at line 258 of file actres.c.
Referenced by action_new().
enum action_target_kind actres_target_kind_default | ( | enum action_result | result | ) |
Return default target kind for the action with the specified result.
Definition at line 770 of file actres.c.
Referenced by action_new(), and load_action_kind().