#include <item.h>
Public Member Functions | |
| Equipment (int _rarity, int _weight, Tile _sprite, std::string _name, IntPoint _coords, int bp, int t) | |
| Equipment (IntPoint _coords, EquipType eqp) | |
| void | perform_action () |
| int | get_body_part () |
| int | get_hit (int type) |
| float | get_dam (int type) |
Public Member Functions inherited from Item | |
| Item (IntPoint _coords) | |
| Item (int _rarity, int _weight, Tile _sprite, std::string _name, IntPoint _coords) | |
| int | get_weight () |
| Tile * | get_sprite () |
| IntPoint | get_coords () |
| void | set_coords (IntPoint _c) |
| std::string | get_name () |
| int | get_rarity () |
| std::string | get_description () |
| int | get_size () |
Protected Attributes | |
| int | body_part |
| int | type |
| std::vector< int > | to_hit |
| std::vector< float > | to_dam |
Protected Attributes inherited from Item | |
| std::string | name |
| std::string | description |
| int | weight |
| IntPoint | coords |
| Tile | sprite |
| int | rarity |
| int | size |
Additional Inherited Members | |
Public Attributes inherited from Item | |
| bool | can_equip |
| bool | can_use |
| bool | can_wield |
| bool | can_consume |
The class responsible for creating equipiment. Equipment refers to anything wearable on the body.
| Equipment::Equipment | ( | int | _rarity, |
| int | _weight, | ||
| Tile | _sprite, | ||
| std::string | _name, | ||
| IntPoint | _coords, | ||
| int | bp, | ||
| int | t | ||
| ) |
The constructor for the equipment.
| _rarity | Sets the rarity of the equipment. |
| _weight | Sets the weight of the equipment. |
| _sprite | Sets the sprite for the equipment. |
| _name | Sets the name of the equipment. |
| _coords | Sets the coordinates of the equipments. |
| bp | Sets the body_part for the equipment. |
| t | Sets the type of the equipment. |
| ac | Sets the armor_class of the equipment. |
Constructor for the equipment. This is the normally used constructor, relying on the defined EquipTypes and taking a set of coordinates.
| _coords | Sets the coordinates of the equipment. |
| eqp | THe template for the equipment. |
| int Equipment::get_body_part | ( | ) |
Public accessor for body_part.
| float Equipment::get_dam | ( | int | type | ) |
Public accessor for to_dam.
| int Equipment::get_hit | ( | int | type | ) |
Public accessor for to_hit.
|
virtual |
For performaing an action other than increasing the armor class.
Implements Item.
|
protected |
Which body part the equipment will be worn on. This corresponds to the index in the Characters equipment
|
protected |
Determines the damage bonus gained from the equipment.
|
protected |
Determines hit bonus gained from the equipment.
|
protected |
Determines which type of armor it is.
1.8.8