LI2 Roguelite
Public Attributes | List of all members
player Struct Reference

Structure of a player. More...

#include <player.h>

Collaboration diagram for player:
Collaboration graph
[legend]

Public Attributes

unsigned int x
 
unsigned int y
 
char symbol
 
int health
 
int defense
 
int attack
 
int vision
 
int vision_width
 
int earing_range_close
 
int earing_range_far
 
int earing_prob
 
int sensory_potion_turns
 
int potion_invincibility_turns
 
int max_health
 
int direction
 
int color
 
Inventoryinventory
 

Detailed Description

Structure of a player.

A player is a singular game unit with 2D coordinates, a symbol, a health, a defense, an attack, a vision and more. TODO

Parameters
symbolCharacter to be displayed on the screen
xplayer x coordinate
yplayer y coordinate
healthHealth of the player
max_healthMaximum health of the player set to MAX_HEALTH macro
defenseDefense of the player
attackAttack of the player
visionVision of the player in cells
vision_widthVision width of the player in cells
earing_range_closeEarling range of the player in cells
earing_range_farEarling range of the player in cells
earing_probProbability of hearing a close monster when a player moves (in %)
sensory_potion_turnsNumber of turns the player has sensory potion effect
potion_invincibility_turnsNumber of turns the player has invincibility potion effect
directionDirection of the player (used for throwing projectiles)
colorColor of the player changes when he takes damage or uses a potion
inventoryInventory of the player

Member Data Documentation

◆ attack

int player::attack

◆ color

int player::color

◆ defense

int player::defense

◆ direction

int player::direction

◆ earing_prob

int player::earing_prob

◆ earing_range_close

int player::earing_range_close

◆ earing_range_far

int player::earing_range_far

◆ health

int player::health

◆ inventory

Inventory* player::inventory

◆ max_health

int player::max_health

◆ potion_invincibility_turns

int player::potion_invincibility_turns

◆ sensory_potion_turns

int player::sensory_potion_turns

◆ symbol

char player::symbol

◆ vision

int player::vision

◆ vision_width

int player::vision_width

◆ x

unsigned int player::x

◆ y

unsigned int player::y

The documentation for this struct was generated from the following file: