summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-19 00:15:02 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-07-19 00:15:02 +0000
commit0f4b1a36a2552e62227ee1350e8034a8f122c028 (patch)
treefff93ef0e7cf78051335cdd6996486e965ac9a4c /src/map/skill.c
parentbfbd8f32351ead7ecf3bbd2915c84d897f7edc37 (diff)
downloadhercules-0f4b1a36a2552e62227ee1350e8034a8f122c028.tar.gz
hercules-0f4b1a36a2552e62227ee1350e8034a8f122c028.tar.bz2
hercules-0f4b1a36a2552e62227ee1350e8034a8f122c028.tar.xz
hercules-0f4b1a36a2552e62227ee1350e8034a8f122c028.zip
Added delay_dependon_agi since people actually use and need it...
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10887 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 9ce83d48e..1f609117d 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -8694,7 +8694,7 @@ int skill_castfix_sc (struct block_list *bl, int time)
}
/*==========================================
- * Does delay reductions based on dex, sc data, item bonuses, ...
+ * Does delay reductions based on dex/agi, sc data, item bonuses, ...
*------------------------------------------*/
int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
{
@@ -8733,6 +8733,14 @@ int skill_delayfix (struct block_list *bl, int skill_id, int skill_lv)
else //To be capped later to minimum.
time = 0;
}
+ if (battle_config.delay_dependon_agi && !(delaynodex&1))
+ { // if skill delay is allowed to be reduced by agi
+ int scale = battle_config.castrate_dex_scale - status_get_agi(bl);
+ if (scale > 0)
+ time = time * scale / battle_config.castrate_dex_scale;
+ else //To be capped later to minimum.
+ time = 0;
+ }
}
if (!(delaynodex&2))