summaryrefslogtreecommitdiff
path: root/src/map/skill.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.h')
-rw-r--r--src/map/skill.h140
1 files changed, 108 insertions, 32 deletions
diff --git a/src/map/skill.h b/src/map/skill.h
index 96bef090a..bba440107 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -32,6 +32,7 @@
**/
struct Damage;
struct homun_data;
+struct itemlist; // map/itemdb.h
struct map_session_data;
struct mercenary_data;
struct unit_data;
@@ -57,7 +58,7 @@ struct status_change_entry;
#define MAX_SKILLUNITGROUP 25
#define MAX_SKILL_ITEM_REQUIRE 10
#define MAX_SKILLUNITGROUPTICKSET 25
-#define MAX_SKILL_NAME_LENGTH 30
+#define MAX_SKILL_NAME_LENGTH 32
// (Epoque:) To-do: replace this macro with some sort of skill tree check (rather than hard-coded skill names)
#define skill_ischangesex(id) ( \
@@ -90,6 +91,7 @@ enum e_skill_inf {
enum e_skill_nk {
NK_NO_DAMAGE = 0x01,
NK_SPLASH = 0x02|0x04, // 0x4 = splash & split
+ NK_SPLASH_ONLY = 0x02,
NK_SPLASHSPLIT = 0x04,
NK_NO_CARDFIX_ATK = 0x08,
NK_NO_ELEFIX = 0x10,
@@ -101,21 +103,23 @@ enum e_skill_nk {
//A skill with 3 would be no damage + splash: area of effect.
//Constants to identify a skill's inf2 value.
enum e_skill_inf2 {
- INF2_QUEST_SKILL = 0x0001,
- INF2_NPC_SKILL = 0x0002, // NPC skills are those that players can't have in their skill tree.
- INF2_WEDDING_SKILL = 0x0004,
- INF2_SPIRIT_SKILL = 0x0008,
- INF2_GUILD_SKILL = 0x0010,
- INF2_SONG_DANCE = 0x0020,
- INF2_ENSEMBLE_SKILL = 0x0040,
- INF2_TRAP = 0x0080,
- INF2_TARGET_SELF = 0x0100, // Refers to ground placed skills that will target the caster as well (like Grandcross)
- INF2_NO_TARGET_SELF = 0x0200,
- INF2_PARTY_ONLY = 0x0400,
- INF2_GUILD_ONLY = 0x0800,
- INF2_NO_ENEMY = 0x1000,
- INF2_NOLP = 0x2000, // Spells that can ignore Land Protector
- INF2_CHORUS_SKILL = 0x4000, // Chorus skill
+ INF2_QUEST_SKILL = 0x00001,
+ INF2_NPC_SKILL = 0x00002, // NPC skills are those that players can't have in their skill tree.
+ INF2_WEDDING_SKILL = 0x00004,
+ INF2_SPIRIT_SKILL = 0x00008,
+ INF2_GUILD_SKILL = 0x00010,
+ INF2_SONG_DANCE = 0x00020,
+ INF2_ENSEMBLE_SKILL = 0x00040,
+ INF2_TRAP = 0x00080,
+ INF2_TARGET_SELF = 0x00100, // Refers to ground placed skills that will target the caster as well (like Grandcross)
+ INF2_NO_TARGET_SELF = 0x00200,
+ INF2_PARTY_ONLY = 0x00400,
+ INF2_GUILD_ONLY = 0x00800,
+ INF2_NO_ENEMY = 0x01000,
+ INF2_NOLP = 0x02000, // Spells that can ignore Land Protector
+ INF2_CHORUS_SKILL = 0x04000, // Chorus skill
+ INF2_FREE_CAST_NORMAL = 0x08000,
+ INF2_FREE_CAST_REDUCED = 0x10000,
};
@@ -1361,6 +1365,10 @@ enum e_skill {
ITEM_OPTION_SPLASH_ATTACK,
GM_FORCE_TRANSFER,
GM_WIDE_RESURRECTION,
+ ALL_NIFLHEIM_RECALL,
+ ALL_PRONTERA_RECALL,
+ ALL_GLASTHEIM_RECALL,
+ ALL_THANATOS_RECALL,
GC_DARKCROW = 5001,
RA_UNLIMIT,
@@ -1378,6 +1386,47 @@ enum e_skill {
ALL_FULL_THROTTLE,
NC_MAGMA_ERUPTION_DOTDAMAGE,
+ /** Summoner */
+ SU_BASIC_SKILL = 5018,
+ SU_BITE,
+ SU_HIDE,
+ SU_SCRATCH,
+ SU_STOOP,
+ SU_LOPE,
+ SU_SPRITEMABLE,
+ SU_POWEROFLAND,
+ SU_SV_STEMSPEAR,
+ SU_CN_POWDERING,
+ SU_CN_METEOR,
+ SU_SV_ROOTTWIST,
+ SU_SV_ROOTTWIST_ATK,
+ SU_POWEROFLIFE,
+ SU_SCAROFTAROU,
+ SU_PICKYPECK,
+ SU_PICKYPECK_DOUBLE_ATK,
+ SU_ARCLOUSEDASH,
+ SU_LUNATICCARROTBEAT,
+ SU_POWEROFSEA,
+ SU_TUNABELLY,
+ SU_TUNAPARTY,
+ SU_BUNCHOFSHRIMP,
+ SU_FRESHSHRIMP,
+ SU_CN_METEOR2,
+ SU_LUNATICCARROTBEAT2,
+ SU_SOULATTACK,
+ SU_POWEROFFLOCK,
+ SU_SVG_SPIRIT,
+ SU_HISS,
+ SU_NYANGGRASS,
+ SU_GROOMING,
+ SU_PURRING,
+ SU_SHRIMPARTY,
+ SU_SPIRITOFLIFE,
+ SU_MEOWMEOW,
+ SU_SPIRITOFLAND,
+ SU_CHATTERING,
+ SU_SPIRITOFSEA,
+
HLIF_HEAL = 8001,
HLIF_AVOID,
HLIF_BRAIN,
@@ -1647,6 +1696,9 @@ enum {
UNT_B_TRAP,
UNT_FIRE_RAIN,
+ UNT_CATNIPPOWDER,
+ UNT_SV_ROOTTWIST,
+
/**
* Guild Auras
**/
@@ -1855,12 +1907,12 @@ struct skill_interface {
void (*reload) (void);
void (*read_db) (bool minimal);
/* */
- DBMap* cd_db; // char_id -> struct skill_cd
- DBMap* name2id_db;
- DBMap* unit_db; // int id -> struct skill_unit*
- DBMap* usave_db; // char_id -> struct skill_unit_save
- DBMap* group_db;// int group_id -> struct skill_unit_group*
- DBMap* bowling_db;// int mob_id -> struct mob_data*s
+ struct DBMap *cd_db; // char_id -> struct skill_cd
+ struct DBMap *name2id_db;
+ struct DBMap *unit_db; // int id -> struct skill_unit*
+ struct DBMap *usave_db; // char_id -> struct skill_unit_save
+ struct DBMap *group_db;// int group_id -> struct skill_unit_group*
+ struct DBMap *bowling_db;// int mob_id -> struct mob_data*s
/* */
struct eri *unit_ers; //For handling skill_unit's [Skotlex]
struct eri *timer_ers; //For handling skill_timerskills [Skotlex]
@@ -1918,7 +1970,7 @@ struct skill_interface {
int (*get_unit_layout_type) ( uint16 skill_id ,uint16 skill_lv );
int (*get_unit_range) ( uint16 skill_id, uint16 skill_lv );
int (*get_cooldown) ( uint16 skill_id, uint16 skill_lv );
- int (*tree_get_max) ( uint16 skill_id, int b_class );
+ int (*tree_get_max) (uint16 skill_id, int class);
const char *(*get_name) ( uint16 skill_id );
const char *(*get_desc) ( uint16 skill_id );
/* check */
@@ -1974,12 +2026,15 @@ struct skill_interface {
bool (*can_cloak) (struct map_session_data *sd);
int (*enchant_elemental_end) (struct block_list *bl, int type);
int (*not_ok) (uint16 skill_id, struct map_session_data *sd);
+ int (*not_ok_unknown) (uint16 skill_id, struct map_session_data *sd);
int (*not_ok_hom) (uint16 skill_id, struct homun_data *hd);
+ int (*not_ok_hom_unknown) (uint16 skill_id, struct homun_data *hd);
int (*not_ok_mercenary) (uint16 skill_id, struct mercenary_data *md);
int (*chastle_mob_changetarget) (struct block_list *bl,va_list ap);
int (*can_produce_mix) ( struct map_session_data *sd, int nameid, int trigger, int qty);
int (*produce_mix) ( struct map_session_data *sd, uint16 skill_id, int nameid, int slot1, int slot2, int slot3, int qty );
int (*arrow_create) ( struct map_session_data *sd,int nameid);
+ void (*castend_type) (int type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
int (*castend_nodamage_id) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
int (*castend_damage_id) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick,int flag);
int (*castend_pos2) (struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag);
@@ -2022,6 +2077,7 @@ struct skill_interface {
int (*sit_out) (struct block_list *bl, va_list ap);
void (*unitsetmapcell) (struct skill_unit *src, uint16 skill_id, uint16 skill_lv, cell_t cell, bool flag);
int (*unit_onplace_timer) (struct skill_unit *src, struct block_list *bl, int64 tick);
+ void (*unit_onplace_timer_unknown) (struct skill_unit *src, struct block_list *bl, int64 *tick);
int (*unit_effect) (struct block_list* bl, va_list ap);
int (*unit_timer_sub_onplace) (struct block_list* bl, va_list ap);
int (*unit_move_sub) (struct block_list* bl, va_list ap);
@@ -2030,13 +2086,30 @@ struct skill_interface {
int (*blockmerc_end) (int tid, int64 tick, int id, intptr_t data);
int (*split_atoi) (char *str, int *val);
int (*unit_timer) (int tid, int64 tick, int id, intptr_t data);
- int (*unit_timer_sub) (DBKey key, DBData *data, va_list ap);
+ int (*unit_timer_sub) (union DBKey key, struct DBData *data, va_list ap);
void (*init_unit_layout) (void);
- bool (*parse_row_skilldb) (char* split[], int columns, int current);
- bool (*parse_row_requiredb) (char* split[], int columns, int current);
- bool (*parse_row_castdb) (char* split[], int columns, int current);
- bool (*parse_row_castnodexdb) (char* split[], int columns, int current);
- bool (*parse_row_unitdb) (char* split[], int columns, int current);
+ void (*init_unit_layout_unknown) (int skill_idx);
+ void (*validate_hittype) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_skilltype) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_attacktype) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_element) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_skillinfo) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_damagetype) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_castnodex) (struct config_setting_t *conf, struct s_skill_db *sk, bool delay);
+ void (*validate_weapontype) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_ammotype) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_state) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_item_requirements) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_unit_target) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_unit_flag) (struct config_setting_t *conf, struct s_skill_db *sk);
+ void (*validate_additional_fields) (struct config_setting_t *conf, struct s_skill_db *sk);
+ bool (*validate_skilldb) (struct s_skill_db *skt, const char *source);
+ int (*validate_weapontype_sub) (const char *type, bool on, struct s_skill_db *sk);
+ int (*validate_ammotype_sub) (const char *type, bool on, struct s_skill_db *sk);
+ int (*validate_unit_flag_sub) (const char *type, bool on, struct s_skill_db *sk);
+ bool (*read_skilldb) (const char *filename);
+ void (*config_set_level) (struct config_setting_t *conf, int *arr);
+ void (*level_set_value) (int *arr, int value);
bool (*parse_row_producedb) (char* split[], int columns, int current);
bool (*parse_row_createarrowdb) (char* split[], int columns, int current);
bool (*parse_row_abradb) (char* split[], int columns, int current);
@@ -2060,8 +2133,8 @@ struct skill_interface {
int (*magicdecoy) (struct map_session_data *sd, int nameid);
int (*poisoningweapon) ( struct map_session_data *sd, int nameid);
int (*select_menu) (struct map_session_data *sd,uint16 skill_id);
- int (*elementalanalysis) (struct map_session_data *sd, int n, uint16 skill_lv, unsigned short *item_list);
- int (*changematerial) (struct map_session_data *sd, int n, unsigned short *item_list);
+ int (*elementalanalysis) (struct map_session_data *sd, uint16 skill_lv, const struct itemlist *item_list);
+ int (*changematerial) (struct map_session_data *sd, const struct itemlist *item_list);
int (*get_elemental_type) (uint16 skill_id, uint16 skill_lv);
void (*cooldown_save) (struct map_session_data * sd);
int (*get_new_group_id) (void);
@@ -2099,6 +2172,9 @@ struct skill_interface {
bool (*get_requirement_off_unknown) (struct status_change *sc, uint16 *skill_id);
bool (*get_requirement_item_unknown) (struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, uint16 *idx, int *i);
void (*get_requirement_unknown) (struct status_change *sc, struct map_session_data* sd, uint16 *skill_id, uint16 *skill_lv, struct skill_condition *req);
+ int (*splash_target) (struct block_list* bl);
+ int (*check_npc_chaospanic) (struct block_list *bl, va_list args);
+ int (*count_wos) (struct block_list *bl, va_list ap);
};
#ifdef HERCULES_CORE