From bc4c4b9fac14f0426d1984ed135b445ef80c13c9 Mon Sep 17 00:00:00 2001 From: ultramage Date: Fri, 21 Sep 2007 13:26:36 +0000 Subject: * Corrected skill Charge Attack as described in bugreport:67 - cast time is between 100% and 300% (+ infinite waiting fixed) - damage is also between 100% and 300% (doesn't increase past range 9) - added knockback that's equal to the distance to target - no longer causes teleportation on WoE grounds - if target runs behind an obstacle, the skill will still teleport you, but will not perform the attack or do knockback - this should be official behavior, so enjoy the weirdness! git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11256 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 3befc3f2d..52856a19f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -987,8 +987,11 @@ int unit_skilluse_id2(struct block_list *src, int target_id, int skill_num, int casttime = 0; break; case KN_CHARGEATK: - //Taken from jA: Casttime is increased by dist/3*100% - casttime+= casttime * (distance_bl(src,target)-1)/3; + { + unsigned int k = (distance_bl(src,target)-1)/3; //+100% every 3 cells of distance + if( k > 2 ) k = 2; // ...but hard-limited to 300%. + casttime += casttime * k; + } break; } -- cgit v1.2.3-60-g2f50