player.cc File Reference

#include "AppHdr.h"
#include "player.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <ctype.h>
#include <math.h>
#include <sstream>
#include <algorithm>
#include "areas.h"
#include "artefact.h"
#include "branch.h"
#include "cloud.h"
#include "clua.h"
#include "coord.h"
#include "coordit.h"
#include "delay.h"
#include "dgnevent.h"
#include "directn.h"
#include "effects.h"
#include "env.h"
#include "errors.h"
#include "exercise.h"
#include "fight.h"
#include "godabil.h"
#include "godconduct.h"
#include "godpassive.h"
#include "hints.h"
#include "hiscores.h"
#include "it_use2.h"
#include "item_use.h"
#include "itemname.h"
#include "itemprop.h"
#include "items.h"
#include "kills.h"
#include "libutil.h"
#include "macro.h"
#include "map_knowledge.h"
#include "message.h"
#include "misc.h"
#include "mon-util.h"
#include "mutation.h"
#include "notes.h"
#include "options.h"
#include "ouch.h"
#include "output.h"
#include "place.h"
#include "player-stats.h"
#include "quiver.h"
#include "random.h"
#include "religion.h"
#include "shopping.h"
#include "shout.h"
#include "skills.h"
#include "skills2.h"
#include "species.h"
#include "spl-other.h"
#include "spl-selfench.h"
#include "spl-transloc.h"
#include "spl-util.h"
#include "sprint.h"
#include "stairs.h"
#include "state.h"
#include "status.h"
#include "stuff.h"
#include "tagstring.h"
#include "terrain.h"
#include "transform.h"
#include "traps.h"
#include "travel.h"
#include "view.h"
#include "viewgeom.h"
#include "xom.h"

Functions

