summaryrefslogtreecommitdiff
path: root/src/map/skill.h
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-09-20 00:30:15 +0000
committerFate <fate-tmw@googlemail.com>2009-09-20 00:30:15 +0000
commit264bf4fd6dfb501643cf9178e5471e9e0e55152b (patch)
tree3ac7e832801590219bd62e8c45ccca2ccf86d2dd /src/map/skill.h
parent162c84a85c288bcb97df44d08e0c0ff271ec102b (diff)
downloadtmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.tar.gz
tmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.tar.bz2
tmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.tar.xz
tmwa-264bf4fd6dfb501643cf9178e5471e9e0e55152b.zip
Initial support for skill pools
Diffstat (limited to 'src/map/skill.h')
-rw-r--r--src/map/skill.h28
1 files changed, 27 insertions, 1 deletions
diff --git a/src/map/skill.h b/src/map/skill.h
index d0486f5..faff9a9 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -10,9 +10,13 @@
#define MAX_SKILL_ARROW_DB 150
#define MAX_SKILL_ABRA_DB 350
+#define SKILL_POOL_FLAG 0x1 // is a pool skill
+#define SKILL_POOL_ACTIVE 0x2 // is an active pool skill
+#define SKILL_POOL_ACTIVATED 0x4 // pool skill has been activated (used for clif)
+
// スキルデータベース
struct skill_db {
- int range[MAX_SKILL_LEVEL],hit,inf,pl,nk,max;
+ int range[MAX_SKILL_LEVEL],hit,inf,pl,nk,max, stat, poolflags, max_raise; // `max' is the global max, `max_raise' is the maximum attainable via skill-ups
int num[MAX_SKILL_LEVEL];
int cast[MAX_SKILL_LEVEL],delay[MAX_SKILL_LEVEL];
int upkeep_time[MAX_SKILL_LEVEL],upkeep_time2[MAX_SKILL_LEVEL];
@@ -684,6 +688,8 @@ enum {
NPC_DARKCROSS = 338,
+ TMW_SKILLPOOL = 339, // skill pool size
+
TMW_MAGIC = 340,
TMW_MAGIC_LIFE,
TMW_MAGIC_WAR,
@@ -818,5 +824,25 @@ enum {
GD_EXTENSION,
};
+
+// [Fate] Skill pools API
+
+// Max. # of active entries in the skill pool
+#define MAX_SKILL_POOL 3
+// Max. # of skills that may be classified as pool skills in db/skill_db.txt
+#define MAX_POOL_SKILLS 128
+
+int skill_pool(struct map_session_data *sd, int *skills); // Yields all active skills in the skill pool; no more than MAX_SKILL_POOL. Return is number of skills.
+int skill_pool_size(struct map_session_data *sd);
+int skill_pool_max(struct map_session_data *sd); // Max. number of pool skills
+void skill_pool_empty(struct map_session_data *sd); // Deactivate all pool skills
+int skill_pool_activate(struct map_session_data *sd, int skill); // Skill into skill pool. Return is zero iff okay.
+int skill_pool_is_activated(struct map_session_data *sd, int skill); // Skill into skill pool. Return is nonzero when activated.
+int skill_pool_deactivate(struct map_session_data *sd, int skill); // Skill out of skill pool. Return is zero iff okay.
+char *skill_name(int skill); // Yield configurable skill name
+int skill_stat(int skill); // Yields the stat associated with a skill. Returns zero if none, or SP_STR, SP_VIT, ... otherwise
+int skill_power(struct map_session_data *sd, int skill); // Yields the power of a skill. This is zero if the skill is unknown or if it's a pool skill that is outside of the skill pool,
+ // otherwise a value from 0 to 255 (with 200 being the `normal maximum')
+
#endif