summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 02:09:55 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-06-12 02:09:55 +0000
commit8f5a2dddd09352b8618fbec8c4f4d9934601bec2 (patch)
treef24984dda14c0d6edd4bf1160caedc080dbf005d /src/map/skill.c
parent9cf756c11d39101b139ed585e4d5891768a20a45 (diff)
downloadhercules-8f5a2dddd09352b8618fbec8c4f4d9934601bec2.tar.gz
hercules-8f5a2dddd09352b8618fbec8c4f4d9934601bec2.tar.bz2
hercules-8f5a2dddd09352b8618fbec8c4f4d9934601bec2.tar.xz
hercules-8f5a2dddd09352b8618fbec8c4f4d9934601bec2.zip
Added new bonus as per kenpachi's request: bonus2 bUseSPrateSkill,n,x; // Reduced increases/reduced the SP consumption of skilln by x%. (supports skill names)
e.g. bonus2 bUseSPrateSkill,"AL_BLESSING",50; -> increases AL_BLESSING sp usage by 50% (e.g. if its 50 it goes to 75) git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16273 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 43bda4b60..a273a245b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -12747,9 +12747,11 @@ struct skill_condition skill_get_requirement(struct map_session_data* sd, short
req.sp += (status->sp * sp_rate)/100;
else
req.sp += (status->max_sp * (-sp_rate))/100;
- if( sd->dsprate!=100 )
+ if( sd->dsprate != 100 )
req.sp = req.sp * sd->dsprate / 100;
+ req.sp = cap_value(req.sp * pc_sp_rate_skill(sd,skill) / 100, 0, SHRT_MAX);
+
if( sc ) {
if( sc->data[SC__LAZINESS] )
req.sp += req.sp + sc->data[SC__LAZINESS]->val1 * 10;