Freeciv-3.2
|
#include "city.h"
#include "combat.h"
#include "fc_interface.h"
#include "game.h"
#include "map.h"
#include "metaknowledge.h"
#include "movement.h"
#include "player.h"
#include "requirements.h"
#include "tile.h"
#include "traderoutes.h"
#include "actres.h"
Go to the source code of this file.
Variables | |
static struct actres | act_results [ACTRES_LAST] |
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 298 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 782 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 361 of file actres.c.
Referenced by action_dice_roll_initial_odds().
Free resources allocated by the action results system
Definition at line 247 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 269 of file actres.c.
Referenced by action_prob_battle_then_dice_roll(), and helptext_unit().
Initialize action results system
Definition at line 240 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 283 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 555 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 462 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 373 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 828 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 803 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 666 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 255 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 763 of file actres.c.
Referenced by action_new(), and load_action_kind().
Returns TRUE iff the specified player knows (has seen) the specified tile.
Definition at line 817 of file actres.c.
Referenced by actres_possible().
|
static |
Definition at line 33 of file actres.c.
Referenced by actres_activity_result(), actres_creates_extra(), actres_dice_type(), actres_get_battle_kind(), actres_is_hostile(), actres_removes_extra(), actres_target_compl_calc(), and actres_target_kind_default().