summaryrefslogtreecommitdiff
path: root/src/ability_type.hpp
blob: 0ec596ba4fbab777a802a613186894ae0fc72bff (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
36
37
38
39
40
41
42
43
44
45
46
47
#pragma once

#include <string>
#include <vector>

#include "h-basic.h"

/**
 * Abilities.
 */
struct ability_type
{
public:
	struct skill_requirement {
		s16b skill_idx = 0;
		s16b level = 0;
	};

public:
	std::string name;                             /* Name */
	std::string desc;                             /* Description */

	std::string action_desc;                      /* Action Description */

	s16b action_mkey = 0;                         /* Action do to */

	s16b cost = 0;                                /* Skill points cost */

	std::vector<skill_requirement> need_skills;   /* List of prereq skills */

	s16b stat[6] { };                             /* List of prereq stats */

	std::vector<s16b> need_abilities;             /* List of prereq abilities */

	/**
	 * Default constructor
	 */
	ability_type()
	{
		for (auto &stat_ref: stat)
		{
			// Requirement is always met unless otherwise specified.
			stat_ref = -1;
		}
	}

};