- Corrected unit id of desperado and Ground Drift using jA's info.

- Rough implementation of Ground Drift according to description and jA info.
- Implemented Tatami Gaeshi using skill description and jA implementation for reference.
- map_foreachinpath calls will no longer go beyond the target point, as this function is required for skills other than SharpShooting now.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7344 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2006-06-26 18:26:51 +00:00
parent abd2bba4de
commit c71d38b672
10 changed files with 92 additions and 54 deletions

View File

@ -4,6 +4,10 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/06/26
* Rough implementation of Ground Drift according to description and jA
info. [Skotlex]
* Implemented Tatami Gaeshi using skill description and jA implementation
for reference. [Skotlex]
* Merged Mitternacht's max_heal/max_heal_lv config settings. [Skotlex]
* Removed support of packet 0xc3 on the new packet versions. Thanks to
Meruru for pointing out they aren't being used anymore. [Skotlex]

View File

@ -24,6 +24,8 @@
-----
=========================
06/26
* Corrected unit id of desperado and Ground Drift using jA's info. [Skotlex]
06/25
* Added two new gunslinger weapon drops, thanks to RockmanEXE. [MasterOfMuppets]
06/23

View File

@ -547,7 +547,7 @@
524,9,8,1,-1,0,0,5,3,no,0,0,0,weapon,0 //NJ_KUNAI#NJ_KUNAI#
525,9,8,1,-1,2,2,5,-1:-2:-3:-4:-5,no,0,0,0,weapon,0 //NJ_HUUMA#NJ_HUUMA#
526,9,6,1,0,0,0,10,1,no,0,0,0,misc,0 //NJ_ZENYNAGE#NJ_ZENYNAGE#
527,0,6,4,3,0,0,5,1,no,0,0,0,weapon,0 //NJ_TATAMIGAESHI#NJ_TATAMIGAESHI#
527,1:2:2:3:3,6,4,3,0,0,5,1,no,0,0,0,weapon,3 //NJ_TATAMIGAESHI#NJ_TATAMIGAESHI#
528,1,6,1,-1,0,0,10,1,no,0,0,0,weapon,0 //NJ_KASUMIKIRI#NJ_KASUMIKIRI#
529,5:6:7:8:9,6,2,0,1,0,5,1,no,0,0,0,none,0 //NJ_SHADOWJUMP#NJ_SHADOWJUMP#
530,-1,6,1,-1,0,0,5,1,no,0,0,0,weapon,0 //NJ_KIRIKAGE#NJ_KIRIKAGE#

View File

@ -21,6 +21,7 @@
//
// u1 u2 lay r intr target flag
//
12,0x7e, , 0, 0, -1,all, 0x003 //MG_SAFETYWALL#セイフティウォール
18,0x7f, , -1, 0, 1,enemy, 0x008 //MG_FIREWALL#ファイアーウォール
21,0x86, , 0, 2,1000,enemy, 0x008 //MG_THUNDERSTORM#サンダーストーム
@ -77,6 +78,7 @@
339,0x86, , -1, 0, 400,enemy, 0x000 //NPC_DARKGRANDCROSS#闇グランドクロス
362,0xb4, , 0, 3, -1,all, 0x000 //HP_BASILICA#バジリカ
369,0xb3, , -1, 0,10000,all, 0x000 //PA_GOSPEL#ゴスペル
404,0xb6, , -1, 0, -1,all, 0x000 //PF_FOGWALL#フォグウォール
405,0xb7, , 0, 1,1000,enemy, 0x000 //PF_SPIDERWEB#スパイダーウェッブ
409,0xb2, , 0,-1, -1,noone, 0x000 //WE_CALLBABY
@ -86,8 +88,9 @@
430,0x86, , 0, 1, 500,enemy, 0x000 //SG_STAR_WARM
484,0xb8, , 2, 0,1000,enemy, 0x808 //HW_GRAVITATION
488,0xb9, , 3, 0, -1,all, 0x100 //CG_HERMODE
516,0xba, , 0, 3, 100,enemy,0x000,GS_DESPERADO#デスペラード
521,0xbd, , 0, 1,1000,enemy,0x006,GS_GROUNDDRIFT#グラウンドドリフト
535,0x86, , 0, 2,2000,enemy,0x008,NJ_KAENSIN#火炎陣#
536,0x86, , 0, 2, 300,enemy,0x008,NJ_BAKUENRYU#爆炎龍#
538,0xbb,,1:1:1:2:2:2:3:3:3:4,0, -1,all,0x010,NJ_SUITON#水遁#
516,0xbc, , 0, 3, 100,enemy,0x000,GS_DESPERADO#デスペラード
521,0xc2, , 0, 1,1000,enemy,0x006,GS_GROUNDDRIFT#グラウンドドリフト

