summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-12 21:02:47 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-07-12 21:02:47 +0000
commit09f021160ac8fed2cfe50babe9db8f76bed32da2 (patch)
treea2d7e18bd321f9b618197fd4f5b54e22934e53cc /src
parent228db31910c3c6ae732eb67393ddae7649c0f67d (diff)
downloadhercules-09f021160ac8fed2cfe50babe9db8f76bed32da2.tar.gz
hercules-09f021160ac8fed2cfe50babe9db8f76bed32da2.tar.bz2
hercules-09f021160ac8fed2cfe50babe9db8f76bed32da2.tar.xz
hercules-09f021160ac8fed2cfe50babe9db8f76bed32da2.zip
- Fixed NJ_TATAMIGAESHI to use ground-tiles rather than "for each in path" calls. The skill should be working correctly now, except for the fact that the correct "unit id" is missing (this is what would give the ground tile it's correct display). Temporarily it is using 0xba until the correct value is found.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7641 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/skill.c69
-rw-r--r--src/map/skill.h2
2 files changed, 43 insertions, 28 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index 34423071a..3de50dc0f 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -3654,25 +3654,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
clif_skill_nodamage(src,bl,skillid,skilllv,
sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
break;
- case NJ_TATAMIGAESHI:
- clif_skill_nodamage(src,bl,skillid,skilllv,
- sc_start(bl,type,100,skilllv,skill_get_time(skillid,skilllv)));
-
- i = skill_get_range(skillid, skilllv); //use i for range.
- type = skill_get_splash(skillid, skilllv); //reuse type for splash
- map_foreachinpath(skill_attack_area,src->m,
- src->x,src->y,src->x-i,src->y,type,BL_CHAR,
- BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
- map_foreachinpath(skill_attack_area,src->m,
- src->x,src->y,src->x+i,src->y,type,BL_CHAR,
- BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
- map_foreachinpath(skill_attack_area,src->m,
- src->x,src->y,src->x,src->y-i,type,BL_CHAR,
- BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
- map_foreachinpath(skill_attack_area,src->m,
- src->x,src->y,src->x,src->y+i,type,BL_CHAR,
- BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY);
- break;
case CG_MOONLIT: /* 月明りの泉に落ちる花びら */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -6025,7 +6006,10 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
sc_start4(src,type,100,skilllv,0,(int)sg,BCT_SELF,skill_get_time(skillid,skilllv));
}
break;
-
+ case NJ_TATAMIGAESHI:
+ sc_start(src,type,100,skilllv,skill_get_time(skillid,skilllv));
+ skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
+ break;
default:
ShowWarning("skill_castend_pos2: Unknown skill used:%d\n",skillid);
return 1;
@@ -6945,8 +6929,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break;
}
+ case UNT_TATAMIGAESHI:
case UNT_DEMONSTRATION:
- skill_attack(BF_WEAPON, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0);
+ skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
case UNT_GOSPEL:
@@ -7051,12 +7036,11 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
break;
case UNT_KAENSIN:
- {
skill_attack(BF_MAGIC,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
src->val2--;
if (--src->val2<=0)
skill_delunit(src);
- }
+ break;
}
if (sg->state.magic_power && sc && sc->data[SC_MAGICPOWER].timer == -1)
@@ -10511,11 +10495,42 @@ void skill_init_unit_layout (void)
}
case NJ_TATAMIGAESHI:
{
- static const int dx[] = {-1, 0, 0, 1};
- static const int dy[] = { 0,-1, 1, 0};
+ //Level 1 (count 4, cross of 3x3)
+ static const int dx1[] = {-1, 1, 0, 0};
+ static const int dy1[] = { 0, 0,-1, 1};
+ //Level 2-3 (count 8, cross of 5x5)
+ static const int dx2[] = {-2,-1, 1, 2, 0, 0, 0, 0};
+ static const int dy2[] = { 0, 0, 0, 0,-2,-1, 1, 2};
+ //Level 4-5 (count 12, cross of 7x7
+ static const int dx3[] = {-3,-2,-1, 1, 2, 3, 0, 0, 0, 0, 0, 0};
+ static const int dy3[] = { 0, 0, 0, 0, 0, 0,-3,-2,-1, 1, 2, 3};
+ //lv1
+ j = 0;
skill_unit_layout[pos].count = 4;
- memcpy(skill_unit_layout[pos].dx,dx,sizeof(dx));
- memcpy(skill_unit_layout[pos].dy,dy,sizeof(dy));
+ memcpy(skill_unit_layout[pos].dx,dx1,sizeof(dx1));
+ memcpy(skill_unit_layout[pos].dy,dy1,sizeof(dy1));
+ skill_db[i].unit_layout_type[j] = pos;
+ //lv2/3
+ j++;
+ pos++;
+ skill_unit_layout[pos].count = 8;
+ memcpy(skill_unit_layout[pos].dx,dx2,sizeof(dx2));
+ memcpy(skill_unit_layout[pos].dy,dy2,sizeof(dy2));
+ skill_db[i].unit_layout_type[j] = pos;
+ skill_db[i].unit_layout_type[++j] = pos;
+ //lv4/5
+ j++;
+ pos++;
+ skill_unit_layout[pos].count = 12;
+ memcpy(skill_unit_layout[pos].dx,dx3,sizeof(dx3));
+ memcpy(skill_unit_layout[pos].dy,dy3,sizeof(dy3));
+ skill_db[i].unit_layout_type[j] = pos;
+ skill_db[i].unit_layout_type[++j] = pos;
+ //Fill in the rest using lv 5.
+ for (;j<MAX_SKILL_LEVEL;j++)
+ skill_db[i].unit_layout_type[j] = pos;
+ //Skip, this way the check below will fail and continue to the next skill.
+ pos++;
break;
}
default:
diff --git a/src/map/skill.h b/src/map/skill.h
index f6494ead5..accc6dfdf 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -935,7 +935,7 @@ enum {
UNT_SPIDERWEB,
UNT_GRAVITATION,
UNT_HERMODE,
- //0xba
+ UNT_TATAMIGAESHI, //0xba //Temporary setting until correct value is found.
UNT_SUITON = 0xbb,
UNT_DESPERADO, //NJ_TATAMIGAESHI is 0xbc as well?
UNT_KAENSIN,