summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c8
-rw-r--r--src/map/clif.c21
-rw-r--r--src/map/map.c15
-rw-r--r--src/map/skill.c43
-rw-r--r--src/map/skill.h12
-rw-r--r--src/map/status.c32
6 files changed, 80 insertions, 51 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f92aa3ff9..ba4150181 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -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:
diff --git a/src/map/clif.c b/src/map/clif.c
index e24b3f7a1..e25b89a8f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -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;
}
diff --git a/src/map/map.c b/src/map/map.c
index e24a4ba7f..e6ed26db6 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -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;
diff --git a/src/map/skill.c b/src/map/skill.c
index 90afdf01f..21e76cfe1 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -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);
diff --git a/src/map/skill.h b/src/map/skill.h
index f6d214046..a5b1e25cf 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -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
diff --git a/src/map/status.c b/src/map/status.c
index 774f8b60d..fcd9e5a21 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -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);