summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
authorcelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 15:23:08 +0000
committercelest <celest@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 15:23:08 +0000
commit1a194c732064c612f23e55c6c0033ffea0303050 (patch)
tree6badd615f887a0a019f182e886804e3d0fd51060 /src/map/skill.c
parent371ce27789b684a49675c463ae31328985dbd0a0 (diff)
downloadhercules-1a194c732064c612f23e55c6c0033ffea0303050.tar.gz
hercules-1a194c732064c612f23e55c6c0033ffea0303050.tar.bz2
hercules-1a194c732064c612f23e55c6c0033ffea0303050.tar.xz
hercules-1a194c732064c612f23e55c6c0033ffea0303050.zip
* Updated damage calculation for Magnum Break
* Fixed #item not working properly git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1331 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index a6b7887f4..31b46820b 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -807,6 +807,14 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
+ case AS_GRIMTOOTH:
+ if (bl->type == BL_MOB) {
+ struct status_change *sc_data = status_get_sc_data(bl);
+ if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
+ status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
+ }
+ break;
+
case HT_FREEZINGTRAP: /* フリ?ジングトラップ */
rate=skilllv*3+35;
if(rand()%100 < rate*sc_def_mdef/100)
@@ -2346,17 +2354,11 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if(flag&1){
/* 個別にダメ?ジを?える */
if(bl->id!=skill_area_temp[1]){
- int dist=0;
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
- 0x0500|dist );
- if (bl->type == BL_MOB && skillid == AS_GRIMTOOTH) {
- struct status_change *sc_data = status_get_sc_data(bl);
- if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
- status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
- }
+ 0x0500);
}
} else {
- int ar;
+ int ar = 1;
int x = bl->x, y = bl->y;
switch (skillid) {
case AC_SHOWER:
@@ -2365,9 +2367,6 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case NPC_SPLASHATTACK:
ar=3;
break;
- default:
- ar=1;
- break;
}
skill_area_temp[1]=bl->id;
@@ -2384,13 +2383,20 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case SM_MAGNUM: /* マグナムブレイク [celest] */
- {
- int dist = 0;
+ if(flag&1 && bl->id != skill_area_temp[1]){
int dx = abs( bl->x - skill_area_temp[2] );
int dy = abs( bl->y - skill_area_temp[3] );
- dist = ((dx>dy)?dx:dy);
- map_foreachinarea (skill_attack_area,src->m,src->x-1,src->y-1,src->x+1,src->y+1,0,
- BF_WEAPON,src,src,skillid,skilllv,tick,0x0500|dist,BCT_ENEMY);
+ int dist = ((dx>dy)?dx:dy);
+ skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,
+ 0x0500|dist);
+ } else {
+ skill_area_temp[1]=src->id;
+ skill_area_temp[2]=src->x;
+ skill_area_temp[3]=src->y;
+ map_foreachinarea(skill_area_sub,
+ src->m,src->x-2,src->y-2,src->x+2,src->y+2,0,
+ src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
+ skill_castend_damage_id);
status_change_start (src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
clif_skill_nodamage (src,src,skillid,skilllv,1);
}