summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-02-10 13:59:24 -0200
committershennetsind <ind@henn.et>2014-02-10 13:59:24 -0200
commitcd8d09337ba3108f46acbb5cfcd6a99ddb4b321e (patch)
tree70e501ba613ef8d4586c5f6c4be7424f3e953198
parent9ca281d0a03ea083c4dba20de9d109d581a5ee4f (diff)
parentac45ebca3e9537eca665ba042412ddc1e65e9f73 (diff)
downloadhercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.tar.gz
hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.tar.bz2
hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.tar.xz
hercules-cd8d09337ba3108f46acbb5cfcd6a99ddb4b321e.zip
Merge branch 'master' of https://github.com/HerculesWS/Hercules
-rw-r--r--db/const.txt19
-rw-r--r--db/pre-re/skill_db.txt3
-rw-r--r--db/re/skill_db.txt3
-rw-r--r--src/config/renewal.h1
-rw-r--r--src/map/battle.c95
-rw-r--r--src/map/itemdb.c12
-rw-r--r--src/map/mob.c6
-rw-r--r--src/map/pc.c3
-rw-r--r--src/map/script.c18
-rw-r--r--src/map/script.h5
-rw-r--r--src/map/skill.c8
-rw-r--r--src/map/status.c12
12 files changed, 138 insertions, 47 deletions
diff --git a/db/const.txt b/db/const.txt
index 9a590ac50..577fbc2fc 100644
--- a/db/const.txt
+++ b/db/const.txt
@@ -1373,25 +1373,6 @@ MOB_ELEMENT 20
MOB_MODE 21
MOB_MVPEXP 22
-AI_ACTION_TYPE 0
-AI_ACTION_TAR_TYPE 1
-AI_ACTION_TAR 2
-AI_ACTION_SRC 3
-AI_ACTION_TAR_TYPE_PC 1
-AI_ACTION_TAR_TYPE_MOB 2
-AI_ACTION_TAR_TYPE_PET 4
-AI_ACTION_TAR_TYPE_HOMUN 8
-AI_ACTION_TAR_TYPE_ITEM 16
-AI_ACTION_TYPE_NPCCLICK 256
-AI_ACTION_TYPE_ATTACK 128
-AI_ACTION_TYPE_DETECT 64
-AI_ACTION_TYPE_DEAD 32
-AI_ACTION_TYPE_ASSIST 16
-AI_ACTION_TYPE_KILL 8
-AI_ACTION_TYPE_UNLOCK 4
-AI_ACTION_TYPE_WALKACK 2
-AI_ACTION_TYPE_WARPACK 1
-
ALL_CLIENT 0
ALL_SAMEMAP 1
AREA 2
diff --git a/db/pre-re/skill_db.txt b/db/pre-re/skill_db.txt
index d401b1b08..d5e5fc513 100644
--- a/db/pre-re/skill_db.txt
+++ b/db/pre-re/skill_db.txt
@@ -874,7 +874,7 @@
2314,1,6,1,-1,0,0,1,1,no,0,0,0,weapon,0, LG_RAGEBURST,Rage Burst
2315,0,6,4,0,0x2,3,3,1,yes,0,0,0,none,2, LG_SHIELDSPELL,Shield Spell
2316,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, LG_EXEEDBREAK,Exceed Break
-2317,1,6,2,-1,0x2,5,5,1,yes,0,0,0,none,3:4:5:6:7, LG_OVERBRAND,Over Brand //CHECK I know the splash is needed somehow for the strange AoE it gives.
+2317,2,6,2,-1,0x2,0,5,1,yes,0,0,0,weapon,0, LG_OVERBRAND,Over Brand
2318,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, LG_PRESTIGE,Prestige
2319,0,6,4,0,0x1,3,5,1,no,0,0,0,weapon,0, LG_BANDING,Banding //CHECK Splash isnt needed right? Banding has its own UNIT ID.
2320,0,6,4,-1,0x2,3,5,1,yes,0,0,0,weapon,0, LG_MOONSLASHER,Moon Slasher
@@ -883,6 +883,7 @@
2323,0,8,4,2,0x2,1:1:2:2:3,5,-5,yes,0,0,0,weapon,0, LG_EARTHDRIVE,Earth Drive
2324,3,8,1,-1,0,0,5,3,yes,0,0,0,weapon,0, LG_HESPERUSLIT,Hesperus Lit
2325,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, LG_INSPIRATION,Inspiration
+2519,1,6,1,-1,0x2,0,5,1,yes,0,0,0,weapon,3:4:5:6:7, LG_OVERBRAND_BRANDISH,Over Brand
//****
// SR Sura
diff --git a/db/re/skill_db.txt b/db/re/skill_db.txt
index d7d0fe63c..6a3f83e5e 100644
--- a/db/re/skill_db.txt
+++ b/db/re/skill_db.txt
@@ -886,7 +886,7 @@
2314,1,6,1,-1,0,0,1,1,no,0,0,0,weapon,0, LG_RAGEBURST,Rage Burst
2315,0,6,4,0,0x2,3,3,1,yes,0,0,0,none,2, LG_SHIELDSPELL,Shield Spell
2316,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, LG_EXEEDBREAK,Exceed Break
-2317,1,6,2,-1,0x2,5,5,1,yes,0,0,0,none,3:4:5:6:7, LG_OVERBRAND,Over Brand //CHECK I know the splash is needed somehow for the strange AoE it gives.
+2317,2,6,2,-1,0x2,0,5,1,yes,0,0,0,weapon,0, LG_OVERBRAND,Over Brand
2318,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, LG_PRESTIGE,Prestige
2319,0,6,4,0,0x1,3,5,1,no,0,0,0,weapon,0, LG_BANDING,Banding //CHECK Splash isnt needed right? Banding has its own UNIT ID.
2320,0,6,4,-1,0x2,3,5,1,yes,0,0,0,weapon,0, LG_MOONSLASHER,Moon Slasher
@@ -895,6 +895,7 @@
2323,0,8,4,2,0x2,1:1:2:2:3,5,-5,yes,0,0,0,weapon,0, LG_EARTHDRIVE,Earth Drive
2324,3,8,1,-1,0,0,5,3,yes,0,0,0,weapon,0, LG_HESPERUSLIT,Hesperus Lit
2325,0,6,4,0,0x1,0,5,1,yes,0,0,0,none,0, LG_INSPIRATION,Inspiration
+2519,1,6,1,-1,0x2,0,5,1,yes,0,0,0,weapon,3:4:5:6:7, LG_OVERBRAND_BRANDISH,Over Brand
//****
// SR Sura
diff --git a/src/config/renewal.h b/src/config/renewal.h
index 3b11aff74..36615d63b 100644
--- a/src/config/renewal.h
+++ b/src/config/renewal.h
@@ -60,6 +60,7 @@
/// - damage is NOT increased by 400%
/// - it does NOT affect grimtooth
/// - weapon and status ATK are increased
+/// - some skill's damage ratio has modified
#define RENEWAL_EDP
/// renewal ASPD [malufett]
diff --git a/src/map/battle.c b/src/map/battle.c
index 8ad54f413..687db1b95 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -2498,12 +2498,14 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block
}
//Skill damage modifiers that stack linearly
if(sc && skill_id != PA_SACRIFICE){
+#ifdef RENEWAL_EDP
if( sc->data[SC_EDP] ){
if( skill_id == AS_SONICBLOW ||
skill_id == GC_COUNTERSLASH ||
skill_id == GC_CROSSIMPACT )
skillratio >>= 1;
}
+#endif
if(sc->data[SC_OVERTHRUST])
skillratio += sc->data[SC_OVERTHRUST]->val3;
if(sc->data[SC_OVERTHRUSTMAX])
@@ -3409,11 +3411,36 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list
ad.damage = battle->calc_cardfix(BF_MAGIC, src, target, nk, s_ele, 0, ad.damage, 0, ad.flag);
#endif
if(sd) {
+ uint16 skill;
//Damage bonuses
if ((i = pc->skillatk_bonus(sd, skill_id)))
ad.damage += ad.damage*i/100;
-
- if( (i = battle->adjust_skill_damage(src->m,skill_id)) )
+ switch(skill_id){
+ case WL_CHAINLIGHTNING_ATK:
+ skill = WL_CHAINLIGHTNING;
+ break;
+ case AB_DUPLELIGHT_MAGIC:
+ skill = AB_DUPLELIGHT;
+ break;
+ case WL_TETRAVORTEX_FIRE:
+ case WL_TETRAVORTEX_WATER:
+ case WL_TETRAVORTEX_WIND:
+ case WL_TETRAVORTEX_GROUND:
+ skill = WL_TETRAVORTEX;
+ break;
+ case WL_SUMMON_ATK_FIRE:
+ case WL_SUMMON_ATK_WIND:
+ case WL_SUMMON_ATK_WATER:
+ case WL_SUMMON_ATK_GROUND:
+ skill = WL_RELEASE;
+ break;
+ case WM_REVERBERATION_MAGIC:
+ skill = WM_REVERBERATION;
+ break;
+ default:
+ skill = skill_id;
+ }
+ if( (i = battle->adjust_skill_damage(src->m,skill)) )
MATK_RATE(i);
//Ignore Defense?
@@ -3849,10 +3876,18 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list *
}
#endif
md.damage = battle->calc_cardfix(BF_MISC, src, target, nk, s_ele, 0, md.damage, 0, md.flag);
-
- if (sd && (i = pc->skillatk_bonus(sd, skill_id)))
- md.damage += md.damage*i/100;
-
+ if(skill_id){
+ uint16 skill;
+ switch(skill_id){
+ case GN_HELLS_PLANT_ATK:
+ skill = GN_HELLS_PLANT;
+ break;
+ default:
+ skill = skill_id;
+ }
+ if (sd && (i = pc->skillatk_bonus(sd, skill)))
+ md.damage += md.damage*i/100;
+ }
if( (i = battle->adjust_skill_damage(src->m,skill_id)) )
md.damage = md.damage * i / 100;
@@ -4543,6 +4578,10 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADD( 30 * tsc->data[SC_DARKCROW]->val1 );
}
+ if ( sc && !skill_id && sc->data[SC_EXEEDBREAK] ) {
+ ATK_ADDRATE(sc->data[SC_EXEEDBREAK]->val1);
+ status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER);
+ }
#ifdef RENEWAL
if( sd && skill_id == NJ_KUNAI ){
flag.tdef = 1;
@@ -4694,9 +4733,43 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list
ATK_ADDRATE(50);
break;
}
-
- if( (i = battle->adjust_skill_damage(src->m,skill_id)) )
- ATK_RATE(i);
+ if( skill_id ){
+ uint16 skill;
+ switch(skill_id){
+ case AB_DUPLELIGHT_MELEE:
+ skill = AB_DUPLELIGHT;
+ break;
+ case LG_OVERBRAND_BRANDISH:
+ case LG_OVERBRAND_PLUSATK:
+ skill = LG_OVERBRAND;
+ break;
+ case WM_SEVERE_RAINSTORM_MELEE:
+ skill = WM_SEVERE_RAINSTORM;
+ break;
+ case WM_REVERBERATION_MELEE:
+ skill = WM_REVERBERATION;
+ break;
+ case GN_CRAZYWEED_ATK:
+ skill = GN_CRAZYWEED;
+ break;
+ case GN_SLINGITEM_RANGEMELEEATK:
+ skill = GN_SLINGITEM;
+ break;
+ case RL_R_TRIP_PLUSATK:
+ skill = RL_R_TRIP;
+ break;
+ case RL_B_FLICKER_ATK:
+ skill = RL_FLICKER;
+ break;
+ case RL_GLITTERING_GREED_ATK:
+ skill = RL_GLITTERING_GREED;
+ break;
+ default:
+ skill = skill_id;
+ }
+ if( (i = battle->adjust_skill_damage(src->m,skill)) )
+ ATK_RATE(i);
+ }
if( sd ) {
if (skill_id && (i = pc->skillatk_bonus(sd, skill_id)))
@@ -5532,10 +5605,6 @@ enum damage_lv battle_weapon_attack(struct block_list* src, struct block_list* t
wd = battle->calc_attack(BF_WEAPON, src, target, 0, 0, flag);
if( sc && sc->count ) {
- if (sc->data[SC_EXEEDBREAK]) {
- ATK_RATER(sc->data[SC_EXEEDBREAK]->val1);
- status_change_end(src, SC_EXEEDBREAK, INVALID_TIMER);
- }
if( sc->data[SC_SPELLFIST] ) {
if( --(sc->data[SC_SPELLFIST]->val1) >= 0 ){
struct Damage ad = battle->calc_attack(BF_MAGIC,src,target,sc->data[SC_SPELLFIST]->val3,sc->data[SC_SPELLFIST]->val4,flag|BF_SHORT);
diff --git a/src/map/itemdb.c b/src/map/itemdb.c
index 527972516..bfcc6f795 100644
--- a/src/map/itemdb.c
+++ b/src/map/itemdb.c
@@ -1164,6 +1164,9 @@ void itemdb_read_chains(void) {
CREATE(itemdb->chains, struct item_chain, libconfig->setting_length(item_chain_conf.root));
itemdb->chain_count = (unsigned short)libconfig->setting_length(item_chain_conf.root);
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = config_filename;
+#endif // ENABLE_CASE_CHECK
while( (itc = libconfig->setting_get_elem(item_chain_conf.root,i++)) ) {
struct item_data *data = NULL;
struct item_chain_entry *prev = NULL;
@@ -1197,6 +1200,9 @@ void itemdb_read_chains(void) {
count++;
}
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = NULL;
+#endif // ENABLE_CASE_CHECK
libconfig->destroy(&item_chain_conf);
@@ -2230,8 +2236,14 @@ void itemdb_name_constants(void) {
DBIterator *iter = db_iterator(itemdb->names);
struct item_data *data;
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = "Item Database (Likely an invalid or conflicting AegisName)";
+#endif // ENABLE_CASE_CHECK
for( data = dbi_first(iter); dbi_exists(iter); data = dbi_next(iter) )
script->set_constant2(data->name,data->nameid,0);
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = NULL;
+#endif // ENABLE_CASE_CHECK
dbi_destroy(iter);
}
diff --git a/src/map/mob.c b/src/map/mob.c
index dab7b99ac..dc83be93e 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -3962,10 +3962,16 @@ int mob_read_sqldb(void) {
void mob_name_constants(void) {
int i;
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = "Mob Database (Likely an invalid or conflicting SpriteName)";
+#endif // ENABLE_CASE_CHECK
for (i = 0; i < MAX_MOB_DB; i++) {
if (mob->db_data[i] && !mob->is_clone(i))
script->set_constant2(mob->db_data[i]->sprite, i, 0);
}
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = NULL;
+#endif // ENABLE_CASE_CHECK
}
/*==========================================
diff --git a/src/map/pc.c b/src/map/pc.c
index 14e7d4661..e29ef343f 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -5206,7 +5206,8 @@ int pc_checkallowskill(struct map_session_data *sd)
SC_LKCONCENTRATION,
SC_EDP,
#endif
- SC_FEARBREEZE
+ SC_FEARBREEZE,
+ SC_EXEEDBREAK,
};
const enum sc_type scs_list[] = {
SC_AUTOGUARD,
diff --git a/src/map/script.c b/src/map/script.c
index aa3713427..4fb4e7224 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -2275,7 +2275,10 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
for(i=0; i<size; i++)
linkdb_final(&script->syntax.curly[i].case_label);
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck.clear();
+ script->local_casecheck.clear();
+ script->parser_current_src = NULL;
+ script->parser_current_file = NULL;
+ script->parser_current_line = 0;
#endif // ENABLE_CASE_CHECK
return NULL;
}
@@ -2292,7 +2295,10 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
script->size = 0;
script->buf = NULL;
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck.clear();
+ script->local_casecheck.clear();
+ script->parser_current_src = NULL;
+ script->parser_current_file = NULL;
+ script->parser_current_line = 0;
#endif // ENABLE_CASE_CHECK
return NULL;
}
@@ -2310,7 +2316,10 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
script->size = 0;
script->buf = NULL;
#ifdef ENABLE_CASE_CHECK
- script->local_casecheck.clear();
+ script->local_casecheck.clear();
+ script->parser_current_src = NULL;
+ script->parser_current_file = NULL;
+ script->parser_current_line = 0;
#endif // ENABLE_CASE_CHECK
return NULL;
}
@@ -2428,6 +2437,9 @@ struct script_code* parse_script(const char *src,const char *file,int line,int o
code->script_vars = NULL;
#ifdef ENABLE_CASE_CHECK
script->local_casecheck.clear();
+ script->parser_current_src = NULL;
+ script->parser_current_file = NULL;
+ script->parser_current_line = 0;
#endif // ENABLE_CASE_CHECK
return code;
}
diff --git a/src/map/script.h b/src/map/script.h
index 4906d4fa8..872c5bc31 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -23,8 +23,9 @@ struct eri;
**/
// TODO: Remove temporary code
#define ENABLE_CASE_CHECK
-#define DeprecationWarning(func, bad, good, file, line) ShowError("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'.\n", (func), (bad), (good), (file), (line));
-#define DeprecationWarning2(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), (where));
+#define get_script_source(source) ((source) ? (source) : "Unknown (Possibly source or variables stored in database")
+#define DeprecationWarning(func, bad, good, file, line) ShowError("%s: use of deprecated keyword '%s' (use '%s' instead) in file '%s', line '%d'.\n", (func), (bad), (good), get_script_source(file), (line));
+#define DeprecationWarning2(func, bad, good, where) ShowError("%s: detected possible use of wrong case in a script. Found '%s', probably meant to be '%s' (in '%s').\n", (func), (bad), (good), get_script_source(where));
#define disp_deprecation_message(func, good, p) disp_warning_message(func": use of deprecated keyword (use '"good"' instead).", (p));
#define NUM_WHISPER_VAR 10
diff --git a/src/map/skill.c b/src/map/skill.c
index 2e520454f..a66ead4ae 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -15067,7 +15067,7 @@ int skill_maelstrom_suction(struct block_list *bl, va_list ap) {
*------------------------------------------*/
int skill_enchant_elemental_end (struct block_list *bl, int type) {
struct status_change *sc;
- const enum sc_type scs[] = { SC_ENCHANTPOISON, SC_ASPERSIO, SC_PROPERTYFIRE, SC_PROPERTYWATER, SC_PROPERTYWIND, SC_PROPERTYGROUND, SC_PROPERTYDARK, SC_PROPERTYTELEKINESIS, SC_ENCHANTARMS, SC_EXEEDBREAK };
+ const enum sc_type scs[] = { SC_ENCHANTPOISON, SC_ASPERSIO, SC_PROPERTYFIRE, SC_PROPERTYWATER, SC_PROPERTYWIND, SC_PROPERTYGROUND, SC_PROPERTYDARK, SC_PROPERTYTELEKINESIS, SC_ENCHANTARMS };
int i;
nullpo_ret(bl);
nullpo_ret(sc = status->get_sc(bl));
@@ -18130,7 +18130,13 @@ void skill_readdb(bool minimal) {
safestrncpy(skill->db[0].name, "UNKNOWN_SKILL", sizeof(skill->db[0].name));
safestrncpy(skill->db[0].desc, "Unknown Skill", sizeof(skill->db[0].desc));
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = DBPATH"skill_db.txt";
+#endif // ENABLE_CASE_CHECK
sv->readdb(map->db_path, DBPATH"skill_db.txt", ',', 17, 17, MAX_SKILL_DB, skill->parse_row_skilldb);
+#ifdef ENABLE_CASE_CHECK
+ script->parser_current_file = NULL;
+#endif // ENABLE_CASE_CHECK
if (minimal)
return;
diff --git a/src/map/status.c b/src/map/status.c
index e204e9d92..df79cee74 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -8435,12 +8435,12 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val
tick = -1; //endless duration in the client
break;
case SC_EXEEDBREAK:
- val1 *= 150; // 150 * skill_lv
- if( sd && sd->inventory_data[sd->equip_index[EQI_HAND_R]] ) { // Chars.
- val1 += (sd->inventory_data[sd->equip_index[EQI_HAND_R]]->weight/10 * sd->inventory_data[sd->equip_index[EQI_HAND_R]]->wlv * status->get_lv(bl) / 100);
- val1 += 15 * (sd ? sd->status.job_level:50) + 100;
- } else // Mobs
- val1 += (400 * status->get_lv(bl) / 100) + (15 * (status->get_lv(bl) / 2)); // About 1138% at mob_lvl 99. Is an aproximation to a standard weapon. [pakpil]
+ if( sd ){
+ short index = sd->equip_index[EQI_HAND_R];
+ val1 = 15 * (sd->status.job_level + val1 * 10);
+ if( index >= 0 && sd->inventory_data[index] && sd->inventory_data[index]->type == IT_WEAPON )
+ val1 += (sd->inventory_data[index]->weight / 10 * sd->inventory_data[index]->wlv) * status->get_lv(bl) / 100;
+ }
break;
case SC_PRESTIGE: // Based on suggested formula in iRO Wiki and some test, still need more test. [pakpil]
val2 = ((st->int_ + st->luk) / 6) + 5; // Chance to evade magic damage.