summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorshennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-18 05:45:20 +0000
committershennetsind <shennetsind@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-03-18 05:45:20 +0000
commita5b998797c29b27f144882abe40def2c8fc49e50 (patch)
treedc86a3199c92dc535a0665b8fd48f5a86743b115 /src
parentcf8be01962711006f22248f01ce7f4fad20ed913 (diff)
downloadhercules-a5b998797c29b27f144882abe40def2c8fc49e50.tar.gz
hercules-a5b998797c29b27f144882abe40def2c8fc49e50.tar.bz2
hercules-a5b998797c29b27f144882abe40def2c8fc49e50.tar.xz
hercules-a5b998797c29b27f144882abe40def2c8fc49e50.zip
Fixed Sura's Lightning Walk, bugreport:5407
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@15713 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/battle.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 7e2911392..d31b10512 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -588,6 +588,20 @@ int battle_calc_damage(struct block_list *src,struct block_list *bl,struct Damag
if (!damage) return 0;
+ if( (sce = sc->data[SC_LIGHTNINGWALK]) && flag&BF_LONG && rand()%100 < sce->val1 ) {
+ int dx[8]={0,-1,-1,-1,0,1,1,1};
+ int dy[8]={1,1,0,-1,-1,-1,0,1};
+ int dir = map_calc_dir(bl, src->x, src->y);
+ if( unit_movepos(bl, src->x-dx[dir], src->y-dy[dir], 1, 1) ) {
+ clif_slide(bl,src->x-dx[dir],src->y-dy[dir]);
+ unit_setdir(bl, dir);
+ }
+ d->dmg_lv = ATK_DEF;
+ status_change_end(bl, SC_LIGHTNINGWALK, -1);
+ return 0;
+ }
+
+
//Probably not the most correct place, but it'll do here
//(since battle_drain is strictly for players currently)
if ((sce=sc->data[SC_BLOODLUST]) && flag&BF_WEAPON && damage > 0 &&