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

Item structure represents an item in the game. More...

#include <item.h>

Public Attributes

char * name
 
char symbol
 
int type
 
int value
 
unsigned int x
 
unsigned int y
 
int damage
 
int defense
 
int hp
 
int count
 
int range
 
int color
 

Detailed Description

Item structure represents an item in the game.

This struct represents an item in the game. It can be a weapon, armor, potion or gold. Items are drawn in the map if the cell is visible. They are picked up by the player when he steps on them. And they are added to the player inventory.

Parameters
namethe name of the item
symbolthe symbol that represents the item
typethe type of item
valuethe value of the item in gold
xthe x coordinate of the item
ythe y coordinate of the item
damagethe damage of the item if it is a weapon
defensethe defense of the item if it is armor
hpthe hp of the item if it is a healing potion
countthe number of the same items
rangethe range of the item if it is a projectile
colorthe color of the item

Member Data Documentation

◆ color

int item::color

◆ count

int item::count

◆ damage

int item::damage

◆ defense

int item::defense

◆ hp

int item::hp

◆ name

char* item::name

◆ range

int item::range

◆ symbol

char item::symbol

◆ type

int item::type

◆ value

int item::value

◆ x

unsigned int item::x

◆ y

unsigned int item::y

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