blob: 4351a2410c48350f252b9a820eb333f8505ecbfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#pragma once
#include "item.h"
#include <nlohmann/json.hpp>
namespace entry {
class Armor;
class Armor : public Item , public Substantial {
public:
int getACBonus(void) const {return ac;}
std::string getArmorType(void) const {return armor_type;}
int getStrRequirement(void) const {return strength;}
bool stealthDisadvantage(void) const {return disadvantage;}
int getCost(void) const {return cost;}
double getWeight(void) const {return weight;}
virtual std::string getText() const override;
virtual std::string getText(const creature::Creature& c) const override;
NLOHMANN_DEFINE_DERIVED_TYPE_INTRUSIVE(Item, Armor, ac, armor_type, strength, disadvantage, cost, weight);
private:
int ac;
std::string armor_type;
int strength;
bool disadvantage;
int cost;
double weight;
};
}
|