bool check_moveto (const coord_def &p, const std::string &move_verb)
void moveto_location_effects (dungeon_feature_type old_feat, bool stepped, bool allow_shift, const coord_def &old_pos)
void move_player_to_grid (const coord_def &p, bool stepped, bool allow_shift)
bool is_feat_dangerous (dungeon_feature_type grid, bool permanently)
bool player_in_mappable_area (void)
bool player_in_branch (int branch)
bool player_in_level_area (level_area_type area)
bool player_in_hell (void)
bool species_likes_water ()
bool player_likes_water (bool permanently)
bool player_in_bat_form ()
bool player_can_open_doors ()
bool player_under_penance (void)
bool player_genus (genus_type which_genus, species_type species)
bool is_player_same_species (const int mon, bool transform)
void update_player_symbol ()
monster_type player_mons (bool transform)
void update_vision_range ()
bool you_can_wear (int eq, bool special_armour)
bool player_has_feet ()
bool player_wearing_slot (int eq)
bool you_tran_can_wear (const item_def &item)
bool you_tran_can_wear (int eq, bool check_mutation)
bool player_weapon_wielded ()
bool berserk_check_wielded_weapon ()
int player_equip (equipment_type slot, int sub_type, bool calc_unid)
int player_equip_ego_type (int slot, int special, bool calc_unid)
bool player_equip_unrand (int unrand_index)
int player_evokable_levitation ()
int player_evokable_invis ()
bool player_can_hit_monster (const monster *mon)
int player_teleport (bool calc_unid)
int player_regen ()
int player_hunger_rate (void)
int player_spell_levels (void)
bool player_likes_chunks (bool permanently)
int player_res_fire (bool calc_unid, bool temp, bool items)
int player_res_steam (bool calc_unid, bool temp, bool items)
int player_res_cold (bool calc_unid, bool temp, bool items)
int player_res_corr (bool calc_unid, bool items)
int player_res_acid (bool calc_unid, bool items)
int player_acid_resist_factor ()
int player_res_electricity (bool calc_unid, bool temp, bool items)
bool player_control_teleport (bool calc_unid, bool temp, bool items)
int player_res_torment (bool, bool temp)
int player_res_poison (bool calc_unid, bool temp, bool items)
int player_res_sticky_flame (bool calc_unid, bool temp, bool items)
int player_spec_death ()
int player_spec_holy ()
int player_spec_fire ()
int player_spec_cold ()
int player_spec_earth ()
int player_spec_air ()
int player_spec_conj ()
int player_spec_ench ()
int player_spec_summ ()
int player_spec_poison ()
int player_energy ()
int player_prot_life (bool calc_unid, bool temp, bool items)
int player_movement_speed (bool ignore_burden)
int player_speed (void)
int player_ponderousness ()
bool is_effectively_light_armour (const item_def *item)
bool player_effectively_in_light_armour ()
bool player_is_shapechanged (void)
int player_evasion_size_factor ()
int player_adjusted_shield_evasion_penalty (int scale)
int player_raw_body_armour_evasion_penalty ()
int player_size_adjusted_body_armour_evasion_penalty (int scale)
int player_adjusted_body_armour_evasion_penalty (int scale)
int player_evasion_bonuses (ev_ignore_type evit)
int player_scale_evasion (const int prescaled_ev, const int scale)
int player_evasion (ev_ignore_type evit)
int player_body_armour_racial_spellcasting_bonus (const int scale)
int player_armour_shield_spell_penalty ()
int player_magical_power (void)
int player_mag_abil (bool is_weighted)
int player_shield_class (void)
int player_sust_abil (bool calc_unid)
int carrying_capacity (burden_state_type bs)
int burden_change (void)
void forget_map (int chance_forgotten, bool force)
void gain_exp (unsigned int exp_gained, unsigned int *actual_gain, unsigned int *actual_avail_gain)
void level_change (bool skip_attribute_increase)
int check_stealth (void)
int get_expiration_threshold (duration_type dur)
bool dur_expiring (duration_type dur)
void display_char_status ()
bool player_item_conserve (bool calc_unid)
int player_mental_clarity (bool calc_unid, bool items)
int player_spirit_shield (bool calc_unid)
bool extrinsic_amulet_effect (jewellery_type amulet)
bool wearing_amulet (jewellery_type amulet, bool calc_unid, bool ignore_extrinsic)
unsigned int exp_needed (int lev)
int slaying_bonus (weapon_property_type which_affected, bool ranged)
bool items_give_ability (const int slot, artefact_prop_type abil)
int scan_artefacts (artefact_prop_type which_property, bool calc_unid)
void dec_hp (int hp_loss, bool fatal, const char *aux)
void dec_mp (int mp_loss)
bool enough_hp (int minimum, bool suppress_msg)
bool enough_mp (int minimum, bool suppress_msg, bool include_items)
bool enough_xp (int minimum, bool suppress_msg)
void inc_mp (int mp_gain, bool max_too)
void inc_hp (int hp_gain, bool max_too)
void rot_hp (int hp_loss)
void unrot_hp (int hp_recovered)
int player_rotted ()
void rot_mp (int mp_loss)
void inc_max_hp (int hp_gain)
void dec_max_hp (int hp_loss)
void inc_max_mp (int mp_gain)
void dec_max_mp (int mp_loss)
void deflate_hp (int new_level, bool floor)
void set_hp (int new_amount, bool max_too)
void set_mp (int new_amount, bool max_too)
int get_real_hp (bool trans, bool rotted)
int get_real_mp (bool include_items)
int get_contamination_level ()
std::string describe_contamination (int cont)
void contaminate_player (int change, bool controlled, bool msg)
bool confuse_player (int amount, bool resistable)
bool curare_hits_player (int death_source, int amount, const bolt &beam)
bool poison_player (int amount, std::string source, std::string source_aux, bool force)
void dec_poison_player ()
void reduce_poison_player (int amount)
bool miasma_player (std::string source, std::string source_aux)
bool napalm_player (int amount)
void dec_napalm_player (int delay)
bool slow_player (int turns)
void dec_slow_player (int delay)
void dec_exhaust_player (int delay)
bool haste_player (int turns, bool rageext)
void dec_haste_player (int delay)
void dec_disease_player (int delay)
void float_player (bool fly)
void levitate_player (int pow)
bool land_player ()
int count_worn_ego (int which_ego)
int calc_hunger (int food_cost)
int player_icemail_armour_class ()
int player_mutation_level (mutation_type mut)
int player_res_magic (bool calc_unid, bool temp)

