WorldSim  inDev
2D tile-based sandbox RPG with procedurally generated fantasy world simulator 🌏
Item_Attributes.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef WORLDSIM_ITEM_ATTRIBUTES_HPP
3 #define WORLDSIM_ITEM_ATTRIBUTES_HPP
4 
5 /* Item_Attributes.hpp
6  #include"Item_Attributes.hpp"
7 
8  Container for attributes of an item. Includes tools for comparing with other items.
9 
10 */
11 
12 class Job;
13 
15 {
16  public:
17 
18  int durability; // How many actions it can perform
19  int health; // How many actions left it can perform
20 
25 
27 
28  // Item must meet all minimum requirements
29  int suitability(Job* job);
30 
31  bool degrade (int amount); // Degrade the item through activity. Returns true if the item broke.
32 };
33 
34 #endif // WORLDSIM_ITEM_ATTRIBUTES_HPP
int suitability(Job *job)
Definition: Item_Attributes.cpp:28
int miningValue
Definition: Item_Attributes.hpp:23
bool degrade(int amount)
Definition: Item_Attributes.cpp:73
int health
Definition: Item_Attributes.hpp:19
int durability
Definition: Item_Attributes.hpp:18
int woodcuttingValue
Definition: Item_Attributes.hpp:21
Definition: Item_Attributes.hpp:14
Definition: Job.hpp:7
int farmingValue
Definition: Item_Attributes.hpp:22
int huntingValue
Definition: Item_Attributes.hpp:24
Item_Attributes()
Definition: Item_Attributes.cpp:17