summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorJedzkie <jedzkie13@rocketmail.com>2015-11-17 22:09:25 +0800
committerJedzkie <jedzkie13@rocketmail.com>2015-11-17 22:09:25 +0800
commit912578159c8ccca9545e3c7dce9f7ce2b92bee2e (patch)
treee8dd81ba4fb87cca62a47ee2bc33bd5580bc1f9f /src/map/skill.c
parent2a7a66e8ab2ca9d202d782aedcbe1bf80b1847cd (diff)
downloadhercules-912578159c8ccca9545e3c7dce9f7ce2b92bee2e.tar.gz
hercules-912578159c8ccca9545e3c7dce9f7ce2b92bee2e.tar.bz2
hercules-912578159c8ccca9545e3c7dce9f7ce2b92bee2e.tar.xz
hercules-912578159c8ccca9545e3c7dce9f7ce2b92bee2e.zip
Item DB Updates:
- Update Geffen Scrolls to its official behavior and effect. - Added Official item effect of Mental Potion. - Fixed Chinese Pestel item effect. - Fixed Vitata500 not giving 5% sp. - Added 'Costume: Time Accessory'.
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c38
1 files changed, 21 insertions, 17 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index cdf1c031f..827f8db8a 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14316,15 +14316,17 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, uint16
req.sp = cap_value(req.sp * sp_skill_rate_bonus / 100, 0, SHRT_MAX);
- if( sc ) {
- if( sc->data[SC__LAZINESS] )
+ if (sc) {
+ if (sc->data[SC__LAZINESS])
req.sp += req.sp + sc->data[SC__LAZINESS]->val1 * 10;
- if( sc->data[SC_UNLIMITED_HUMMING_VOICE] )
+ if (sc->data[SC_UNLIMITED_HUMMING_VOICE])
req.sp += req.sp * sc->data[SC_UNLIMITED_HUMMING_VOICE]->val3 / 100;
- if( sc->data[SC_RECOGNIZEDSPELL] )
+ if (sc->data[SC_RECOGNIZEDSPELL])
req.sp += req.sp / 4;
- if( sc->data[SC_TELEKINESIS_INTENSE] && skill->get_ele(skill_id, skill_lv) == ELE_GHOST)
+ if (sc->data[SC_TELEKINESIS_INTENSE] && skill->get_ele(skill_id, skill_lv) == ELE_GHOST)
req.sp -= req.sp * sc->data[SC_TELEKINESIS_INTENSE]->val2 / 100;
+ if (sc->data[SC_TARGET_ASPD])
+ req.sp -= req.sp * sc->data[SC_TARGET_ASPD]->val1 / 100;
}
req.zeny = skill->dbs->db[idx].zeny[skill_lv-1];
@@ -14740,29 +14742,31 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
}
}
// Fixed cast reduction bonuses
- if( sc->data[SC__LAZINESS] )
+ if (sc->data[SC__LAZINESS])
fixcast_r = max(fixcast_r, sc->data[SC__LAZINESS]->val2);
- if( sc->data[SC_DANCE_WITH_WUG])
+ if (sc->data[SC_DANCE_WITH_WUG])
fixcast_r = max(fixcast_r, sc->data[SC_DANCE_WITH_WUG]->val4);
- if( sc->data[SC_SECRAMENT] )
+ if (sc->data[SC_SECRAMENT])
fixcast_r = max(fixcast_r, sc->data[SC_SECRAMENT]->val2);
if (sd && skill_id >= WL_WHITEIMPRISON && skill_id < WL_FREEZE_SP) {
int radius_lv = pc->checkskill(sd, WL_RADIUS);
if (radius_lv)
fixcast_r = max(fixcast_r, (status_get_int(bl) + status->get_lv(bl)) / 15 + radius_lv * 5); // [{(Caster?s INT / 15) + (Caster?s Base Level / 15) + (Radius Skill Level x 5)}] %
}
+ if (sc->data[SC_MYSTICSCROLL])
+ VARCAST_REDUCTION(sc->data[SC_MYSTICSCROLL]->val1);
// Fixed cast non percentage bonuses
- if( sc->data[SC_MANDRAGORA] )
+ if (sc->data[SC_MANDRAGORA])
fixed += sc->data[SC_MANDRAGORA]->val1 * 500;
- if( sc->data[SC_IZAYOI] )
+ if (sc->data[SC_IZAYOI])
fixed = 0;
- if( sc->data[SC_GUST_OPTION] || sc->data[SC_BLAST_OPTION] || sc->data[SC_WILD_STORM_OPTION] )
+ if (sc->data[SC_GUST_OPTION] || sc->data[SC_BLAST_OPTION] || sc->data[SC_WILD_STORM_OPTION])
fixed -= 1000;
}
- if( sd && !(skill->get_castnodex(skill_id, skill_lv)&4) ){
+ if (sd && !(skill->get_castnodex(skill_id, skill_lv)&4)) {
VARCAST_REDUCTION( max(sd->bonus.varcastrate, 0) + max(i, 0) );
- fixcast_r = max(fixcast_r, sd->bonus.fixcastrate) + min(sd->bonus.fixcastrate,0);
+ fixcast_r = max(fixcast_r, sd->bonus.fixcastrate) + min(sd->bonus.fixcastrate, 0);
for( i = 0; i < ARRAYLENGTH(sd->skillcast) && sd->skillcast[i].id; i++ )
if( sd->skillcast[i].id == skill_id ){ // bonus2 bVariableCastrate
if( (i=sd->skillcast[i].val) > 0)
@@ -14771,12 +14775,12 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16
}
}
- if( varcast_r < 0 ) // now compute overall factors
+ if (varcast_r < 0 ) // now compute overall factors
time = time * (1 - (float)varcast_r / 100);
- if( !(skill->get_castnodex(skill_id, skill_lv)&1) )// reduction from status point
- time = (1 - sqrt( ((float)(status_get_dex(bl)*2 + status_get_int(bl)) / battle_config.vcast_stat_scale) )) * time;
+ if (!(skill->get_castnodex(skill_id, skill_lv)&1)) // reduction from status point
+ time = (1 - sqrt( ((float)(status_get_dex(bl) * 2 + status_get_int(bl)) / battle_config.vcast_stat_scale) )) * time;
// underflow checking/capping
- time = max(time, 0) + (1 - (float)min(fixcast_r, 100) / 100) * max(fixed,0);
+ time = max(time, 0) + (1 - (float)min(fixcast_r, 100) / 100) * max(fixed, 0);
#endif
return (int)time;
}