summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
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))