Freeciv21
Develop your civilization from humble roots to a global empire
handicaps.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  handicap_type {
  H_DIPLOMAT = 0 , H_AWAY , H_LIMITEDHUTS , H_DEFENSIVE ,
  H_EXPERIMENTAL , H_RATES , H_TARGETS , H_HUTS ,
  H_FOG , H_NOPLANES , H_MAP , H_DIPLOMACY ,
  H_REVOLUTION , H_EXPANSION , H_DANGER , H_CEASEFIRE ,
  H_NOBRIBE_WF , H_PRODCHGPEN , H_LAST
}
 

Functions

void handicaps_init (struct player *pplayer)
 Initialize handicaps for player. More...
 
void handicaps_close (struct player *pplayer)
 Free resources associated with player handicaps. More...
 
void handicaps_set (struct player *pplayer, QBitArray *handicaps)
 Set player handicaps. More...
 
bool has_handicap (const struct player *pplayer, enum handicap_type htype)
 AI players may have handicaps - allowing them to cheat or preventing them from using certain algorithms. More...
 
const char * handicap_desc (enum handicap_type htype, bool *inverted)
 Return a short (translated) string describing the handicap, for help. More...
 

Enumeration Type Documentation

◆ handicap_type

Enumerator
H_DIPLOMAT 
H_AWAY 
H_LIMITEDHUTS 
H_DEFENSIVE 
H_EXPERIMENTAL 
H_RATES 
H_TARGETS 
H_HUTS 
H_FOG 
H_NOPLANES 
H_MAP 
H_DIPLOMACY 
H_REVOLUTION 
H_EXPANSION 
H_DANGER 
H_CEASEFIRE 
H_NOBRIBE_WF 
H_PRODCHGPEN 
H_LAST 

Definition at line 16 of file handicaps.h.

Function Documentation

◆ handicap_desc()

const char* handicap_desc ( enum handicap_type  htype,
bool *  inverted 
)

Return a short (translated) string describing the handicap, for help.

In some cases it's better to describe what happens if the handicap is absent; 'inverted' is set TRUE in these cases.

Definition at line 76 of file handicaps.cpp.

Referenced by ai_level_help().

◆ handicaps_close()

void handicaps_close ( struct player pplayer)

Free resources associated with player handicaps.

Definition at line 37 of file handicaps.cpp.

Referenced by player_limit_to_max_rates().

◆ handicaps_init()

void handicaps_init ( struct player pplayer)

Initialize handicaps for player.

Definition at line 26 of file handicaps.cpp.

Referenced by server_player_init().

◆ handicaps_set()

void handicaps_set ( struct player pplayer,
QBitArray *  handicaps 
)

Set player handicaps.

Definition at line 50 of file handicaps.cpp.

Referenced by set_ai_level_directer().

◆ has_handicap()

bool has_handicap ( const struct player pplayer,
enum handicap_type  htype 
)

AI players may have handicaps - allowing them to cheat or preventing them from using certain algorithms.

This function returns whether the player has the given handicap. Human players are assumed to have no handicaps.

Definition at line 62 of file handicaps.cpp.

Referenced by adjust_improvement_wants_by_effects(), adv_best_government(), adv_data_phase_init(), adv_settler_safe_tile(), assess_danger(), auto_settler_setup_work(), calculate_city_clusters(), change_build_target(), city_desirability(), cityresult_fill(), dai_choose_attacker_air(), dai_choose_diplomat_offensive(), dai_city_choose_build(), dai_consider_tile_dangerous(), dai_diplomacy_first_contact(), dai_diplomat_bribe_nearby(), dai_effect_value(), dai_fill_unit_param(), dai_find_strategic_airbase(), dai_goldequiv_clause(), dai_hunter_choice(), dai_hunter_manage(), dai_hunter_try_launch(), dai_manage_barbarian_leader(), dai_manage_caravan(), dai_manage_diplomat(), dai_manage_government(), dai_manage_military(), dai_manage_taxes(), dai_share(), dai_unit_can_strike_my_unit(), dai_war_desire(), dai_wonder_city_distance(), explorer_desirable(), explorer_goto(), find_best_city_placement(), find_best_tile_to_paradrop_to(), find_nearest_airbase(), find_nearest_safe_city(), find_rampage_target(), find_something_to_bomb(), find_something_to_kill(), handle_player_change_government(), immediate_destination(), is_city_surrounded_by_our_spies(), look_for_charge(), player_restore_units(), process_attacker_want(), settler_evaluate_city_requests(), settler_evaluate_improvements(), and unit_enter_hut().