Function Documentation

bool berserk_check_wielded_weapon ( void   ) 

Here is the call graph for this function:

int burden_change ( void   ) 

Here is the call graph for this function:

int calc_hunger ( int  food_cost  ) 

int carrying_capacity ( burden_state_type  bs  ) 

Here is the call graph for this function:

bool check_moveto ( const coord_def p,
const std::string move_verb 
)

int check_stealth ( void   ) 

Here is the call graph for this function:

bool confuse_player ( int  amount,
bool  resistable 
)

Here is the call graph for this function:

void contaminate_player ( int  change,
bool  controlled,
bool  msg 
)

Here is the call graph for this function:

int count_worn_ego ( int  which_ego  ) 

Here is the call graph for this function:

bool curare_hits_player ( int  death_source,
int  amount,
const bolt beam 
)

Here is the call graph for this function:

void dec_disease_player ( int  delay  ) 

Here is the call graph for this function:

void dec_exhaust_player ( int  delay  ) 

Here is the call graph for this function:

void dec_haste_player ( int  delay  ) 

Here is the call graph for this function:

void dec_hp ( int  hp_loss,
bool  fatal,
const char *  aux 
)

Here is the call graph for this function:

void dec_max_hp ( int  hp_loss  ) 

Here is the call graph for this function:

void dec_max_mp ( int  mp_loss  ) 

Here is the call graph for this function:

void dec_mp ( int  mp_loss  ) 

Here is the call graph for this function:

void dec_napalm_player ( int  delay  ) 

Here is the call graph for this function:

void dec_poison_player (  ) 

Here is the call graph for this function:

void dec_slow_player ( int  delay  ) 

Here is the call graph for this function:

void deflate_hp ( int  new_level,
bool  floor 
)

Here is the call graph for this function:

std::string describe_contamination ( int  cont  ) 

Here is the call graph for this function:

void display_char_status ( void   ) 

Here is the call graph for this function:

bool dur_expiring ( duration_type  dur  ) 

Here is the call graph for this function:

bool enough_hp ( int  minimum,
bool  suppress_msg 
)

Here is the call graph for this function:

bool enough_mp ( int  minimum,
bool  suppress_msg,
bool  include_items 
)

Here is the call graph for this function:

bool enough_xp ( int  minimum,
bool  suppress_msg 
)

Here is the call graph for this function:

unsigned int exp_needed ( int  lev  ) 

bool extrinsic_amulet_effect ( jewellery_type  amulet  ) 

Here is the call graph for this function:

void float_player ( bool  fly  ) 

Here is the call graph for this function:

void forget_map ( int  chance_forgotten,
bool  force 
)

Here is the call graph for this function:

void gain_exp ( unsigned int  exp_gained,
unsigned int *  actual_gain,
unsigned int *  actual_avail_gain 
)

Here is the call graph for this function:

int get_contamination_level (  ) 

int get_expiration_threshold ( duration_type  dur  ) 

int get_real_hp ( bool  trans,
bool  rotted 
)

Here is the call graph for this function:

int get_real_mp ( bool  include_items  ) 

Here is the call graph for this function:

bool haste_player ( int  turns,
bool  rageext 
)

Here is the call graph for this function:

void inc_hp ( int  hp_gain,
bool  max_too 
)

Here is the call graph for this function:

void inc_max_hp ( int  hp_gain  ) 

Here is the call graph for this function:

void inc_max_mp ( int  mp_gain  ) 

Here is the call graph for this function:

void inc_mp ( int  mp_gain,
bool  max_too 
)

Here is the call graph for this function:

bool is_effectively_light_armour ( const item_def item  ) 

Here is the call graph for this function:

