#import <character.h>
Inheritance diagram for TCharacter:
Public Member Functions | |
(id) | - init: |
Initializes the character. | |
(id) | - free |
(void) | - set_phys_properties:first_name:last_name:height:weight:height_unit:weight_unit:eye_color:hair_color:sex: |
Set the physical properties of the character. | |
(int) | - gain_exp: |
Have the character gain experience points in add_exp. | |
(int) | - lvl_up |
Level up the character by one. | |
(char *) | - get_first_name |
(char *) | - get_last_name |
(char *) | - get_eye_color |
(char *) | - get_hair_color |
(char *) | - get_bio |
(int) | - get_lvl |
(int) | - get_hp |
(int) | - get_hp_max |
(int) | - get_str |
(int) | - get_cons |
(int) | - get_intel |
(int) | - get_wis |
(int) | - get_charisma |
(int) | - get_dex |
(int) | - get_speed |
(int) | - get_exp |
(void) | - set_hp: |
(TItem *) | - equip:item: |
Put the item in the specified location, returning what was previously there. | |
(TItem *) | - get_item_equipped_at_location: |
Get item at location. | |
(void) | - consume: |
(void) | - eat: |
(void) | - drink: |
Public Attributes | |
char * | height_unit |
Something like "Centimeters" to be displayed after the height. | |
char * | weight_unit |
Something like "Newtons" to be displayed after the weight. | |
int | hunger |
10 is dying from hunger, 0 is full | |
int | thirst |
10 is dying from thirst, 0 is not thirsty | |
int | hunger_speed |
should be positive, how fast hunger increases | |
int | thirst_speed |
should be positive, how fast thirst increases | |
Protected Attributes | |
char * | first_name |
char * | last_name |
unsigned int | height |
unsigned int | weight |
char * | eye_color |
char * | hair_color |
unsigned short int | sex |
Use a predefined macro for this. | |
char * | bio |
A description of this character. | |
int | lvl |
Current level. | |
int | hp |
Current HP. | |
int | hp_max |
Maximum HP. | |
int | str |
strength | |
int | cons |
constitution | |
int | intel |
intelligence | |
int | wis |
wisdom | |
int | charisma |
int | dex |
dexterity | |
int | speed |
speed | |
int | exp |
experience points | |
TItem * | helmet |
Slot to place an item. | |
TItem * | face |
Slot to place an item. | |
TItem * | tunic |
Slot to place an item. | |
TItem * | armor |
Slot to place an item. | |
TItem * | belt |
Slot to place an item. | |
TItem * | backpack |
Slot to place an item. | |
TItem * | r_hand_holding |
Slot to place an item. | |
TItem * | r_hand_index_finger |
Slot to place an item. | |
TItem * | r_hand_middle_finger |
Slot to place an item. | |
TItem * | r_hand_ring_finger |
Slot to place an item. | |
TItem * | r_hand_pinky_finger |
Slot to place an item. | |
TItem * | l_hand_holding |
Slot to place an item. | |
TItem * | l_hand_index_finger |
Slot to place an item. | |
TItem * | l_hand_middle_finger |
Slot to place an item. | |
TItem * | l_hand_ring_finger |
Slot to place an item. | |
TItem * | l_hand_pinky_finger |
Slot to place an item. | |
TItem * | gloves |
Slot to place an item. | |
TItem * | boots |
Slot to place an item. | |
TCharacterClass * | charclass |
This character's Character Class. | |
TSkillSet * | skillset |
This character's Skill Set (independent from Character Class). |
Contains many variables for the state of the character and its characteristics. Contains many functions for manipulating the character and for getting and setting its state.
Definition at line 126 of file character.h.
|
Put the item in the specified location, returning what was previously there.
Definition at line 314 of file character.m. |
|
Have the character gain experience points in add_exp. Calls lvl_up if the new experience passes lvl_exp_increment in the character's charclass.
Definition at line 199 of file character.m. References lvl_up. |
|
Get item at location.
Definition at line 319 of file character.m. |
|
Initializes the character.
Definition at line 98 of file character.m. References TObject::init, and TCharacterClass::skillset. |
|
Set the physical properties of the character. Paramaters are copied into their respective fields in the class. Use NULL for pointers and -1 for others to keep the current. Definition at line 140 of file character.m. References first_name. |