From 5d35f372f696e3aa3a40734066d5127835baa3d0 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 26 Dec 2011 09:16:50 +0000 Subject: Added support for Renewal Mode exclusive skill files, as per Kenpachi request -- Entries in skill__db_re.txt safely overrides entries in its non_re.txt versions. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15284 54d463be-8e91-2dee-dedb-b68131a5f0ec --- db/skill_cast_db_re.txt | 21 ++++++++++++++++++++ db/skill_db_re.txt | 49 ++++++++++++++++++++++++++++++++++++++++++++++ db/skill_require_db_re.txt | 24 +++++++++++++++++++++++ db/skill_unit_db_re.txt | 28 ++++++++++++++++++++++++++ src/map/skill.c | 6 ++++++ 5 files changed, 128 insertions(+) create mode 100644 db/skill_cast_db_re.txt create mode 100644 db/skill_db_re.txt create mode 100644 db/skill_require_db_re.txt create mode 100644 db/skill_unit_db_re.txt diff --git a/db/skill_cast_db_re.txt b/db/skill_cast_db_re.txt new file mode 100644 index 000000000..89bc91404 --- /dev/null +++ b/db/skill_cast_db_re.txt @@ -0,0 +1,21 @@ +//===================================================================================================== +//-- skil_cast_db_re.txt: entries in this file override skill_cast_db.txt -- file only used in Ragnarok Renewal Mode +//===================================================================================================== +// Skill Times Database +// +// Structure of Database: +// SkillID,CastingTime,AfterCastActDelay,AfterCastWalkDelay,Duration1,Duration2,Cool Down +//== Explained: +// CastingTime : time to cast this skill, in miliseconds +// AfterCastActDelay : "normal" delay, character cannot use skills, in miliseconds +// AfterCastWalkDleay : amount of time before character can move again, in miliseconds +// Duration1 / Duration2 : usually the durations used by the skill, at special cases it is used to hold special data +// Cool Down : amount of time until character can re-use this skill, in miliseconds +//== Extra +// On all fields you can use ':' as a delimiter to level-specific values, +// - Example using SM_PROVOKE +// - Original:6,0,0,0,30000,0,1000 +// - ModifiedTo:6,0,0,0,30000,0,1000:2500:3000:etc +// - Makes lvl 1 have 1000 (1s) cool down, lvl 2 2500 (2.5s), lvl 3 3000, and so on. +//========================================== + diff --git a/db/skill_db_re.txt b/db/skill_db_re.txt new file mode 100644 index 000000000..763baa68d --- /dev/null +++ b/db/skill_db_re.txt @@ -0,0 +1,49 @@ +//===================================================================================================== +//-- skil_db_re.txt: entries in this file override skill_db.txt -- file only used in Ragnarok Renewal Mode +//===================================================================================================== +//id,range,hit,inf,element,nk,splash,max,list_num,castcancel,cast_defence_rate,inf2,maxcount,skill_type,blow_count,name,description +// 01 ID +// 02 range (combo skills do not check for range when used, +// if range is < 5, the skill is considered melee-range) +// 03 hit (8- repeated hitting, 6- single-hit) +// 04 inf (0- passive, 1- enemy, 2- place, 4- self, 16- friend, 32- trap) +// 05 element (0 - neutral, 1 - water, 2 - earth, 3 - fire, 4 - wind, 5 - poison, +// 6 - holy, 7 - dark, 8 - ghost, 9 - undead, -1 - use weapon element +// -2 - use endowed element, -3 - use random element.) +// 06 nk (skill damage properties): +// 0x01 - No damage skill +// 0x02 - Has splash area +// 0x04 - Damage should be split among targets +// 0x08 - Skill ignores caster's % damage cards (misc type always ignores) +// 0x10 - Skill ignores elemental adjustments +// 0x20 - Skill ignores target's defense (misc type always ignores) +// 0x40 - Skill ignores target's flee (magic type always ignores) +// 0x80 - Skill ignores target's def cards +// 07 splash/effect range (-1 for screen-wide) +// 08 MaxLv +// 09 Number of hits (when positive, damage is increased by hits, +// negative values just show number of hits without increasing total damage) +// 10 Cast interrupted when hit? +// 11 defense-reduction rate during cast. +// 12 inf2 (skill information 2): +// 0x0001- quest skill +// 0x0002- npc skill +// 0x0004- wedding skill +// 0x0008- spirit skill +// 0x0010- guild skill +// 0x0020- song/dance +// 0x0040- ensemble skill +// 0x0080- trap +// 0x0100- skill that damages/targets yourself +// 0x0200- cannot be casted on self (if inf = 4, auto-select target skill) +// 0x0400- usable only on party-members (and enemies if skill is offensive) +// 0x0800- usable only on guild-mates (and enemies if skill is offensive) +// 0x1000- disable usage on enemies (for non-offensive skills). +// 0x2000- skill ignores land protector (e.g. arrow shower) +// 13 maxcount: max amount of skill instances to place on the ground when +// player_land_skill_limit/monster_land_skill_limit is enabled. For skills +// that attack using a path, this is the path length to be used. +// 14 attack type (none, weapon, magic, misc) +// 15 Blowcount (amount of tiles skill knockbacks) +// 16 Name +// 17 Description diff --git a/db/skill_require_db_re.txt b/db/skill_require_db_re.txt new file mode 100644 index 000000000..42424dc1d --- /dev/null +++ b/db/skill_require_db_re.txt @@ -0,0 +1,24 @@ +//===================================================================================================== +//-- skil_require_db_re.txt: entries in this file override skill_require_db.txt -- file only used in Ragnarok Renewal Mode +//===================================================================================================== +// Skill Requirements Database +// +// Structure of Database: +// SkillID,HPCost,MaxHPTrigger,SPCost,HPRateCost,SPRateCost,ZenyCost,RequiredWeapons,RequiredAmmoTypes,RequiredAmmoAmount,RequiredState,SpiritSphereCost,RequiredItemID1,RequiredItemAmount1,RequiredItemID2,RequiredItemAmount2,RequiredItemID3,RequiredItemAmount3,RequiredItemID4,RequiredItemAmount4,RequiredItemID5,RequiredItemAmount5,RequiredItemID6,RequiredItemAmount6,RequiredItemID7,RequiredItemAmount7,RequiredItemID8,RequiredItemAmount8,RequiredItemID9,RequiredItemAmount9,RequiredItemID10,RequiredItemAmount10 +// +// If HP/SPratecost is positive, it is a percent of your current life, otherwise it is a percent of your max life. +// +// Legend for 'RequiredState' field: +// none = Nothing special +// move_enable = Requires to be able to move +// recover_weight_rate = Requires to be less than 50% weight +// water = Requires to be standing on a water cell +// cart = Requires a Pushcart +// riding = Requires to ride a Peco +// falcon = Requires a Falcon +// sight = Requires Sight skill activated +// hiding = Requires Hiding skill activated +// cloaking = Requires Cloaking skill activated +// explosionspirits = Requires Fury skill activated +// cartboost = Requires a Pushcart and Cart Boost skill activated +// shield = Requires a 0,shield equipped diff --git a/db/skill_unit_db_re.txt b/db/skill_unit_db_re.txt new file mode 100644 index 000000000..5d9b924a5 --- /dev/null +++ b/db/skill_unit_db_re.txt @@ -0,0 +1,28 @@ +//===================================================================================================== +//-- skil_unit_db_re.txt: entries in this file override skill_unit_db.txt -- file only used in Ragnarok Renewal Mode +//===================================================================================================== +// ID,unit ID,unit ID 2,layout,range,interval,target,flag +// +// layout = -1:special, 0:1*1, 1:3*3, 2:5*5, up to 5:11*11 +// target = friend (party +guildmates +neutral players) / party / +// ally (party +guildmates) / all / enemy +// flag 0x001(UF_DEFNOTENEMY) If 'defunit_not_enemy' is set, the target is changed to 'friend' +// 0x002(UF_NOREITERRATION) Spell cannot be stacked +// 0x004(UF_NOFOOTSET) Spell cannot be cast near/on targets +// 0x008(UF_NOOVERLAP) Spell effects do not overlap +// 0x010(UF_PATHCHECK) Only cells with a shootable path will be placed +// 0x020(UF_NOPC) Spell cannot affect players. +// 0x040(UF_NOMOB) Spell cannot affect mobs. +// 0x080(UF_SKILL) Spell CAN affect skills. +// 0x100(UF_DANCE) Dance skill +// 0x200(UF_ENSEMBLE) Ensemble skill +// 0x400(UF_SONG) Song skill +// 0x800(UF_DUALMODE) Spell has effects both at an interval and when you step in/out +// Example: 0x006 = 0x002+0x004 -> Cannot be stacked nor cast near targets +// +// Notes: +// ------ +// 0x89,0x8a,0x8b without indication +// +// u1 u2 lay r intr target flag +// \ No newline at end of file diff --git a/src/map/skill.c b/src/map/skill.c index 43abfbcd9..f834f430e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14296,6 +14296,12 @@ static void skill_readdb(void) sv_readdb(db_path, "skill_castnodex_db.txt", ',', 2, 3, MAX_SKILL_DB, skill_parse_row_castnodexdb); sv_readdb(db_path, "skill_nocast_db.txt" , ',', 2, 2, MAX_SKILL_DB, skill_parse_row_nocastdb); sv_readdb(db_path, "skill_unit_db.txt" , ',', 8, 8, MAX_SKILL_DB, skill_parse_row_unitdb); +#if REMODE + sv_readdb(db_path, "skill_db_re.txt" , ',', 17, 17, MAX_SKILL_DB, skill_parse_row_skilldb); + sv_readdb(db_path, "skill_require_db_re.txt" , ',', 32, 32, MAX_SKILL_DB, skill_parse_row_requiredb); + sv_readdb(db_path, "skill_cast_db_re.txt" , ',', 7, 7, MAX_SKILL_DB, skill_parse_row_castdb); + sv_readdb(db_path, "skill_unit_db_re.txt" , ',', 8, 8, MAX_SKILL_DB, skill_parse_row_unitdb); +#endif skill_init_unit_layout(); sv_readdb(db_path, "produce_db.txt" , ',', 4, 4+2*MAX_PRODUCE_RESOURCE, MAX_SKILL_PRODUCE_DB, skill_parse_row_producedb); sv_readdb(db_path, "create_arrow_db.txt" , ',', 1+2, 1+2*MAX_ARROW_RESOURCE, MAX_SKILL_ARROW_DB, skill_parse_row_createarrowdb); -- cgit v1.2.3-70-g09d2