bool is_feat_dangerous ( dungeon_feature_type  grid,
bool  permanently 
)

Here is the call graph for this function:

bool is_player_same_species ( const int  mon,
bool  transform 
)

Here is the call graph for this function:

bool items_give_ability ( const int  slot,
artefact_prop_type  abil 
)

Here is the call graph for this function:

bool land_player (  ) 

Here is the call graph for this function:

void level_change ( bool  skip_attribute_increase  ) 

Here is the call graph for this function:

void levitate_player ( int  pow  ) 

Here is the call graph for this function:

bool miasma_player ( std::string  source,
std::string  source_aux 
)

Here is the call graph for this function:

void move_player_to_grid ( const coord_def p,
bool  stepped,
bool  allow_shift 
)

Here is the call graph for this function:

void moveto_location_effects ( dungeon_feature_type  old_feat,
bool  stepped,
bool  allow_shift,
const coord_def old_pos 
)

Here is the call graph for this function:

bool napalm_player ( int  amount  ) 

Here is the call graph for this function:

int player_acid_resist_factor (  ) 

Here is the call graph for this function:

int player_adjusted_body_armour_evasion_penalty ( int  scale  ) 

Here is the call graph for this function:

int player_adjusted_shield_evasion_penalty ( int  scale  ) 

Here is the call graph for this function:

int player_armour_shield_spell_penalty (  ) 

Here is the call graph for this function:

int player_body_armour_racial_spellcasting_bonus ( const int  scale  ) 

Here is the call graph for this function:

bool player_can_hit_monster ( const monster mon  ) 

Here is the call graph for this function:

bool player_can_open_doors (  ) 

bool player_control_teleport ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

bool player_effectively_in_light_armour (  ) 

Here is the call graph for this function:

int player_energy ( void   ) 

Here is the call graph for this function:

int player_equip ( equipment_type  slot,
int  sub_type,
bool  calc_unid 
)

Here is the call graph for this function:

int player_equip_ego_type ( int  slot,
int  special,
bool  calc_unid 
)

Here is the call graph for this function:

bool player_equip_unrand ( int  unrand_index  ) 

Here is the call graph for this function:

int player_evasion ( ev_ignore_type  evit  ) 

Here is the call graph for this function:

int player_evasion_bonuses ( ev_ignore_type  evit  ) 

Here is the call graph for this function:

int player_evasion_size_factor (  ) 

Here is the call graph for this function:

int player_evokable_invis (  ) 

Here is the call graph for this function:

int player_evokable_levitation (  ) 

Here is the call graph for this function:

bool player_genus ( genus_type  which_genus,
species_type  species 
)

Here is the call graph for this function:

bool player_has_feet ( void   ) 

Here is the call graph for this function:

int player_hunger_rate ( void   ) 

Here is the call graph for this function:

int player_icemail_armour_class (  ) 

bool player_in_bat_form (  ) 

bool player_in_branch ( int  branch  ) 

bool player_in_hell ( void   ) 

Here is the call graph for this function:

bool player_in_level_area ( level_area_type  area  ) 

bool player_in_mappable_area ( void   ) 

Here is the call graph for this function:

bool player_is_shapechanged ( void   ) 

bool player_item_conserve ( bool  calc_unid  ) 

Here is the call graph for this function:

bool player_likes_chunks ( bool  permanently  ) 

Here is the call graph for this function:

bool player_likes_water ( bool  permanently  ) 

Here is the call graph for this function:

int player_mag_abil ( bool  is_weighted  ) 

Here is the call graph for this function:

int player_magical_power ( void   ) 

Here is the call graph for this function:

int player_mental_clarity ( bool  calc_unid,
bool  items 
)

Here is the call graph for this function:

monster_type player_mons ( bool  transform  ) 

Here is the call graph for this function:

int player_movement_speed ( bool  ignore_burden  ) 

Here is the call graph for this function:

int player_mutation_level ( mutation_type  mut  ) 

Here is the call graph for this function:

