summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2014-12-28 03:00:19 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2014-12-28 03:00:19 +0800
commit990c25267aeefe4d792bf941a366a6603afcb42b (patch)
tree2d905365e695a4b97c95ea41c145500f1d9cff37 /src/map/skill.c
parent2a95225bcca4114b496556156ab277ebcb5563ec (diff)
downloadhercules-990c25267aeefe4d792bf941a366a6603afcb42b.tar.gz
hercules-990c25267aeefe4d792bf941a366a6603afcb42b.tar.bz2
hercules-990c25267aeefe4d792bf941a366a6603afcb42b.tar.xz
hercules-990c25267aeefe4d792bf941a366a6603afcb42b.zip
Fixed offensive skill formulas of KG/OB to official.
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c33
1 files changed, 16 insertions, 17 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 6bfecf46f..9130ab014 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3574,7 +3574,6 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
case WM_SEVERE_RAINSTORM_MELEE:
case WM_GREAT_ECHO:
case GN_SLINGITEM_RANGEMELEEATK:
- case KO_JYUMONJIKIRI:
case KO_SETSUDAN:
case GC_DARKCROW:
case LG_OVERBRAND_BRANDISH:
@@ -4216,27 +4215,27 @@ int skill_castend_damage_id(struct block_list* src, struct block_list *bl, uint1
}
break;
+ case KO_JYUMONJIKIRI:
case GC_DARKILLUSION:
{
short x, y;
- short dir = map->calc_dir(src,bl->x,bl->y);
+ short dir = map->calc_dir(bl, src->x, src->y);
- if( dir > 0 && dir < 4) x = 2;
- else if( dir > 4 ) x = -2;
- else x = 0;
- if( dir > 2 && dir < 6 ) y = 2;
- else if( dir == 7 || dir < 2 ) y = -2;
- else y = 0;
+ if ( dir < 4 ) {
+ x = bl->x + 2 * (dir > 0) - 3 * (dir > 0);
+ y = bl->y + 1 - (dir / 2) - (dir > 2);
+ } else {
+ x = bl->x + 2 * (dir > 4) - 1 * (dir > 4);
+ y = bl->y + (dir / 6) - 1 + (dir > 6);
+ }
- if( unit->movepos(src, bl->x+x, bl->y+y, 1, 1) )
- {
- clif->slide(src,bl->x+x,bl->y+y);
+ if ( unit->movepos(src, x, y, 1, 1) ) {
+ clif->slide(src, x, y);
clif->fixpos(src); // the official server send these two packets.
- skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag);
- if( rnd()%100 < 4 * skill_lv )
- skill->castend_damage_id(src,bl,GC_CROSSIMPACT,skill_lv,tick,flag);
+ skill->attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag);
+ if ( rnd() % 100 < 4 * skill_lv && skill_id == GC_DARKILLUSION )
+ skill->castend_damage_id(src, bl, GC_CROSSIMPACT, skill_lv, tick, flag);
}
-
}
break;
case GC_WEAPONCRUSH:
@@ -6041,7 +6040,6 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
case MO_ABSORBSPIRITS:
{
int sp = 0;
- int i;
if ( dstsd && dstsd->spiritball
&& (sd == dstsd || map_flag_vs(src->m) || (sd->duel_group && sd->duel_group == dstsd->duel_group))
&& ((dstsd->class_&MAPID_BASEMASK) != MAPID_GUNSLINGER || (dstsd->class_&MAPID_UPPERMASK) != MAPID_REBELLION)
@@ -6055,7 +6053,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
mob->target(dstmd,src,0);
}
if ( dstsd ) {
- for (i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++)
+ int i;
+ for ( i = SPIRITS_TYPE_CHARM_WATER; i < SPIRITS_TYPE_SPHERE; i++ )
pc->del_charm(dstsd, dstsd->spiritcharm[i], i);
}
if (sp) status->heal(src, 0, sp, 3);