blob: f09e8e55d338a3ae6c99826061cd481f77365c8e (
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
31
32
33
34
35
|
#pragma once
#include "item.h"
#include "json.hpp"
#include <set>
namespace creature {
class Creature;
}
namespace item {
class Weapon : public Item {
public:
Weapon(const nlohmann::json& data);
std::string getDamageType(void) const;
int getDamageDieCount(void) const;
int getDamageDieSides(bool versatile=false) const;
std::set<std::string> getProperties(void) const;
std::string getWeaponType(void) const;
std::pair<int, int> getRange(void) const;
int getReach(void) const;
virtual nlohmann::json toJson(void) const;
private:
const std::string damageType;
const int damageDieCount;
const int damageDieSides;
const std::set<std::string> properties;
const std::string weaponType;
const std::pair<const int, const int> range;
const int reach;
};
std::string genActionText(const Weapon& w, const creature::Creature& c);
}
|