int player_ponderousness (  ) 

Here is the call graph for this function:

int player_prot_life ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_raw_body_armour_evasion_penalty (  ) 

Here is the call graph for this function:

int player_regen ( void   ) 

Here is the call graph for this function:

int player_res_acid ( bool  calc_unid,
bool  items 
)

Here is the call graph for this function:

int player_res_cold ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_res_corr ( bool  calc_unid,
bool  items 
)

Here is the call graph for this function:

int player_res_electricity ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_res_fire ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_res_magic ( bool  calc_unid,
bool  temp 
)

Here is the call graph for this function:

int player_res_poison ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_res_steam ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_res_sticky_flame ( bool  calc_unid,
bool  temp,
bool  items 
)

Here is the call graph for this function:

int player_res_torment ( bool  ,
bool  temp 
)

Here is the call graph for this function:

int player_rotted (  ) 

int player_scale_evasion ( const int  prescaled_ev,
const int  scale 
)

Here is the call graph for this function:

int player_shield_class ( void   ) 

Here is the call graph for this function:

int player_size_adjusted_body_armour_evasion_penalty ( int  scale  ) 

Here is the call graph for this function:

int player_spec_air ( void   ) 

Here is the call graph for this function:

int player_spec_cold ( void   ) 

Here is the call graph for this function:

int player_spec_conj ( void   ) 

Here is the call graph for this function:

int player_spec_death ( void   ) 

Here is the call graph for this function:

int player_spec_earth ( void   ) 

Here is the call graph for this function:

int player_spec_ench ( void   ) 

Here is the call graph for this function:

int player_spec_fire ( void   ) 

Here is the call graph for this function:

int player_spec_holy ( void   ) 

int player_spec_poison ( void   ) 

Here is the call graph for this function:

int player_spec_summ ( void   ) 

Here is the call graph for this function:

int player_speed ( void   ) 

int player_spell_levels ( void   ) 

Here is the call graph for this function:

int player_spirit_shield ( bool  calc_unid  ) 

Here is the call graph for this function:

int player_sust_abil ( bool  calc_unid  ) 

Here is the call graph for this function:

int player_teleport ( bool  calc_unid  ) 

Here is the call graph for this function:

bool player_under_penance ( void   ) 

bool player_weapon_wielded (  ) 

bool player_wearing_slot ( int  eq  ) 

bool poison_player ( int  amount,
std::string  source,
std::string  source_aux,
bool  force 
)

Here is the call graph for this function:

void reduce_poison_player ( int  amount  ) 

Here is the call graph for this function:

void rot_hp ( int  hp_loss  ) 

Here is the call graph for this function:

void rot_mp ( int  mp_loss  ) 

Here is the call graph for this function:

int scan_artefacts ( artefact_prop_type  which_property,
bool  calc_unid 
)

Here is the call graph for this function:

void set_hp ( int  new_amount,
bool  max_too 
)

Here is the call graph for this function:

void set_mp ( int  new_amount,
bool  max_too 
)

Here is the call graph for this function:

int slaying_bonus ( weapon_property_type  which_affected,
bool  ranged 
)

Here is the call graph for this function:

bool slow_player ( int  turns  ) 

Here is the call graph for this function:

bool species_likes_water (  ) 

void unrot_hp ( int  hp_recovered  ) 

Here is the call graph for this function:

void update_player_symbol (  ) 

Here is the call graph for this function:

void update_vision_range (  ) 

Here is the call graph for this function:

bool wearing_amulet ( jewellery_type  amulet,
bool  calc_unid,
bool  ignore_extrinsic 
)

Here is the call graph for this function:

bool you_can_wear ( int  eq,
bool  special_armour 
)

Here is the call graph for this function:

bool you_tran_can_wear ( int  eq,
bool  check_mutation 
)

Here is the call graph for this function:

bool you_tran_can_wear ( const item_def item  ) 

Here is the call graph for this function:


Generated on Thu Jan 13 13:19:20 2011 by  doxygen 1.5.6