aboutsummaryrefslogtreecommitdiff
path: root/backend/Enemy.h
blob: 71ad4373c4e32188d76a37ecdc7e1909543d8992 (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 "backend/String.h"

class Enemy {
public:
	void set_name(const String & name);
	const String & get_name() const;
	void set_description(const String & description);
	const String & get_description() const;
	unsigned get_health() const;
	void take_damage(unsigned int dmg);
	virtual const String & get_displayname() const;
	void set_attack(float attack_chance);
	float get_attack() const;
	void set_damage_min(int damage_min);
	int get_damage_min() const;
	void set_damage_max(int damage_max);
	int get_damage_max() const;

private:
	friend class EnemyFactory;
	Enemy(const String & name, const String & description);
public:
	virtual ~Enemy() = default;

private:
	String name;
	String description;
	unsigned int health_points = 0;
	float attack_chance = 0.0;
	int damage_min = 0;
	int damage_max = 0;
};