소스 검색

Fixed Sura's Lightning Walk, bugreport:5407

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@15713 54d463be-8e91-2dee-dedb-b68131a5f0ec
shennetsind 13 년 전
부모
커밋
f81e19f10a
1개의 변경된 파일14개의 추가작업 그리고 0개의 파일을 삭제
  1. 14 0
      src/map/battle.c

+ 14 - 0
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 &&