summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-21 13:26:36 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-09-21 13:26:36 +0000
commitbc4c4b9fac14f0426d1984ed135b445ef80c13c9 (patch)
tree089e5ff74a89040b39bae9cbfb99e10a3a4e999b /src/map/unit.c
parent0be83b78ab44dc5f1e2f1e6f3a3928b174c792f2 (diff)
downloadhercules-bc4c4b9fac14f0426d1984ed135b445ef80c13c9.tar.gz
hercules-bc4c4b9fac14f0426d1984ed135b445ef80c13c9.tar.bz2
hercules-bc4c4b9fac14f0426d1984ed135b445ef80c13c9.tar.xz
hercules-bc4c4b9fac14f0426d1984ed135b445ef80c13c9.zip
* 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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c7
1 files changed, 5 insertions, 2 deletions
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;
}