View File

@ -852,6 +852,7 @@ static struct Damage battle_calc_weapon_attack(
case ITM_TOMAHAWK: //Tomahawk is a ranged attack! [Skotlex]
case CR_GRANDCROSS:
case NPC_GRANDDARKNESS:
case NJ_TATAMIGAESHI:
wd.flag=(wd.flag&~BF_RANGEMASK)|BF_LONG;
break;
@ -921,6 +922,8 @@ static struct Damage battle_calc_weapon_attack(
} else if (s_ele == -2) { //Use enchantment's element
s_ele = s_ele_ = status_get_attack_sc_element(src,sc);
}
if (skill_num == GS_GROUNDDRIFT)
s_ele = s_ele_ = wflag; //element comes in flag.
if (sd && sd->weapontype1 == 0 && sd->weapontype2 > 0)
{
@ -1014,6 +1017,8 @@ static struct Damage battle_calc_weapon_attack(
case NPC_BLOODDRAIN:
case NPC_ENERGYDRAIN:
case NPC_MENTALBREAKER:
case GS_GROUNDDRIFT:
case NJ_TATAMIGAESHI:
flag.hit = 1;
break;
case CR_SHIELDBOOMERANG:
@ -1490,6 +1495,9 @@ static struct Damage battle_calc_weapon_attack(
case MO_EXTREMITYFIST:
ATK_ADD(250 + 150*skill_lv);
break;
case GS_GROUNDDRIFT:
ATK_ADD(50*skill_lv);
break;
case TK_DOWNKICK:
case TK_STORMKICK:
case TK_TURNKICK:

View File

@ -2885,21 +2885,12 @@ void clif_refreshlook(struct block_list *bl,int id,int type,int val,int area)
WBUFB(buf,7)=val;
clif_send(buf,packet_len_table[0xc3],bl,area);
#else
if(type == LOOK_BASE && val > 255)
{
WBUFW(buf,0)=0x1d7;
WBUFL(buf,2)=id;
WBUFB(buf,6)=type;
WBUFW(buf,7)=val;
WBUFW(buf,9)=0;
clif_send(buf,packet_len_table[0x1d7],bl,area);
} else {
WBUFW(buf,0)=0xc3;
WBUFL(buf,2)=id;
WBUFB(buf,6)=type;
WBUFB(buf,7)=val;
clif_send(buf,packet_len_table[0xc3],bl,area);
}
WBUFW(buf,0)=0x1d7;
WBUFL(buf,2)=id;
WBUFB(buf,6)=type;
WBUFW(buf,7)=val;
WBUFW(buf,9)=0;
clif_send(buf,packet_len_table[0x1d7],bl,area);
#endif
return;
}

View File

@ -1134,13 +1134,13 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
bl = map[m].block[bx+by*map[m].bxs];
c = map[m].block_count[bx+by*map[m].bxs];
for(i=0;i<c && bl;i++,bl=bl->next){
if(bl && bl->type&type && bl_list_count<BL_LIST_MAX)
if(bl && bl->prev && bl->type&type && bl_list_count<BL_LIST_MAX)
{
xi = bl->x;
yi = bl->y;
k = (xi-x0)*(x1-x0) + (yi-y0)*(y1-y0);
if (k < 0)// || k > magnitude2) //No check to see if it lies after the target's point.
if (k < 0 || k > magnitude2) //Since more skills use this, check for ending point as well.
continue;
//All these shifts are to increase the precision of the intersection point and distance considering how it's
@ -1167,12 +1167,12 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
bl = map[m].block_mob[bx+by*map[m].bxs];
c = map[m].block_mob_count[bx+by*map[m].bxs];
for(i=0;i<c && bl;i++,bl=bl->next){
if(bl && bl_list_count<BL_LIST_MAX)
if(bl && bl->prev && bl_list_count<BL_LIST_MAX)
{
xi = bl->x;
yi = bl->y;
k = (xi-x0)*(x1-x0) + (yi-y0)*(y1-y0);
if (k < 0)// || k > magnitude2) //No check to see if it lies after the target's point.
if (k < 0 || k > magnitude2)
continue;
k = (k<<4)/magnitude2; //k will be between 1~16 instead of 0~1
@ -1197,13 +1197,12 @@ int map_foreachinpath(int (*func)(struct block_list*,va_list),int m,int x0,int y
ShowWarning("map_foreachinpath: block count too many!\n");
}
map_freeblock_lock(); // メモリからの解放を禁止する
map_freeblock_lock();
for(i=blockcount;i<bl_list_count;i++)
if(bl_list[i]->prev) // 有?かどうかチェック
returnCount += func(bl_list[i],ap);
returnCount += func(bl_list[i],ap);
map_freeblock_unlock(); // 解放を許可する
map_freeblock_unlock();
va_end(ap);
bl_list_count = blockcount;

View File

@ -3021,12 +3021,10 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
BF_WEAPON,src,src,skillid,skilllv,tick,flag,BCT_ENEMY); // varargs
break;
//Not implemented yet [Vicious]
case GS_GROUNDDRIFT:
//case NJ_SYURIKEN:
//case NJ_KUNAI:
//case NJ_HUUMA:
case NJ_TATAMIGAESHI:
//case NJ_KASUMIKIRI:
//case NJ_KIRIKAGE:
//case NJ_KOUENKA:
@ -3609,8 +3607,6 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in
case GS_ADJUSTMENT:
case GS_INCREASING:
case GS_CRACKER:
case GS_GROUNDDRIFT:
case NJ_TATAMIGAESHI:
case NJ_KASUMIKIRI:
case NJ_UTSUSEMI:
case NJ_BUNSINJYUTSU:
@ -3618,6 +3614,25 @@ 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 SG_SUN_WARM:
case SG_MOON_WARM:
@ -5804,10 +5819,10 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
case WE_CALLBABY:
case AC_SHOWER: //Ground-placed skill implementation.
case GS_DESPERADO:
skill_unitsetting(src,skillid,skilllv,x,y,0);
flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete).
case GS_GROUNDDRIFT: //Ammo should be deleted right away.
skill_unitsetting(src,skillid,skilllv,x,y,0);
break;
case RG_GRAFFITI: /* Graffiti [Valaris] */
skill_clear_unitgroup(src);
skill_unitsetting(src,skillid,skilllv,x,y,0);
@ -5985,9 +6000,8 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s
break;
//Until they're at right position - gs_unit- [Vicious]
case GS_GROUNDDRIFT: /* グラウンドドリフト*/
case NJ_KAENSIN: /* 火炎陣*/
case NJ_BAKUENRYU: /* 爆炎龍*/
case NJ_KAENSIN:
case NJ_BAKUENRYU:
case NJ_HYOUSYOURAKU:
skill_unitsetting(src,skillid,skilllv,x,y,0);
flag|=1;
@ -6349,6 +6363,14 @@ struct skill_unit_group *skill_unitsetting (struct block_list *src, int skillid,
case WE_CALLBABY:
if (sd) val1 = sd->status.child;
break;
case GS_GROUNDDRIFT:
{ //Take on the base element, not the elemental one.
struct status_data *bstatus = status_get_base_status(src);
val1 = bstatus?bstatus->rhw.ele:status->rhw.ele;
if (sd) sd->state.arrow_atk = 0; //Disable consumption rigth away.
else if (!val1) val1 = ELE_WATER+rand()%(ELE_WIND-ELE_WATER);
break;
}
}
nullpo_retr(NULL, group=skill_initunitgroup(src,(count > 0 ? count : layout->count),
@ -6704,6 +6726,9 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns
if (!(rand()%10)) //Has a low chance of connecting. [Skotlex]
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,0);
break;
case UNT_GROUNDDRIFT:
skill_attack(BF_WEAPON,ss,&src->bl,bl,sg->skill_id,sg->skill_lv,tick,sg->val1);
break;
case UNT_FIREPILLAR_WAITING:
skill_unitsetting(ss,sg->skill_id,sg->skill_lv,src->bl.x,src->bl.y,1);

View File

@ -878,13 +878,14 @@ enum {
UNT_FIREWALL,
UNT_WARP_WAITING,
UNT_WARP_ACTIVE,
//0x82
UNT_SANCTUARY = 0x83,
UNT_MAGNUS,
UNT_PNEUMA,
UNT_ATTACK_SKILLS, //These show no effect on the client, therefore can be used for attack skills.
UNT_FIREPILLAR_WAITING,
UNT_FIREPILLAR_ACTIVE,
//0x89, 0x8a, 0x8b
UNT_USED_TRAPS = 0x8c,
UNT_ICEWALL,
UNT_QUAGMIRE,
@ -926,15 +927,16 @@ enum {
UNT_CALLFAMILY,
UNT_GOSPEL,
UNT_BASILICA,
//0xb5
UNT_FOGWALL = 0xb6,
UNT_SPIDERWEB,
UNT_GRAVITATION,
UNT_HERMODE,
//0xba
UNT_SUITON = 0xbb,
UNT_DESPERADO,
UNT_SUITON,
UNT_TATAMIGAESHI,
UNT_KAENSIN,
//0xbd, 0xbe, 0xc0, 0xc1 //Maybe the other elements of Ground Drift?
UNT_GROUNDDRIFT = 0xc2,
};
#endif

View File

@ -1971,14 +1971,16 @@ int status_calc_pc(struct map_session_data* sd,int first)
// Basic ASPD value
if (sd->status.weapon < MAX_WEAPON_TYPE)
i = aspd_base[sd->status.class_][sd->status.weapon]-(status->agi*4+status->dex)*aspd_base[sd->status.class_][sd->status.weapon]/1000;
i = (1000 -4*status->agi -status->dex)
*aspd_base[sd->status.class_][sd->status.weapon]/1000;
else
i = (
(aspd_base[sd->status.class_][sd->weapontype1]
-(status->agi*4+status->dex)*aspd_base[sd->status.class_][sd->weapontype1]/1000) +
(aspd_base[sd->status.class_][sd->weapontype2]
-(status->agi*4+status->dex)*aspd_base[sd->status.class_][sd->weapontype2]/1000)
) *2/3; //From what I read in rodatazone, 2/3 should be more accurate than 0.7 -> 140 / 200; [Skotlex]
i = ((
(1000 -4*status->agi -status->dex)
*aspd_base[sd->status.class_][sd->weapontype1]/1000
)+(
(1000 -4*status->agi -status->dex)
*aspd_base[sd->status.class_][sd->weapontype2]/1000
)) *2/3; //From what I read in rodatazone, 2/3 should be more accurate than 0.7 -> 140 / 200; [Skotlex]
status->amotion = cap_value(i,battle_config.max_aspd,2000);
@ -2388,14 +2390,16 @@ void status_calc_bl_sub_pc(struct map_session_data *sd, unsigned long flag)
if(flag&(SCB_ASPD|SCB_AGI|SCB_DEX)) {
flag|=SCB_ASPD;
if (sd->status.weapon < MAX_WEAPON_TYPE)
skill = aspd_base[sd->status.class_][sd->status.weapon]-(status->agi*4+status->dex)*aspd_base[sd->status.class_][sd->status.weapon]/1000;
skill = (1000 -4*status->agi -status->dex)
*aspd_base[sd->status.class_][sd->status.weapon]/1000;
else
skill = (
(aspd_base[sd->status.class_][sd->weapontype1]
-(status->agi*4+status->dex)*aspd_base[sd->status.class_][sd->weapontype1]/1000) +
(aspd_base[sd->status.class_][sd->weapontype2]
-(status->agi*4+status->dex)*aspd_base[sd->status.class_][sd->weapontype2]/1000)
) *2/3; //From what I read in rodatazone, 2/3 should be more accurate than 0.7 -> 140 / 200; [Skotlex]
skill = ((
(1000 -4*status->agi -status->dex)
*aspd_base[sd->status.class_][sd->weapontype1]/1000
)+(
(1000 -4*status->agi -status->dex)
*aspd_base[sd->status.class_][sd->weapontype2]/1000
)) *2/3;
status->aspd_rate = status_calc_aspd_rate(&sd->bl, &sd->sc , b_status->aspd_rate);