summaryrefslogtreecommitdiff
path: root/src/map/skill.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/skill.c')
-rw-r--r--src/map/skill.c2661
1 files changed, 357 insertions, 2304 deletions
diff --git a/src/map/skill.c b/src/map/skill.c
index b42d3d898..8c2ff23be 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -14,6 +14,7 @@
#include "map.h"
#include "clif.h"
#include "pc.h"
+#include "status.h"
#include "pet.h"
#include "mob.h"
#include "battle.h"
@@ -877,7 +878,7 @@ int skill_tree_get_max(int id, int b_class){
int skill_check_condition( struct map_session_data *sd,int type);
int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag );
int skill_frostjoke_scream(struct block_list *bl,va_list ap);
-int skill_status_change_timer_sub(struct block_list *bl, va_list ap );
+int status_change_timer_sub(struct block_list *bl, va_list ap );
int skill_attack_area(struct block_list *bl,va_list ap);
int skill_abra_dataset(int skilllv);
int skill_clear_element_field(struct block_list *bl);
@@ -1064,16 +1065,16 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
}
//?象の耐性
- luk = battle_get_luk(bl);
- sc_def_mdef=100 - (3 + battle_get_mdef(bl) + luk/3);
- sc_def_vit=100 - (3 + battle_get_vit(bl) + luk/3);
- sc_def_int=100 - (3 + battle_get_int(bl) + luk/3);
+ luk = status_get_luk(bl);
+ sc_def_mdef=100 - (3 + status_get_mdef(bl) + luk/3);
+ sc_def_vit=100 - (3 + status_get_vit(bl) + luk/3);
+ sc_def_int=100 - (3 + status_get_int(bl) + luk/3);
sc_def_luk=100 - (3 + luk);
//自分の耐性
- luk = battle_get_luk(src);
- sc_def_mdef2=100 - (3 + battle_get_mdef(src) + luk/3);
- sc_def_vit2=100 - (3 + battle_get_vit(src) + luk/3);
- sc_def_int2=100 - (3 + battle_get_int(src) + luk/3);
+ luk = status_get_luk(src);
+ sc_def_mdef2=100 - (3 + status_get_mdef(src) + luk/3);
+ sc_def_vit2=100 - (3 + status_get_vit(src) + luk/3);
+ sc_def_int2=100 - (3 + status_get_int(src) + luk/3);
sc_def_luk2=100 - (3 + luk);
if(bl->type==BL_PC)
dstsd=(struct map_session_data *)bl;
@@ -1120,8 +1121,8 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
}
// エンチャントデットリ?ポイズン(猛毒?果)
if (sd && sd->sc_data[SC_EDP].timer != -1 && rand() % 10000 < sd->sc_data[SC_EDP].val2 * sc_def_vit) {
- int mhp = battle_get_max_hp(bl);
- int hp = battle_get_hp(bl);
+ int mhp = status_get_max_hp(bl);
+ int hp = status_get_hp(bl);
int lvl = sd->sc_data[SC_EDP].val1;
int diff;
// MHPの1/4以下にはならない
@@ -1140,21 +1141,21 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
md->hp = mhp>>2;
}
}
- skill_status_change_start(bl,SC_DPOISON,lvl,0,0,0,skill_get_time2(ASC_EDP,lvl),0);
+ status_change_start(bl,SC_DPOISON,lvl,0,0,0,skill_get_time2(ASC_EDP,lvl),0);
}
break;
case SM_BASH: /* バッシュ(急所攻?) */
if( sd && (skill=pc_checkskill(sd,SM_FATALBLOW))>0 ){
if( rand()%100 < 6*(skilllv-5)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(SM_FATALBLOW,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(SM_FATALBLOW,skilllv),0);
}
break;
case TF_POISON: /* インベナム */
case AS_SPLASHER: /* ベナムスプラッシャ? */
if(rand()%100< (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_POISON,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_POISON,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
else{
if(sd && skillid==TF_POISON)
clif_skill_fail(sd,skillid,0,0);
@@ -1163,128 +1164,128 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
case AS_SONICBLOW: /* ソニックブロ? */
if( rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case HT_FREEZINGTRAP: /* フリ?ジングトラップ */
rate=skilllv*3+35;
if(rand()%100 < rate*sc_def_mdef/100)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case MG_FROSTDIVER: /* フロストダイバ? */
case WZ_FROSTNOVA: /* フロストノヴァ */
- rate=(skilllv*3+35)*sc_def_mdef/100-(battle_get_int(bl)+battle_get_luk(bl))/15;
+ rate=(skilllv*3+35)*sc_def_mdef/100-(status_get_int(bl)+status_get_luk(bl))/15;
rate=rate<=5?5:rate;
if(rand()%100 < rate)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
else if(sd && skillid==MG_FROSTDIVER)
clif_skill_fail(sd,skillid,0,0);
break;
case WZ_STORMGUST: /* スト?ムガスト */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
if(sc_data) {
sc_data[SC_FREEZE].val3++;
if(sc_data[SC_FREEZE].val3 >= 3)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
}
break;
case HT_LANDMINE: /* ランドマイン */
if( rand()%100 < (5*skilllv+30)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case HT_SHOCKWAVE: /* ショックウェ?ブトラップ */
if(map[bl->m].flag.pvp && dstsd){
dstsd->status.sp -= dstsd->status.sp*(5+15*skilllv)/100;
- pc_calcstatus(dstsd,0);
+ status_calc_pc(dstsd,0);
}
break;
case HT_SANDMAN: /* サンドマン */
if( rand()%100 < (5*skilllv+30)*sc_def_int/100 )
- skill_status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case TF_SPRINKLESAND: /* 砂まき */
if( rand()%100 < 20*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case TF_THROWSTONE: /* 石投げ */
if( rand()%100 < 7*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case CR_HOLYCROSS: /* ホ?リ?クロス */
if( rand()%100 < 3*skilllv*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case CR_GRANDCROSS: /* グランドクロス */
case NPC_DARKGRANDCROSS: /*闇グランドクロス*/
{
- int race = battle_get_race(bl);
- if( (battle_check_undead(race,battle_get_elem_type(bl)) || race == 6) && rand()%100 < 100000*sc_def_int/100) //?制付?だが完全耐性には無?
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ int race = status_get_race(bl);
+ if( (battle_check_undead(race,status_get_elem_type(bl)) || race == 6) && rand()%100 < 100000*sc_def_int/100) //?制付?だが完全耐性には無?
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
break;
case AM_ACIDTERROR:
if( rand()%100 < (skilllv*3)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case CR_SHIELDCHARGE: /* シ?ルドチャ?ジ */
if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case RG_RAID: /* サプライズアタック */
if( rand()%100 < (10+3*skilllv)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
if( rand()%100 < (10+3*skilllv)*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case BA_FROSTJOKE:
if(rand()%100 < (15+5*skilllv)*sc_def_mdef/100)
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case DC_SCREAM:
if( rand()%100 < (25+5*skilllv)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case BD_LULLABY: /* 子守唄 */
if( rand()%100 < 15*sc_def_int/100 )
- skill_status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_SLEEP,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
/* MOBの追加?果付きスキル */
case NPC_PETRIFYATTACK:
if(rand()%100 < sc_def_mdef)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case NPC_POISON:
case NPC_SILENCEATTACK:
case NPC_STUNATTACK:
if(rand()%100 < sc_def_vit && src->type!=BL_PET)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
if(src->type==BL_PET)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv*1000,0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skilllv*1000,0);
break;
case NPC_CURSEATTACK:
if(rand()%100 < sc_def_luk)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case NPC_SLEEPATTACK:
case NPC_BLINDATTACK:
if(rand()%100 < sc_def_int)
- skill_status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,sc[skillid-NPC_POISON],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case NPC_MENTALBREAKER:
if(dstsd) {
@@ -1298,45 +1299,45 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
//
case WZ_METEOR:
if(rand()%100 < sc_def_vit)
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case WZ_VERMILION:
if(rand()%100 < sc_def_int)
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
// -- moonsoul (stun ability of new champion skill tigerfist)
//
case CH_TIGERFIST:
if( rand()%100 < (10 + skilllv*10)*sc_def_vit/100 ) {
- int sec = skill_get_time2 (skillid,skilllv) - battle_get_agi(bl)/10;
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,sec,0);
+ int sec = skill_get_time2 (skillid,skilllv) - status_get_agi(bl)/10;
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,sec,0);
}
break;
case LK_SPIRALPIERCE:
if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case ST_REJECTSWORD: /* フリ?ジングトラップ */
if( rand()%100 < (skilllv*15) )
- skill_status_change_start(bl,SC_AUTOCOUNTER,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_AUTOCOUNTER,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case PF_FOGWALL: /* ホ?リ?クロス */
if(src!=bl && rand()%100 < 3*skilllv*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case LK_HEADCRUSH: /* ヘッドクラッシュ */
{//?件が良く分からないので適?に
- int race=battle_get_race(bl);
- if( !(battle_check_undead(race,battle_get_elem_type(bl)) || race == 6) && rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_HEADCRUSH,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ int race=status_get_race(bl);
+ if( !(battle_check_undead(race,status_get_elem_type(bl)) || race == 6) && rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
+ status_change_start(bl,SC_HEADCRUSH,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
break;
case LK_JOINTBEAT: /* ジョイントビ?ト */
//?件が良く分からないので適?に
if( rand()%100 < (2*skilllv+10)*sc_def_vit/100 )
- skill_status_change_start(bl,SC_JOINTBEAT,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_JOINTBEAT,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case PF_SPIDERWEB: /* スパイダ?ウェッブ */
{
@@ -1346,24 +1347,24 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
if(map[src->m].flag.pvp) //PvPでは拘束時間半減?
sec = sec/2;
battle_stopwalking(bl,1);
- skill_status_change_start(bl,SC_SPIDERWEB,skilllv,0,0,0,sec,0);
+ status_change_start(bl,SC_SPIDERWEB,skilllv,0,0,0,sec,0);
}
}
break;
case ASC_METEORASSAULT: /* メテオアサルト */
if( rand()%100 < (15 + skilllv*5)*sc_def_vit/100 ) //?態異常は詳細が分からないので適?に
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
if( rand()%100 < (10+3*skilllv)*sc_def_int/100 )
- skill_status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_BLIND,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case MO_EXTREMITYFIST: /* 阿修羅覇凰拳 */
//阿修羅を使うと5分間自然回復しないようになる
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time2(skillid,skilllv),0 );
break;
case HW_NAPALMVULCAN: /* ナパ?ムバルカン */
// skilllv*5%の確率で呪い
if (rand()%10000 < 5*skilllv*sc_def_luk)
- skill_status_change_start(bl,SC_CURSE,7,0,0,0,skill_get_time2(NPC_CURSEATTACK,7),0);
+ status_change_start(bl,SC_CURSE,7,0,0,0,skill_get_time2(NPC_CURSEATTACK,7),0);
break;
}
@@ -1386,14 +1387,14 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
if(rand()%10000 < (sd->addeff[i-SC_STONE])*sc_def_card/100 ){
if(battle_config.battle_log)
printf("PC %d skill_addeff: cardによる異常?動 %d %d\n",sd->bl.id,i,sd->addeff[i-SC_STONE]);
- skill_status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
+ status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
}
}
else {
if(rand()%10000 < (sd->addeff[i-SC_STONE]+sd->arrow_addeff[i-SC_STONE])*sc_def_card/100 ){
if(battle_config.battle_log)
printf("PC %d skill_addeff: cardによる異常?動 %d %d\n",sd->bl.id,i,sd->addeff[i-SC_STONE]);
- skill_status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
+ status_change_start(bl,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
}
}
//自分に?態異常
@@ -1410,14 +1411,14 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s
if(rand()%10000 < (sd->addeff2[i-SC_STONE])*sc_def_card/100 ){
if(battle_config.battle_log)
printf("PC %d skill_addeff: cardによる異常?動 %d %d\n",src->id,i,sd->addeff2[i-SC_STONE]);
- skill_status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
+ status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
}
}
else {
if(rand()%10000 < (sd->addeff2[i-SC_STONE]+sd->arrow_addeff2[i-SC_STONE])*sc_def_card/100 ){
if(battle_config.battle_log)
printf("PC %d skill_addeff: cardによる異常?動 %d %d\n",src->id,i,sd->addeff2[i-SC_STONE]);
- skill_status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
+ status_change_start(src,i,7,0,0,0,(i==SC_CONFUSION)? 10000+7000:skill_get_time2(sc2[i-SC_STONE],7),0);
}
}
}
@@ -1457,7 +1458,7 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
dy=target->y-src->y; dy=(dy>0)?1:((dy<0)?-1: 0);
}
if(dx==0 && dy==0){
- int dir=battle_get_dir(target);
+ int dir=status_get_dir(target);
if(dir>=0 && dir<8){
dx=-dirx[dir];
dy=-diry[dir];
@@ -1509,7 +1510,7 @@ int skill_blown( struct block_list *src, struct block_list *target,int count)
if(su){
skill_unit_move_unit_group(su->group,target->m,dx,dy);
}else{
-// struct status_change *sc_data=battle_get_sc_data(target);
+// struct status_change *sc_data=status_get_sc_data(target);
if(moveblock) map_delblock(target);
target->x=nx;
target->y=ny;
@@ -1571,7 +1572,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
nullpo_retr(0, dsrc);
nullpo_retr(0, bl);
- sc_data = battle_get_sc_data(bl);
+ sc_data = status_get_sc_data(bl);
//何もしない判定ここから
if(dsrc->m != bl->m) //?象が同じマップにいなければ何もしない
@@ -1635,7 +1636,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//マジックロッド?理ここまで
if(src->type==BL_PET) { // [Valaris]
- dmg.damage=battle_attr_fix(skilllv, skill_get_pl(skillid), battle_get_element(bl) );
+ dmg.damage=battle_attr_fix(skilllv, skill_get_pl(skillid), status_get_element(bl) );
dmg.damage2=0;
}
@@ -1661,12 +1662,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
nullpo_retr(0, sd);
//連打掌(MO_CHAINCOMBO)ここから
if(skillid == MO_CHAINCOMBO) {
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src); //基本ディレイの計算
- if(damage < battle_get_hp(bl)) { //ダメ?ジが?象のHPより小さい場合
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src); //基本ディレイの計算
+ if(damage < status_get_hp(bl)) { //ダメ?ジが?象のHPより小さい場合
if(pc_checkskill(sd, MO_COMBOFINISH) > 0 && sd->spiritball > 0) //猛龍拳(MO_COMBOFINISH)取得&?球保持時は+300ms
delay += 300 * battle_config.combo_delay_rate /100; //追加ディレイをconfにより調整
- skill_status_change_start(src,SC_COMBO,MO_CHAINCOMBO,skilllv,0,0,delay,0); //コンボ?態に
+ status_change_start(src,SC_COMBO,MO_CHAINCOMBO,skilllv,0,0,delay,0); //コンボ?態に
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //コンボディレイパケットの送信
@@ -1674,8 +1675,8 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//連打掌(MO_CHAINCOMBO)ここまで
//猛龍拳(MO_COMBOFINISH)ここから
else if(skillid == MO_COMBOFINISH) {
- int delay = 700 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
- if(damage < battle_get_hp(bl)) {
+ int delay = 700 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl)) {
//阿修羅覇凰拳(MO_EXTREMITYFIST)取得&?球4個保持&爆裂波動(MO_EXPLOSIONSPIRITS)?態時は+300ms
//伏虎拳(CH_TIGERFIST)取得時も+300ms
if((pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 4 && sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1) ||
@@ -1683,7 +1684,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
(pc_checkskill(sd, CH_CHAINCRUSH) > 0 && sd->spiritball > 1))
delay += 300 * battle_config.combo_delay_rate /100; //追加ディレイをconfにより調整
- skill_status_change_start(src,SC_COMBO,MO_COMBOFINISH,skilllv,0,0,delay,0); //コンボ?態に
+ status_change_start(src,SC_COMBO,MO_COMBOFINISH,skilllv,0,0,delay,0); //コンボ?態に
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //コンボディレイパケットの送信
@@ -1691,12 +1692,12 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//猛龍拳(MO_COMBOFINISH)ここまで
//伏虎拳(CH_TIGERFIST)ここから
else if(skillid == CH_TIGERFIST) {
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
- if(damage < battle_get_hp(bl)) {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl)) {
if(pc_checkskill(sd, CH_CHAINCRUSH) > 0) //連柱崩?(CH_CHAINCRUSH)取得時は+300ms
delay += 300 * battle_config.combo_delay_rate /100; //追加ディレイをconfにより調整
- skill_status_change_start(src,SC_COMBO,CH_TIGERFIST,skilllv,0,0,delay,0); //コンボ?態に
+ status_change_start(src,SC_COMBO,CH_TIGERFIST,skilllv,0,0,delay,0); //コンボ?態に
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //コンボディレイパケットの送信
@@ -1704,13 +1705,13 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
//伏虎拳(CH_TIGERFIST)ここまで
//連柱崩?(CH_CHAINCRUSH)ここから
else if(skillid == CH_CHAINCRUSH) {
- int delay = 1000 - 4 * battle_get_agi(src) - 2 * battle_get_dex(src);
- if(damage < battle_get_hp(bl)) {
+ int delay = 1000 - 4 * status_get_agi(src) - 2 * status_get_dex(src);
+ if(damage < status_get_hp(bl)) {
//阿修羅覇凰拳(MO_EXTREMITYFIST)取得&?球4個保持&爆裂波動(MO_EXPLOSIONSPIRITS)?態時は+300ms
if(pc_checkskill(sd, MO_EXTREMITYFIST) > 0 && sd->spiritball >= 4 && sd->sc_data[SC_EXPLOSIONSPIRITS].timer != -1)
delay += 300 * battle_config.combo_delay_rate /100; //追加ディレイをconfにより調整
- skill_status_change_start(src,SC_COMBO,CH_CHAINCRUSH,skilllv,0,0,delay,0); //コンボ?態に
+ status_change_start(src,SC_COMBO,CH_CHAINCRUSH,skilllv,0,0,delay,0); //コンボ?態に
}
sd->attackabletime = sd->canmove_tick = tick + delay;
clif_combo_delay(src,delay); //コンボディレイパケットの送信
@@ -1790,8 +1791,8 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
/* ?際にダメ?ジ?理を行う */
if(skillid || flag)
battle_damage(src,bl,damage,0);
- if(skillid == RG_INTIMIDATE && damage > 0 && !(battle_get_mode(bl)&0x20) && !map[src->m].flag.gvg ) {
- int s_lv = battle_get_lv(src),t_lv = battle_get_lv(bl);
+ if(skillid == RG_INTIMIDATE && damage > 0 && !(status_get_mode(bl)&0x20) && !map[src->m].flag.gvg ) {
+ int s_lv = status_get_lv(src),t_lv = status_get_lv(bl);
int rate = 50 + skilllv * 5;
rate = rate + (s_lv - t_lv);
if(rand()%100 < rate)
@@ -1875,7 +1876,7 @@ int skill_attack( int attack_type, struct block_list* src, struct block_list *ds
if(attack_type&BF_WEAPON && sc_data && sc_data[SC_AUTOCOUNTER].timer != -1 && sc_data[SC_AUTOCOUNTER].val4 > 0) {
if(sc_data[SC_AUTOCOUNTER].val3 == dsrc->id)
battle_weapon_attack(bl,dsrc,tick,0x8000|sc_data[SC_AUTOCOUNTER].val1);
- skill_status_change_end(bl,SC_AUTOCOUNTER,-1);
+ status_change_end(bl,SC_AUTOCOUNTER,-1);
}
map_freeblock_unlock();
@@ -2303,7 +2304,7 @@ int skill_cleartimerskill(struct block_list *src)
int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int skillid,int skilllv,unsigned int tick,int flag )
{
struct map_session_data *sd = NULL;
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
int i;
if(skillid > 0 && skilllv <= 0) return 0;
@@ -2391,9 +2392,9 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case PA_PRESSURE: /* プレッシャ? */
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if (rand()%100 < 50)
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(PA_PRESSURE,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(PA_PRESSURE,skilllv),0);
else
- skill_status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(PA_PRESSURE,skilllv),0);
+ status_change_start(bl,SC_BLEEDING,skilllv,0,0,0,skill_get_time2(PA_PRESSURE,skilllv),0);
if (bl->type == BL_PC) {
int sp;
struct map_session_data *tsd = (struct map_session_data *)bl;
@@ -2410,10 +2411,10 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case MO_INVESTIGATE: /* ?勁 */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
case SN_FALCONASSAULT: /* ファルコンアサルト */
@@ -2437,12 +2438,12 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case RG_BACKSTAP: /* バックスタブ */
{
- int dir = map_calc_dir(src,bl->x,bl->y),t_dir = battle_get_dir(bl);
+ int dir = map_calc_dir(src,bl->x,bl->y),t_dir = status_get_dir(bl);
int dist = distance(src->x,src->y,bl->x,bl->y);
if((dist > 0 && !map_check_dir(dir,t_dir)) || bl->type == BL_SKILL) {
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
if(sc_data && sc_data[SC_HIDING].timer != -1)
- skill_status_change_end(src, SC_HIDING, -1); // ハイディング解除
+ status_change_end(src, SC_HIDING, -1); // ハイディング解除
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest]
if (bl->type == BL_PC)
@@ -2466,7 +2467,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case MO_FINGEROFFENSIVE: /* 指? */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
if(!battle_config.finger_offensive_type)
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
@@ -2479,15 +2480,15 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
}
}
if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
case MO_CHAINCOMBO: /* 連打掌 */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
case MO_COMBOFINISH: /* 猛龍拳 */
@@ -2498,7 +2499,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
case MO_EXTREMITYFIST: /* 阿修羅覇鳳拳 */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
if(sd) {
struct walkpath_data wpd;
@@ -2530,13 +2531,13 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
if(sd->canact_tick < sd->canmove_tick)
sd->canact_tick = sd->canmove_tick;
pc_movepos(sd,sd->to_x,sd->to_y);
- skill_status_change_end(&sd->bl,SC_COMBO,-1);
+ status_change_end(&sd->bl,SC_COMBO,-1);
}
else
skill_attack(BF_WEAPON,src,src,bl,skillid,skilllv,tick,flag);
- skill_status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
+ status_change_end(src, SC_EXPLOSIONSPIRITS, -1);
if(sc_data && sc_data[SC_BLADESTOP].timer != -1)
- skill_status_change_end(src,SC_BLADESTOP,-1);
+ status_change_end(src,SC_BLADESTOP,-1);
}
break;
/* 武器系範?攻?スキル */
@@ -2559,9 +2560,9 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
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 = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
if (sc_data && sc_data[SC_SLOWDOWN].timer == -1)
- skill_status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
+ status_change_start(bl,SC_SLOWDOWN,0,0,0,0,1000,0);
}
}
}else{
@@ -2591,7 +2592,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
skill_castend_damage_id);
if (skillid == SM_MAGNUM) // fire element for 10 seconds
- skill_status_change_start(src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
+ status_change_start(src,SC_FLAMELAUNCHER,0,0,0,0,10000,0);
}
break;
@@ -2643,7 +2644,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case ALL_RESURRECTION: /* リザレクション */
case PR_TURNUNDEAD: /* タ?ンアンデッド */
- if(bl->type != BL_PC && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
+ if(bl->type != BL_PC && battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
else {
map_freeblock_unlock();
@@ -2671,10 +2672,10 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case MG_FROSTDIVER: /* フロストダイバー */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
int sc_def_mdef, rate, damage;
- sc_def_mdef = 100 - (3 + battle_get_mdef(bl) + battle_get_luk(bl)/3);
- rate = (skilllv*3+35)*sc_def_mdef/100-(battle_get_int(bl)+battle_get_luk(bl))/15;
+ sc_def_mdef = 100 - (3 + status_get_mdef(bl) + status_get_luk(bl)/3);
+ rate = (skilllv*3+35)*sc_def_mdef/100-(status_get_int(bl)+status_get_luk(bl))/15;
rate = rate<=5?5:rate;
if (sc_data && sc_data[SC_FREEZE].timer != -1) {
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
@@ -2683,8 +2684,8 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
break;
}
damage = skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
- if (battle_get_hp(bl) > 0 && damage > 0 && rand()%100 < rate) {
- skill_status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ if (status_get_hp(bl) > 0 && damage > 0 && rand()%100 < rate) {
+ status_change_start(bl,SC_FREEZE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
} else if (sd) {
clif_skill_fail(sd,skillid,0,0);
}
@@ -2694,11 +2695,11 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case WZ_WATERBALL: /* ウォ?タ?ボ?ル */
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
if(skilllv>1)
- skill_status_change_start(src,SC_WATERBALL,skilllv,bl->id,0,0,0,0);
+ status_change_start(src,SC_WATERBALL,skilllv,bl->id,0,0,0,0);
break;
case PR_BENEDICTIO: /* 聖?降福 */
- if(battle_get_race(bl)==1 || battle_get_race(bl)==6)
+ if(status_get_race(bl)==1 || status_get_race(bl)==6)
skill_attack(BF_MAGIC,src,src,bl,skillid,skilllv,tick,flag);
break;
@@ -2779,7 +2780,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
case WZ_SIGHTRASHER:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_castend_pos2(src,bl->x,bl->y,skillid,skilllv,tick,0);
- skill_status_change_end(src,SC_SIGHT,-1);
+ status_change_end(src,SC_SIGHT,-1);
break;
/* その他 */
@@ -2838,7 +2839,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
sd->status.sp = 0;
clif_updatestatus(sd,SP_SP);
}
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0, (skilllv < 5 ? 10000: 15000),0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0, (skilllv < 5 ? 10000: 15000),0 );
}
break;
@@ -2858,7 +2859,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
struct mob_data *md;
if((md=(struct mob_data *)src)){
skill_area_temp[1]=bl->id;
- skill_area_temp[2]=battle_get_hp(src);
+ skill_area_temp[2]=status_get_hp(src);
clif_skill_nodamage(src,src,NPC_SELFDESTRUCTION,-1,1);
map_foreachinarea(skill_area_sub,
bl->m,bl->x-5,bl->y-5,bl->x+5,bl->y+5,0,
@@ -2918,7 +2919,7 @@ int skill_castend_damage_id( struct block_list* src, struct block_list *bl,int s
}
if(sc_data) {
if (sc_data[SC_MAGICPOWER].timer != -1 && skillid != HW_MAGICPOWER) //マジックパワ?の?果終了
- skill_status_change_end(src,SC_MAGICPOWER,-1);
+ status_change_end(src,SC_MAGICPOWER,-1);
}
map_freeblock_unlock();
@@ -2954,11 +2955,11 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
else if(src->type==BL_MOB)
md=(struct mob_data *)src;
- sc_dex=battle_get_mdef(bl);
- sc_luk=battle_get_luk(bl);
- sc_def_vit = 100 - (3 + battle_get_vit(bl) + battle_get_luk(bl)/3);
- //sc_def_vit = 100 - (3 + battle_get_vit(bl) + battle_get_luk(bl)/3);
- sc_def_mdef = 100 - (3 + battle_get_mdef(bl) + battle_get_luk(bl)/3);
+ sc_dex=status_get_mdef(bl);
+ sc_luk=status_get_luk(bl);
+ sc_def_vit = 100 - (3 + status_get_vit(bl) + status_get_luk(bl)/3);
+ //sc_def_vit = 100 - (3 + status_get_vit(bl) + status_get_luk(bl)/3);
+ sc_def_mdef = 100 - (3 + status_get_mdef(bl) + status_get_luk(bl)/3);
if(bl->type==BL_PC){
nullpo_retr(1, dstsd=(struct map_session_data *)bl);
@@ -2980,7 +2981,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
return 1;
if(dstsd && pc_isdead(dstsd) && skillid != ALL_RESURRECTION)
return 1;
- if(battle_get_class(bl) == 1288)
+ if(status_get_class(bl) == 1288)
return 1;
if (skillnotok(skillid, (struct map_session_data *)bl)) // [MouseJstr]
return 0;
@@ -3067,20 +3068,20 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case AL_DECAGI: /* 速度減少 */
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- if( rand()%100 < (50+skilllv*3+(battle_get_lv(src)+battle_get_int(src)/5)-sc_def_mdef) ) {
+ if( rand()%100 < (50+skilllv*3+(status_get_lv(src)+status_get_int(src)/5)-sc_def_mdef) ) {
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
break;
case AL_CRUCIS:
if(flag&1) {
- int race = battle_get_race(bl),ele = battle_get_elem_type(bl);
+ int race = status_get_race(bl),ele = status_get_elem_type(bl);
if(battle_check_target(src,bl,BCT_ENEMY) && (race == 6 || battle_check_undead(race,ele))) {
- int slv=battle_get_lv(src),tlv=battle_get_lv(bl),rate;
+ int slv=status_get_lv(src),tlv=status_get_lv(bl),rate;
rate = 25 + skilllv*2 + slv - tlv;
if(rand()%100 < rate)
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,0,0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,0,0);
}
}
else {
@@ -3095,14 +3096,14 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case PR_LEXDIVINA: /* レックスディビ?ナ */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
if(sc_data && sc_data[SC_DIVINA].timer != -1)
- skill_status_change_end(bl,SC_DIVINA,-1);
+ status_change_end(bl,SC_DIVINA,-1);
else if( rand()%100 < sc_def_vit ) {
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
}
break;
@@ -3141,7 +3142,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
if(dstsd) pc_heal(dstsd,dstsd->status.max_hp,dstsd->status.max_sp);
- if(dstmd) dstmd->hp=battle_get_max_hp(&dstmd->bl);
+ if(dstmd) dstmd->hp=status_get_max_hp(&dstmd->bl);
break;
case SA_SUMMONMONSTER:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -3180,7 +3181,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case SA_FORTUNE:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- if(sd) pc_getzeny(sd,battle_get_lv(bl)*100);
+ if(sd) pc_getzeny(sd,status_get_lv(bl)*100);
break;
case SA_TAMINGMONSTER:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -3204,15 +3205,15 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage ){
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}else{
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
break;
case CG_MARIONETTE: /* マリオネットコントロ?ル */
if(sd && dstsd){
- struct status_change *sc_data = battle_get_sc_data(src);
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(src);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc = SkillStatusChangeTable[skillid];
int sc2 = SC_MARIONETTE2;
@@ -3226,13 +3227,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
if(sc_data && tsc_data){
if(sc_data[sc].timer == -1 && tsc_data[sc2].timer == -1) {
- skill_status_change_start (src,sc,skilllv,0,bl->id,0,skill_get_time(skillid,skilllv),0);
- skill_status_change_start (bl,sc2,skilllv,0,src->id,0,skill_get_time(skillid,skilllv),0);
+ status_change_start (src,sc,skilllv,0,bl->id,0,skill_get_time(skillid,skilllv),0);
+ status_change_start (bl,sc2,skilllv,0,src->id,0,skill_get_time(skillid,skilllv),0);
}
else if (sc_data[sc].timer != -1 && tsc_data[sc2].timer != -1 &&
sc_data[sc].val3 == bl->id && tsc_data[sc2].val3 == src->id) {
- skill_status_change_end(src, sc, -1);
- skill_status_change_end(bl, sc2, -1);
+ status_change_end(src, sc, -1);
+ status_change_end(bl, sc2, -1);
}
else {
clif_skill_fail(sd,skillid,0,0);
@@ -3273,7 +3274,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
}
else {
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
clif_skill_nodamage(src,bl,skillid,skilllv,1);
}
break;
@@ -3284,13 +3285,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
if(bl->type==BL_MOB)
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case PR_KYRIE: /* キリエエレイソン */
clif_skill_nodamage(bl,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case KN_AUTOCOUNTER: /* オ?トカウンタ? */
case KN_TWOHANDQUICKEN: /* ツ?ハンドクイッケン */
@@ -3319,24 +3320,24 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case ASC_EDP: // [Celest]
case CG_MOONLIT: /* 月明りの泉に落ちる花びら */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case SM_ENDURE: /* インデュア */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,10000,0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,10000,0 );
break;
case SM_AUTOBERSERK: // Celest
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( tsc_data ){
if( tsc_data[sc].timer==-1 )
- skill_status_change_start(bl,sc,skilllv,0,0,0,0,0);
+ status_change_start(bl,sc,skilllv,0,0,0,0,0);
else
- skill_status_change_end(bl, sc, -1);
+ status_change_end(bl, sc, -1);
}
}
break;
@@ -3353,17 +3354,17 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case LK_TENSIONRELAX: /* テンションリラックス */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
pc_setsit(sd);
clif_sitting(sd);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case LK_BERSERK: /* バ?サ?ク */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
//sd->status.hp = sd->status.max_hp * 3;
break;
case MC_CHANGECART:
@@ -3373,25 +3374,25 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
{
int range = 1;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
- map_foreachinarea( skill_status_change_timer_sub,
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ map_foreachinarea( status_change_timer_sub,
src->m, src->x-range, src->y-range, src->x+range,src->y+range,0,
src,SkillStatusChangeTable[skillid],tick);
}
break;
case SM_PROVOKE: /* プロボック */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
/* MVPmobと不死には?かない */
- if((bl->type==BL_MOB && battle_get_mode(bl)&0x20) || battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl))) //不死には?かない
+ if((bl->type==BL_MOB && status_get_mode(bl)&0x20) || battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) //不死には?かない
{
map_freeblock_unlock();
return 1;
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
if(dstmd && dstmd->skilltimer!=-1 && dstmd->state.skillcastcancel) // 詠唱妨害
skill_castcancel(bl,0);
@@ -3401,17 +3402,17 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(sc_data){
if(sc_data[SC_FREEZE].timer!=-1)
- skill_status_change_end(bl,SC_FREEZE,-1);
+ status_change_end(bl,SC_FREEZE,-1);
if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
- skill_status_change_end(bl,SC_STONE,-1);
+ status_change_end(bl,SC_STONE,-1);
if(sc_data[SC_SLEEP].timer!=-1)
- skill_status_change_end(bl,SC_SLEEP,-1);
+ status_change_end(bl,SC_SLEEP,-1);
}
if(dstmd) {
int range = skill_get_range(skillid,skilllv);
if(range < 0)
- range = battle_get_range(src) - (range + 1);
+ range = status_get_range(src) - (range + 1);
dstmd->state.provoke_flag = src->id;
mob_target(dstmd,src,range);
}
@@ -3449,7 +3450,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
clif_devotion(sd,bl->id);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],src->id,1,0,0,1000*(15+15*skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],src->id,1,0,0,1000*(15+15*skilllv),0 );
}
else clif_skill_fail(sd,skillid,0,0);
break;
@@ -3468,7 +3469,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case MO_BLADESTOP: // 白刃取り
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case MO_ABSORBSPIRITS: // ?奪
i=0;
@@ -3536,7 +3537,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_weapon_damage )
break;
if( rand()%100 < (20+ 10*skilllv)*sc_def_vit/100 ) {
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
}
break;
@@ -3552,7 +3553,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src,skillid,skilllv,tick, flag|BCT_ENEMY|1,
skill_castend_damage_id);
}
- skill_status_change_end(src, SC_HIDING, -1); // ハイディング解除
+ status_change_end(src, SC_HIDING, -1); // ハイディング解除
break;
case KN_BRANDISHSPEAR: /*ブランディッシュスピア*/
@@ -3615,7 +3616,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_nodamage(bl,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
else{
/* パ?ティ全?への?理 */
@@ -3631,7 +3632,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(sd == NULL || sd->status.party_id==0 || (flag&1) ){
/* 個別の?理 */
clif_skill_nodamage(bl,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,(src == bl)? 1:0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,(src == bl)? 1:0,0,0,skill_get_time(skillid,skilllv),0);
}
else{
/* パ?ティ全?への?理 */
@@ -3648,60 +3649,60 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_DEFENDER: /* ディフェンダ? */
case CR_AUTOGUARD: /* オ?トガ?ド */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( tsc_data ){
if( tsc_data[sc].timer==-1 )
/* 付加する */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
else
/* 解除する */
- skill_status_change_end(bl, sc, -1);
+ status_change_end(bl, sc, -1);
}
}
break;
case TF_HIDING: /* ハイディング */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,-1,1);
if(tsc_data && tsc_data[sc].timer!=-1 )
/* 解除する */
- skill_status_change_end(bl, sc, -1);
+ status_change_end(bl, sc, -1);
else
/* 付加する */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
break;
case AS_CLOAKING: /* クロ?キング */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if(tsc_data && tsc_data[sc].timer!=-1 )
/* 解除する */
- skill_status_change_end(bl, sc, -1);
+ status_change_end(bl, sc, -1);
else
/* 付加する */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
//skill_check_cloaking(bl);
}
break;
case ST_CHASEWALK: /* ハイディング */
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int sc=SkillStatusChangeTable[skillid];
clif_skill_nodamage(src,bl,skillid,-1,1);
if(tsc_data && tsc_data[sc].timer!=-1 )
/* 解除する */
- skill_status_change_end(bl, sc, -1);
+ status_change_end(bl, sc, -1);
else
/* 付加する */
- skill_status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,sc,skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
}
break;
@@ -3732,20 +3733,20 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case HP_BASILICA: /* バジリカ */
{
// cancel Basilica if already in effect
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
if(sc_data && sc_data[SC_BASILICA].timer != -1){
struct skill_unit *su;
if ((su = (struct skill_unit *)sc_data[SC_BASILICA].val4)) {
struct skill_unit_group *sg;
if ((sg = su->group) && sg->src_id == sd->bl.id) {
- skill_status_change_end(src,SC_BASILICA,-1);
+ status_change_end(src,SC_BASILICA,-1);
skill_delunitgroup (sg);
break;
}
}
} else {
// otherwise allow casting
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0);
skill_clear_unitgroup(src);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
@@ -3757,12 +3758,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
skill_clear_unitgroup(src);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_unitsetting(src,skillid,skilllv,src->x,src->y,0);
- skill_status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,BCT_SELF,skill_get_time(skillid,skilllv),0);
+ status_change_start(src,SkillStatusChangeTable[skillid],skilllv,0,0,BCT_SELF,skill_get_time(skillid,skilllv),0);
break;
case BD_ADAPTATION: /* アドリブ */
{
- struct status_change *sc_data = battle_get_sc_data(src);
+ struct status_change *sc_data = status_get_sc_data(src);
if(sc_data && sc_data[SC_DANCING].timer!=-1){
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skill_stop_dancing(src,0);
@@ -3790,7 +3791,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(pc_steal_coin(sd,bl)) {
int range = skill_get_range(skillid,skilllv);
if(range < 0)
- range = battle_get_range(src) - (range + 1);
+ range = status_get_range(src) - (range + 1);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
mob_target((struct mob_data *)bl,src,range);
}
@@ -3801,10 +3802,10 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case MG_STONECURSE: /* スト?ンカ?ス */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
// Level 6-10 doesn't consume a red gem if it fails [celest]
int i, gem_flag = 1;
- if (bl->type==BL_MOB && battle_get_mode(bl)&0x20) {
+ if (bl->type==BL_MOB && status_get_mode(bl)&0x20) {
clif_skill_fail(sd,sd->skillid,0,0);
break;
}
@@ -3812,12 +3813,12 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
if (sc_data && sc_data[SC_STONE].timer != -1) {
- skill_status_change_end(bl,SC_STONE,-1);
+ status_change_end(bl,SC_STONE,-1);
if (sd)
clif_skill_fail(sd,skillid,0,0);
}
- else if( rand()%100 < skilllv*4+20 && !battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
- skill_status_change_start(bl,SC_STONE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ else if( rand()%100 < skilllv*4+20 && !battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
+ status_change_start(bl,SC_STONE,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
else if(sd) {
if (skilllv > 5) gem_flag = 0;
clif_skill_fail(sd,skillid,0,0);
@@ -3843,18 +3844,18 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- skill_status_change_end(bl, SC_SILENCE , -1 );
- skill_status_change_end(bl, SC_BLIND , -1 );
- skill_status_change_end(bl, SC_CONFUSION, -1 );
- if( battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)) ){//アンデッドなら暗闇?果
- skill_status_change_start(bl, SC_CONFUSION,1,0,0,0,6000,0);
+ status_change_end(bl, SC_SILENCE , -1 );
+ status_change_end(bl, SC_BLIND , -1 );
+ status_change_end(bl, SC_CONFUSION, -1 );
+ if( battle_check_undead(status_get_race(bl),status_get_elem_type(bl)) ){//アンデッドなら暗闇?果
+ status_change_start(bl, SC_CONFUSION,1,0,0,0,6000,0);
}
break;
case TF_DETOXIFY: /* 解毒 */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_end(bl, SC_POISON , -1 );
- skill_status_change_end(bl, SC_DPOISON , -1 );
+ status_change_end(bl, SC_POISON , -1 );
+ status_change_end(bl, SC_DPOISON , -1 );
break;
case PR_STRECOVERY: /* リカバリ? */
@@ -3862,16 +3863,16 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- skill_status_change_end(bl, SC_FREEZE , -1 );
- skill_status_change_end(bl, SC_STONE , -1 );
- skill_status_change_end(bl, SC_SLEEP , -1 );
- skill_status_change_end(bl, SC_STAN , -1 );
- if( battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)) ){//アンデッドなら暗闇?果
+ status_change_end(bl, SC_FREEZE , -1 );
+ status_change_end(bl, SC_STONE , -1 );
+ status_change_end(bl, SC_SLEEP , -1 );
+ status_change_end(bl, SC_STAN , -1 );
+ if( battle_check_undead(status_get_race(bl),status_get_elem_type(bl)) ){//アンデッドなら暗闇?果
int blind_time;
- //blind_time=30-battle_get_vit(bl)/10-battle_get_int/15;
- blind_time=30*(100-(battle_get_int(bl)+battle_get_vit(bl))/2)/100;
- if(rand()%100 < (100-(battle_get_int(bl)/2+battle_get_vit(bl)/3+battle_get_luk(bl)/10)))
- skill_status_change_start(bl, SC_BLIND,1,0,0,0,blind_time,0);
+ //blind_time=30-status_get_vit(bl)/10-status_get_int/15;
+ blind_time=30*(100-(status_get_int(bl)+status_get_vit(bl))/2)/100;
+ if(rand()%100 < (100-(status_get_int(bl)/2+status_get_vit(bl)/3+status_get_luk(bl)/10)))
+ status_change_start(bl, SC_BLIND,1,0,0,0,blind_time,0);
}
if(dstmd){
dstmd->attacked_id=0;
@@ -3975,7 +3976,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case RG_STRIPHELM: /* ストリップヘルム */
case ST_FULLSTRIP: // Celest
{
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
int scid, equip, strip_fix, strip_num = 0;
scid = SkillStatusChangeTable[skillid];
switch (skillid) {
@@ -4002,7 +4003,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if (tsc_data && tsc_data[scid].timer != -1)
break;
- strip_fix = battle_get_dex(src) - battle_get_dex(bl);
+ strip_fix = status_get_dex(src) - status_get_dex(bl);
if(strip_fix < 0)
strip_fix=0;
strip_per = 5+2*skilllv+strip_fix/5;
@@ -4022,7 +4023,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
strip_time = skill_get_time(skillid,skilllv)+strip_fix/2;
- skill_status_change_start(bl,scid,skilllv,0,0,0,strip_time,0 );
+ status_change_start(bl,scid,skilllv,0,0,0,strip_time,0 );
break;
}
@@ -4055,7 +4056,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
pc_delitem(sd,i,skill_db[skillid].amount[x],0);
sd->state.potionpitcher_flag = 0;
if(sd->potion_per_hp > 0 || sd->potion_per_sp > 0) {
- hp = battle_get_max_hp(bl) * sd->potion_per_hp / 100;
+ hp = status_get_max_hp(bl) * sd->potion_per_hp / 100;
hp = hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
if(dstsd) {
sp = dstsd->status.max_sp * sd->potion_per_sp / 100;
@@ -4065,13 +4066,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
else {
if(sd->potion_hp > 0) {
hp = sd->potion_hp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- hp = hp * (100 + (battle_get_vit(bl)<<1)) / 100;
+ hp = hp * (100 + (status_get_vit(bl)<<1)) / 100;
if(dstsd)
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
}
if(sd->potion_sp > 0) {
sp = sd->potion_sp * (100 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- sp = sp * (100 + (battle_get_int(bl)<<1)) / 100;
+ sp = sp * (100 + (status_get_int(bl)<<1)) / 100;
if(dstsd)
sp = sp * (100 + pc_checkskill(dstsd,MG_SRECOVERY)*10) / 100;
}
@@ -4079,7 +4080,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
else {
hp = (1 + rand()%400) * (100 + skilllv*10) / 100;
- hp = hp * (100 + (battle_get_vit(bl)<<1)) / 100;
+ hp = hp * (100 + (status_get_vit(bl)<<1)) / 100;
if(dstsd)
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10) / 100;
}
@@ -4101,11 +4102,11 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case AM_CP_HELM:
{
int scid = SC_STRIPWEAPON + (skillid - AM_CP_WEAPON);
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if(tsc_data && tsc_data[scid].timer != -1)
- skill_status_change_end(bl, SC_STRIPWEAPON, -1 );
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_end(bl, SC_STRIPWEAPON, -1 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
}
break;
@@ -4121,7 +4122,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
|| i==SC_STRIPHELM || i==SC_CP_WEAPON || i==SC_CP_SHIELD || i==SC_CP_ARMOR
|| i==SC_CP_HELM || i==SC_COMBO)
continue;
- skill_status_change_end(bl,i,-1);
+ status_change_end(bl,i,-1);
}
}
break;
@@ -4150,7 +4151,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case SA_SPELLBREAKER: // スペルブレイカ?
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
int sp;
if(sc_data && sc_data[SC_MAGICROD].timer != -1) {
if(dstsd) {
@@ -4215,7 +4216,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case SA_MAGICROD:
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case SA_AUTOSPELL: /* オ?トスペル */
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -4246,7 +4247,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
maxlv = 3;
}
if(spellid > 0)
- skill_status_change_start(src,SC_AUTOSPELL,skilllv,spellid,maxlv,0,
+ status_change_start(src,SC_AUTOSPELL,skilllv,spellid,maxlv,0,
skill_get_time(SA_AUTOSPELL,skilllv),0);
}
break;
@@ -4281,7 +4282,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
break;
case NPC_KEEPING:
@@ -4289,7 +4290,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
{
int skill_time = skill_get_time(skillid,skilllv);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_time,0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_time,0 );
if (src->type == BL_MOB)
mob_changestate((struct mob_data *)src,MS_DELAY,skill_time);
else if (src->type == BL_PC)
@@ -4299,15 +4300,15 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case NPC_DARKBLESSING:
{
- int sc_def = 100 - battle_get_mdef(bl);
+ int sc_def = 100 - status_get_mdef(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
- if(battle_get_elem_type(bl) == 7 || battle_get_race(bl) == 6)
+ if(status_get_elem_type(bl) == 7 || status_get_race(bl) == 6)
break;
if(rand()%100 < sc_def*(50+skilllv*5)/100) {
if(dstsd) {
- int hp = battle_get_hp(bl)-1;
+ int hp = status_get_hp(bl)-1;
pc_heal(dstsd,-hp,0);
}
else if(dstmd)
@@ -4318,7 +4319,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case NPC_SELFDESTRUCTION: /* 自爆 */
case NPC_SELFDESTRUCTION2: /* 自爆2 */
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0);
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,0,0,skill_get_time(skillid,skilllv),0);
break;
case NPC_LICK:
clif_skill_nodamage(src,bl,skillid,skilllv,1);
@@ -4327,7 +4328,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(dstsd)
pc_heal(dstsd,0,-100);
if(rand()%100 < (skilllv*5)*sc_def_vit/100)
- skill_status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
+ status_change_start(bl,SC_STAN,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0);
break;
case NPC_SUICIDE: /* 自決 */
@@ -4470,7 +4471,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(su->group->unit_id == 0x91 && su->group->val2){
struct block_list *target=map_id2bl(su->group->val2);
if(target && (target->type == BL_PC || target->type == BL_MOB))
- skill_status_change_end(target,SC_ANKLE,-1);
+ status_change_end(target,SC_ANKLE,-1);
}
skill_delunit(su);
}
@@ -4506,25 +4507,25 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
break;
case AS_SPLASHER: /* ベナムスプラッシャ? */
- if((double)battle_get_max_hp(bl)*2/3 < battle_get_hp(bl)) //HPが2/3以上?っていたら失敗
+ if((double)status_get_max_hp(bl)*2/3 < status_get_hp(bl)) //HPが2/3以上?っていたら失敗
return 1;
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000,0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,skillid,src->id,skill_get_time(skillid,skilllv),1000,0 );
break;
case PF_MINDBREAKER: /* プロボック */
{
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
/* MVPmobと不死には?かない */
- if((bl->type==BL_MOB && battle_get_mode(bl)&0x20) || battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl))) //不死には?かない
+ if((bl->type==BL_MOB && status_get_mode(bl)&0x20) || battle_check_undead(status_get_race(bl),status_get_elem_type(bl))) //不死には?かない
{
map_freeblock_unlock();
return 1;
}
clif_skill_nodamage(src,bl,skillid,skilllv,1);
- skill_status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
+ status_change_start(bl,SkillStatusChangeTable[skillid],skilllv,0,0,0,skill_get_time(skillid,skilllv),0 );
if(dstmd && dstmd->skilltimer!=-1 && dstmd->state.skillcastcancel) // 詠唱妨害
skill_castcancel(bl,0);
@@ -4534,17 +4535,17 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if(sc_data){
if(sc_data[SC_FREEZE].timer!=-1)
- skill_status_change_end(bl,SC_FREEZE,-1);
+ status_change_end(bl,SC_FREEZE,-1);
if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2==0)
- skill_status_change_end(bl,SC_STONE,-1);
+ status_change_end(bl,SC_STONE,-1);
if(sc_data[SC_SLEEP].timer!=-1)
- skill_status_change_end(bl,SC_SLEEP,-1);
+ status_change_end(bl,SC_SLEEP,-1);
}
if(bl->type==BL_MOB) {
int range = skill_get_range(skillid,skilllv);
if(range < 0)
- range = battle_get_range(src) - (range + 1);
+ range = status_get_range(src) - (range + 1);
mob_target((struct mob_data *)bl,src,range);
}
}
@@ -4594,7 +4595,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
if (sd && flag&1) {
struct block_list tbl;
int hp = sd->potion_hp * (100 + pc_checkskill(sd,CR_SLIMPITCHER)*10 + pc_checkskill(sd,AM_POTIONPITCHER)*10 + pc_checkskill(sd,AM_LEARNINGPOTION)*5)/100;
- hp = hp * (100 + (battle_get_vit(bl)<<1))/100;
+ hp = hp * (100 + (status_get_vit(bl)<<1))/100;
if (dstsd) {
hp = hp * (100 + pc_checkskill(dstsd,SM_RECOVERY)*10)/100;
}
@@ -4611,13 +4612,13 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case CR_FULLPROTECTION:
{
int i, skilltime;
- struct status_change *tsc_data = battle_get_sc_data(bl);
+ struct status_change *tsc_data = status_get_sc_data(bl);
clif_skill_nodamage(src,bl,skillid,skilllv,1);
skilltime = skill_get_time(skillid,skilllv);
for (i=0; i<4; i++) {
if(tsc_data && tsc_data[SC_STRIPWEAPON + i].timer != -1)
- skill_status_change_end(bl, SC_STRIPWEAPON + i, -1 );
- skill_status_change_start(bl,SC_CP_WEAPON + i,skilllv,0,0,0,skilltime,0 );
+ status_change_end(bl, SC_STRIPWEAPON + i, -1 );
+ status_change_start(bl,SC_CP_WEAPON + i,skilllv,0,0,0,skilltime,0 );
}
}
break;
@@ -4638,9 +4639,9 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
case ST_PRESERVE:
if (sd){
if (sd->sc_count && sd->sc_data[SC_PRESERVE].timer != -1)
- skill_status_change_end(src, SC_PRESERVE, -1 );
+ status_change_end(src, SC_PRESERVE, -1 );
else
- skill_status_change_start(src,SC_PRESERVE,skilllv,0,0,0,skill_get_time(skillid, skilllv),0 );
+ status_change_start(src,SC_PRESERVE,skilllv,0,0,0,skill_get_time(skillid, skilllv),0 );
clif_skill_nodamage(src,src,skillid,skilllv,1);
}
break;
@@ -4657,7 +4658,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
if(flag&1) {
if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
- skill_status_change_start(&dstsd->bl,SC_BATTLEORDERS,skilllv,0,0,0,0,0 );
+ status_change_start(&dstsd->bl,SC_BATTLEORDERS,skilllv,0,0,0,0,0 );
}
}
else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
@@ -4667,7 +4668,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src->m,src->x-15,src->y-15,src->x+15,src->y+15,0,
src,skillid,skilllv,tick, flag|BCT_ALL|1,
skill_castend_nodamage_id);
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
}
}
break;
@@ -4682,7 +4683,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
}
if(flag&1) {
if (dstsd && dstsd->status.guild_id == sd->status.guild_id) {
- skill_status_change_start(&dstsd->bl,SC_REGENERATION,skilllv,0,0,0,0,0 );
+ status_change_start(&dstsd->bl,SC_REGENERATION,skilllv,0,0,0,0,0 );
}
}
else if (sd && sd->status.guild_id > 0 && (g = guild_search(sd->status.guild_id)) &&
@@ -4692,7 +4693,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src->m,src->x-15,src->y-15,src->x+15,src->y+15,0,
src,skillid,skilllv,tick, flag|BCT_ALL|1,
skill_castend_nodamage_id);
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
}
}
break;
@@ -4722,7 +4723,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
src->m,src->x-15,src->y-15,src->x+15,src->y+15,0,
src,skillid,skilllv,tick, flag|BCT_ALL|1,
skill_castend_nodamage_id);
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
}
}
break;
@@ -4751,7 +4752,7 @@ int skill_castend_nodamage_id( struct block_list *src, struct block_list *bl,int
pc_setpos(dstsd, sd->mapname, sd->bl.x+dx[j], sd->bl.y+dy[j], 2);
}
}
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,skillid,0,300000,0 );
}
}
break;
@@ -4804,7 +4805,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
}
if(sd->skillid == PR_LEXAETERNA) {
- struct status_change *sc_data = battle_get_sc_data(bl);
+ struct status_change *sc_data = status_get_sc_data(bl);
if(sc_data && (sc_data[SC_FREEZE].timer != -1 || (sc_data[SC_STONE].timer != -1 && sc_data[SC_STONE].val2 == 0))) {
clif_skill_fail(sd,sd->skillid,0,0);
sd->canact_tick = tick;
@@ -4814,7 +4815,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
}
}
else if(sd->skillid == RG_BACKSTAP) {
- int dir = map_calc_dir(&sd->bl,bl->x,bl->y),t_dir = battle_get_dir(bl);
+ int dir = map_calc_dir(&sd->bl,bl->x,bl->y),t_dir = status_get_dir(bl);
int dist = distance(sd->bl.x,sd->bl.y,bl->x,bl->y);
if(bl->type != BL_SKILL && (dist == 0 || map_check_dir(dir,t_dir))) {
clif_skill_fail(sd,sd->skillid,0,0);
@@ -4837,7 +4838,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
int fail_flag = 1;
if(inf2 & 0x400 && battle_check_target(&sd->bl,bl, BCT_PARTY) > 0)
fail_flag = 0;
- if(inf2 & 0x800 && sd->status.guild_id > 0 && sd->status.guild_id == battle_get_guild_id(bl))
+ if(inf2 & 0x800 && sd->status.guild_id > 0 && sd->status.guild_id == status_get_guild_id(bl))
fail_flag = 0;
if(fail_flag) {
clif_skill_fail(sd,sd->skillid,0,0);
@@ -4850,7 +4851,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
range = skill_get_range(sd->skillid,sd->skilllv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
range += battle_config.pc_skill_add_range;
if((sd->skillid == MO_EXTREMITYFIST && sd->sc_data[SC_COMBO].timer != -1 && sd->sc_data[SC_COMBO].val1 == MO_COMBOFINISH) ||
(sd->skillid == CH_TIGERFIST && sd->sc_data[SC_COMBO].timer != -1 && sd->sc_data[SC_COMBO].val1 == MO_COMBOFINISH) ||
@@ -4893,7 +4894,7 @@ int skill_castend_id( int tid, unsigned int tick, int id,int data )
skill_castend_damage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
break;
case 1:/* 支援系 */
- if( (sd->skillid==AL_HEAL || (sd->skillid==ALL_RESURRECTION && bl->type != BL_PC) || sd->skillid==PR_ASPERSIO) && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
+ if( (sd->skillid==AL_HEAL || (sd->skillid==ALL_RESURRECTION && bl->type != BL_PC) || sd->skillid==PR_ASPERSIO) && battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
skill_castend_damage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
else
skill_castend_nodamage_id(&sd->bl,bl,sd->skillid,sd->skilllv,tick,0);
@@ -4960,7 +4961,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
x+=(src->x-x>0)?-range:range;
if(src->y!=y)
y+=(src->y-y>0)?-range:range;
- map_foreachinarea( skill_status_change_timer_sub,
+ map_foreachinarea( status_change_timer_sub,
src->m, x-range, y-range, x+range,y+range,0,
src,SC_SIGHT,tick);
}
@@ -5060,7 +5061,7 @@ int skill_castend_pos2( struct block_list *src, int x,int y,int skillid,int skil
pc_movepos(sd,x,y);
}else if( src->type==BL_MOB )
mob_warp((struct mob_data *)src,-1,x,y,0);
- skill_status_change_start(src,SC_BLOCKSKILL,skilllv,0,MO_EXTREMITYFIST,0,2000,0 );
+ status_change_start(src,SC_BLOCKSKILL,skilllv,0,MO_EXTREMITYFIST,0,2000,0 );
break;
case AM_CANNIBALIZE: // バイオプラント
if(sd){
@@ -5250,7 +5251,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
nullpo_retr(0, src);
- sc_data = battle_get_sc_data(src); // for firewall and fogwall - celest
+ sc_data = status_get_sc_data(src); // for firewall and fogwall - celest
switch(skillid){ /* 設定 */
@@ -5460,8 +5461,8 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1;
- val2 = ((battle_get_agi(src)/10)&0xffff)<<16;
- val2 |= (battle_get_luk(src)/10)&0xffff;
+ val2 = ((status_get_agi(src)/10)&0xffff)<<16;
+ val2 |= (status_get_luk(src)/10)&0xffff;
break;
case DC_HUMMING: /* ハミング */
count=49;
@@ -5470,7 +5471,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = battle_get_dex(src)/10;
+ val2 = status_get_dex(src)/10;
break;
case BA_DISSONANCE: /* 不協和音 */
@@ -5488,8 +5489,8 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_ENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = ((battle_get_str(src)/20)&0xffff)<<16;
- val2 |= (battle_get_agi(src)/10)&0xffff;
+ val2 = ((status_get_str(src)/20)&0xffff)<<16;
+ val2 |= (status_get_agi(src)/10)&0xffff;
break;
case BA_POEMBRAGI: /* ブラギの詩 */
count=49;
@@ -5498,8 +5499,8 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON);
- val2 = ((battle_get_dex(src)/10)&0xffff)<<16;
- val2 |= (battle_get_int(src)/5)&0xffff;
+ val2 = ((status_get_dex(src)/10)&0xffff)<<16;
+ val2 |= (status_get_int(src)/5)&0xffff;
break;
case BA_APPLEIDUN: /* イドゥンの林檎 */
count=49;
@@ -5510,7 +5511,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
val1 = ((pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON))&0xffff)<<16;
else
val1 = 0;
- val1 |= (battle_get_vit(src))&0xffff;
+ val1 |= (status_get_vit(src))&0xffff;
val2 = 0;//回復用タイムカウンタ(6秒?に1?加)
break;
case DC_SERVICEFORYOU: /* サ?ビスフォ?ユ? */
@@ -5520,7 +5521,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_PARTY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = battle_get_int(src)/10;
+ val2 = status_get_int(src)/10;
break;
case BA_ASSASSINCROSS: /* 夕陽のアサシンクロス */
count=49;
@@ -5529,7 +5530,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,BA_MUSICALLESSON)+1)>>1;
- val2 = battle_get_agi(src)/20;
+ val2 = status_get_agi(src)/20;
break;
case DC_FORTUNEKISS: /* 幸運のキス */
count=49;
@@ -5538,7 +5539,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
target=BCT_NOENEMY;
if(src->type == BL_PC)
val1 = (pc_checkskill((struct map_session_data *)src,DC_DANCINGLESSON)+1)>>1;
- val2 = battle_get_luk(src)/10;
+ val2 = status_get_luk(src)/10;
break;
case AM_DEMONSTRATION: /* デモンストレ?ション */
@@ -5559,7 +5560,7 @@ struct skill_unit_group *skill_unitsetting( struct block_list *src, int skillid,
range=3;
//Fix to prevent the priest from walking while Basilica is up.
battle_stopwalking(src,1);
- //skill_status_change_start(src,SC_ANKLE,skilllv,0,0,0,limit,0);
+ //status_change_start(src,SC_ANKLE,skilllv,0,0,0,limit,0);
//sd->canmove_tick = gettick() + limit; // added later [celest]
break;
@@ -5928,10 +5929,10 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
switch(sg->unit_id){
case 0x83: /* サンクチュアリ */
{
- int race=battle_get_race(bl);
- int damage_flag = (battle_check_undead(race,battle_get_elem_type(bl)) || race == 6)? 1:0;
+ int race=status_get_race(bl);
+ int damage_flag = (battle_check_undead(race,status_get_elem_type(bl)) || race == 6)? 1:0;
- if( battle_get_hp(bl)>=battle_get_max_hp(bl) && !damage_flag)
+ if( status_get_hp(bl)>=status_get_max_hp(bl) && !damage_flag)
break;
if((sg->val1--)<=0){
@@ -5955,8 +5956,8 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x84: /* マグヌスエクソシズム */
{
- int race=battle_get_race(bl);
- int damage_flag = (battle_check_undead(race,battle_get_elem_type(bl)) || race == 6)? 1:0;
+ int race=status_get_race(bl);
+ int damage_flag = (battle_check_undead(race,status_get_elem_type(bl)) || race == 6)? 1:0;
if(!damage_flag)
return 0;
@@ -5967,14 +5968,14 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x85: /* ニュ?マ */
{
struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SC_PNEUMA;
if(sc_data) {
if (sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
if(DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
ts->tick-=sg->interval;
}
}
@@ -5983,14 +5984,14 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x7e: /* セイフティウォ?ル */
{
struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SC_SAFETYWALL;
if(sc_data) {
if (sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
if(sg->val1 < unit2->group->val1 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,0,0);
ts->tick-=sg->interval;
}
}
@@ -6060,14 +6061,14 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x91: /* アンクルスネア */
{
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
if(sg->val2==0 && sc_data && sc_data[SC_ANKLE].timer==-1){
int moveblock = ( bl->x/BLOCK_SIZE != src->bl.x/BLOCK_SIZE || bl->y/BLOCK_SIZE != src->bl.y/BLOCK_SIZE);
- int sec = skill_get_time2(sg->skill_id,sg->skill_lv) - battle_get_agi(bl)/10;
- if(battle_get_mode(bl)&0x20)
+ int sec = skill_get_time2(sg->skill_id,sg->skill_lv) - status_get_agi(bl)/10;
+ if(status_get_mode(bl)&0x20)
sec = sec/5;
battle_stopwalking(bl,1);
- skill_status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
+ status_change_start(bl,SC_ANKLE,sg->skill_lv,0,0,0,sec,0);
if(moveblock) map_delblock(bl);
bl->x = src->bl.x;
@@ -6109,20 +6110,20 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x8e: /* クァグマイア */
{
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SkillStatusChangeTable[sg->skill_id];
if( bl->type==BL_PC && ((struct map_session_data *)bl)->special_state.no_magic_damage )
break;
if(sc_data && sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
}
break;
case 0x92: /* ベノムダスト */
{
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SkillStatusChangeTable[sg->skill_id];
if(sc_data && sc_data[type].timer==-1 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
}
break;
case 0x9a: /* ボルケ?ノ */
@@ -6130,14 +6131,14 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0x9c: /* バイオレントゲイル */
{
struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SkillStatusChangeTable[sg->skill_id];
if(sc_data) {
if (sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
else if((unit2=(struct skill_unit *)sc_data[type].val2) && unit2 != src ){
if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
+ status_change_start(bl,type,sg->skill_lv,(int)src,0,0,skill_get_time2(sg->skill_id,sg->skill_lv),0);
ts->tick-=sg->interval;
}
}
@@ -6164,17 +6165,17 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
// case 0xb6: /* フォグウォ?ル */
{
struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SkillStatusChangeTable[sg->skill_id];
if(sg->src_id == bl->id)
break;
if(sc_data) {
if (sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
ts->tick-=sg->interval;
}
@@ -6184,17 +6185,17 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0xaa: /* イドゥンの林檎 */
{
struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SkillStatusChangeTable[sg->skill_id];
if(sg->src_id == bl->id)
break;
if(sc_data) {
if (sc_data[type].timer==-1)
- skill_status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
+ status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
else if((unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 )
- skill_status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
+ status_change_start(bl,type,sg->skill_lv,(sg->val1)>>16,(sg->val1)&0xffff,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
ts->tick-=sg->interval;
}
@@ -6204,17 +6205,17 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
case 0xb6: /* フォグウォ?ル */
{
struct skill_unit *unit2;
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=SkillStatusChangeTable[sg->skill_id];
if(sc_data) {
if (sc_data[type].timer==-1) {
- skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
}
else if( (unit2=(struct skill_unit *)sc_data[type].val4) && unit2 != src ){
if( unit2->group && DIFF_TICK(sg->tick,unit2->group->tick)>0 ) {
- skill_status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
+ status_change_start(bl,type,sg->skill_lv,sg->val1,sg->val2,
(int)src,skill_get_time2(sg->skill_id,sg->skill_lv),0);
skill_additional_effect(ss,bl,sg->skill_id,sg->skill_lv,BF_MISC,tick);
}
@@ -6273,7 +6274,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
sd->status.guild_id == srcsd->status.guild_id &&
sd != srcsd) {
sd->state.leadership_flag = (int)src;
- pc_calcstatus (sd, 0);
+ status_calc_pc (sd, 0);
}
}
break;
@@ -6284,7 +6285,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
sd->status.guild_id == srcsd->status.guild_id &&
sd != srcsd) {
sd->state.glorywounds_flag = (int)src;
- pc_calcstatus (sd, 0);
+ status_calc_pc (sd, 0);
}
}
break;
@@ -6295,7 +6296,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
sd->status.guild_id == srcsd->status.guild_id &&
sd != srcsd) {
sd->state.soulcold_flag = (int)src;
- pc_calcstatus (sd, 0);
+ status_calc_pc (sd, 0);
}
}
break;
@@ -6306,7 +6307,7 @@ int skill_unit_onplace(struct skill_unit *src,struct block_list *bl,unsigned int
sd->status.guild_id == srcsd->status.guild_id &&
sd != srcsd) {
sd->state.hawkeyes_flag = (int)src;
- pc_calcstatus (sd, 0);
+ status_calc_pc (sd, 0);
}
}
break;
@@ -6355,14 +6356,14 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
case 0x85: /* ニュ?マ */
case 0x8e: /* クァグマイア */
{
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
int type=
(sg->unit_id==0x85)?SC_PNEUMA:
((sg->unit_id==0x7e)?SC_SAFETYWALL:
SC_QUAGMIRE);
if((type != SC_QUAGMIRE || bl->type != BL_MOB) &&
sc_data && sc_data[type].timer!=-1 && ((struct skill_unit *)sc_data[type].val2)==src){
- skill_status_change_end(bl,type,-1);
+ status_change_end(bl,type,-1);
}
} break;
@@ -6370,7 +6371,7 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
{
struct block_list *target=map_id2bl(sg->val2);
if( target && target==bl ){
- skill_status_change_end(bl,SC_ANKLE,-1);
+ status_change_end(bl,SC_ANKLE,-1);
sg->limit=DIFF_TICK(tick,sg->tick)+1000;
}
}
@@ -6380,19 +6381,19 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
{
struct block_list *target=map_id2bl(sg->val2);
if( target==bl )
- skill_status_change_end(bl,SC_SPIDERWEB,-1);
+ status_change_end(bl,SC_SPIDERWEB,-1);
sg->limit=DIFF_TICK(tick,sg->tick)+1000;
}
break;
case 0xb6:
{
struct block_list *target=map_id2bl(sg->val2);
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
if( target==bl ) {
- skill_status_change_end(bl,SC_FOGWALL,-1);
+ status_change_end(bl,SC_FOGWALL,-1);
if (sc_data && sc_data[SC_BLIND].timer!=-1)
sc_data[SC_BLIND].timer = add_timer(
- gettick() + 30000, skill_status_change_timer, bl->id, 0);
+ gettick() + 30000, status_change_timer, bl->id, 0);
}
//sg->limit=DIFF_TICK(tick,sg->tick)+1000;
}
@@ -6401,11 +6402,11 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
case 0x9b: /* デリュ?ジ */
case 0x9c: /* バイオレントゲイル */
{
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
struct skill_unit *su;
int type=SkillStatusChangeTable[sg->skill_id];
if( sc_data && sc_data[type].timer!=-1 && (su=((struct skill_unit *)sc_data[type].val2)) && su == src ){
- skill_status_change_end(bl,type,-1);
+ status_change_end(bl,type,-1);
}
}
break;
@@ -6430,11 +6431,11 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
case 0xaf: /* サ?ビスフォ?ユ? */
case 0xb4:
{
- struct status_change *sc_data=battle_get_sc_data(bl);
+ struct status_change *sc_data=status_get_sc_data(bl);
struct skill_unit *su;
int type=SkillStatusChangeTable[sg->skill_id];
if( sc_data && sc_data[type].timer!=-1 && (su=((struct skill_unit *)sc_data[type].val4)) && su == src ){
- skill_status_change_end(bl,type,-1);
+ status_change_end(bl,type,-1);
}
}
break;
@@ -6442,7 +6443,7 @@ int skill_unit_onout(struct skill_unit *src,struct block_list *bl,unsigned int t
{
struct block_list *target=map_id2bl(sg->val2);
if( target && target==bl )
- skill_status_change_end(bl,SC_SPIDERWEB,-1);
+ status_change_end(bl,SC_SPIDERWEB,-1);
sg->limit=DIFF_TICK(tick,sg->tick)+1000;
}
break;
@@ -6769,7 +6770,7 @@ int skill_castend_pos( int tid, unsigned int tick, int id,int data )
if(sd->skilllv <= 0) return 0;
range = skill_get_range(sd->skillid,sd->skilllv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
range += battle_config.pc_skill_add_range;
if(battle_config.skill_out_range_consume) { // changed to allow casting when target walks out of range [Valaris]
if(range < distance(sd->bl.x,sd->bl.y,sd->skillx,sd->skilly)) {
@@ -6905,7 +6906,7 @@ static int skill_check_condition_use_sub(struct block_list *bl,va_list ap)
if(sd != ssd && (s_class.job == 4 || s_class.job == 8 || s_class.job == 15) &&
(sd->bl.x == ssd->bl.x - 1 || sd->bl.x == ssd->bl.x + 1) && sd->status.sp >= 10){
sd->status.sp -= 10;
- pc_calcstatus(sd,0);
+ status_calc_pc(sd,0);
(*c)++;
}
break;
@@ -6930,7 +6931,7 @@ static int skill_check_condition_use_sub(struct block_list *bl,va_list ap)
){
ssd->sc_data[SC_DANCING].val4=bl->id;
clif_skill_nodamage(bl,src,skillid,skilllv,1);
- skill_status_change_start(bl,SC_DANCING,skillid,ssd->sc_data[SC_DANCING].val2,0,src->id,skill_get_time(skillid,skilllv)+1000,0);
+ status_change_start(bl,SC_DANCING,skillid,ssd->sc_data[SC_DANCING].val2,0,src->id,skill_get_time(skillid,skilllv)+1000,0);
sd->skillid_dance=sd->skillid=skillid;
sd->skilllv_dance=sd->skilllv=skilllv;
(*c)++;
@@ -7400,7 +7401,7 @@ int skill_castfix( struct block_list *bl, int time )
if(lv <= 0) return 0;
- sc_data = battle_get_sc_data(bl);
+ sc_data = status_get_sc_data(bl);
if (skill > MAX_SKILL_DB || skill < 0)
return 0;
@@ -7408,14 +7409,14 @@ int skill_castfix( struct block_list *bl, int time )
/* サフラギウム */
if(sc_data && sc_data[SC_SUFFRAGIUM].timer!=-1 )
time=time*(100-sc_data[SC_SUFFRAGIUM].val1*15)/100;
- skill_status_change_end( bl, SC_SUFFRAGIUM, -1);
+ status_change_end( bl, SC_SUFFRAGIUM, -1);
if(time==0)
return 0;
if (sd) {
if(!skill_get_castnodex(skill, lv) > 0) {
castrate=((struct map_session_data *)bl)->castrate;
- time=time*castrate*(battle_config.castrate_dex_scale - battle_get_dex(bl))/(battle_config.castrate_dex_scale * 100);
+ time=time*castrate*(battle_config.castrate_dex_scale - status_get_dex(bl))/(battle_config.castrate_dex_scale * 100);
time=time*battle_config.cast_rate/100;
}
}
@@ -7448,7 +7449,7 @@ int skill_delayfix( struct block_list *bl, int time )
if(lv <= 0) return 0;
- sc_data = battle_get_sc_data(bl);
+ sc_data = status_get_sc_data(bl);
if(sd) {
delayrate=((struct map_session_data *)bl)->delayrate;
@@ -7456,15 +7457,15 @@ int skill_delayfix( struct block_list *bl, int time )
// instant cast attack skills depend on aspd as delay [celest]
if (time == 0) {
if (skill_db[skill].skill_type == BF_WEAPON)
- time = battle_get_adelay (bl)/2;
+ time = status_get_adelay (bl)/2;
else
time = 300; // default delay, according to official servers
} else if (time < 0)
- time = abs(time) + battle_get_adelay (bl)/2; // if set to <0, the aspd delay will be added
+ time = abs(time) + status_get_adelay (bl)/2; // if set to <0, the aspd delay will be added
if(battle_config.delay_dependon_dex && /* dexの影響を計算する */
!skill_get_delaynodex(skill, lv)) // if skill casttime is allowed to be reduced by dex
- time = time * (battle_config.castrate_dex_scale - battle_get_dex(bl)) / (battle_config.castrate_dex_scale);
+ time = time * (battle_config.castrate_dex_scale - status_get_dex(bl)) / (battle_config.castrate_dex_scale);
time = time * delayrate * battle_config.delay_rate / 10000;
@@ -7552,7 +7553,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
struct skill_unit_group *sg;
// if caster is the owner of basilica
if ((sg = su->group) && sg->src_id == sd->bl.id) {
- // skill_status_change_end(&sd->bl,SC_BASILICA,-1);
+ // status_change_end(&sd->bl,SC_BASILICA,-1);
// skill_delunitgroup (sg);
if (skill_num != HP_BASILICA) return 0;
} // otherwise...
@@ -7669,7 +7670,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
/* 射程と障害物チェック */
range = skill_get_range(skill_num,skill_lv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
// be lenient if the skill was cast before we have moved to the correct position [Celest]
if (sd->walktimer != -1)
range += battle_config.skill_range_leniency;
@@ -7706,11 +7707,11 @@ int skill_use_id( struct map_session_data *sd, int target_id,
switch(skill_num){ /* 何か特殊な?理が必要 */
// case AL_HEAL: /* ヒ?ル */
-// if(battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl)))
+// if(battle_check_undead(status_get_race(bl),status_get_elem_type(bl)))
// forcecast=1; /* ヒ?ルアタックなら詠唱エフェクト有り */
// break;
case ALL_RESURRECTION: /* リザレクション */
- if(bl->type != BL_PC && battle_check_undead(battle_get_race(bl),battle_get_elem_type(bl))){ /* 敵がアンデッドなら */
+ if(bl->type != BL_PC && battle_check_undead(status_get_race(bl),status_get_elem_type(bl))){ /* 敵がアンデッドなら */
forcecast=1; /* タ?ンアンデットと同じ詠唱時間 */
casttime=skill_castfix(&sd->bl, skill_get_cast(PR_TURNUNDEAD,skill_lv) );
}
@@ -7759,7 +7760,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
//rangeをもう1回?査
range = skill_get_range(skill_num,skill_lv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
if(!battle_check_range(&sd->bl,&p_sd->bl,range))
return 0;
}
@@ -7767,7 +7768,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
// removed on 12/14's patch [celest]
//case AS_SPLASHER: /* ベナムスプラッシャ? */
/* {
- struct status_change *t_sc_data = battle_get_sc_data(bl);
+ struct status_change *t_sc_data = status_get_sc_data(bl);
if(t_sc_data && t_sc_data[SC_POISON].timer==-1){
clif_skill_fail(sd,skill_num,0,10);
return 0;
@@ -7792,7 +7793,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
if(sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0){
casttime = casttime/2;
if((--sc_data[SC_MEMORIZE].val2)<=0)
- skill_status_change_end(&sd->bl, SC_MEMORIZE, -1);
+ status_change_end(&sd->bl, SC_MEMORIZE, -1);
}
if(battle_config.pc_skill_log)
@@ -7824,7 +7825,7 @@ int skill_use_id( struct map_session_data *sd, int target_id,
sd->canact_tick = tick + casttime + delay;
sd->canmove_tick = tick;
if(!(battle_config.pc_cloak_check_type&2) && sc_data && sc_data[SC_CLOAKING].timer != -1 && sd->skillid != AS_CLOAKING)
- skill_status_change_end(&sd->bl,SC_CLOAKING,-1);
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
if(casttime > 0) {
sd->skilltimer = add_timer( tick+casttime, skill_castend_id, sd->bl.id, 0 );
if((skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
@@ -7893,7 +7894,7 @@ int skill_use_pos( struct map_session_data *sd,
struct skill_unit_group *sg;
// if caster is the owner of basilica
if ((sg = su->group) && sg->src_id == sd->bl.id) {
- // skill_status_change_end(&sd->bl,SC_BASILICA,-1);
+ // status_change_end(&sd->bl,SC_BASILICA,-1);
// skill_delunitgroup (sg);
if (skill_num != HP_BASILICA) return 0;
} // otherwise...
@@ -7926,7 +7927,7 @@ int skill_use_pos( struct map_session_data *sd,
bl.y = skill_y;
range = skill_get_range(skill_num,skill_lv);
if(range < 0)
- range = battle_get_range(&sd->bl) - (range + 1);
+ range = status_get_range(&sd->bl) - (range + 1);
// be lenient if the skill was cast before we have moved to the correct position [Celest]
if (sd->walktimer != -1)
range += battle_config.skill_range_leniency;
@@ -7948,7 +7949,7 @@ int skill_use_pos( struct map_session_data *sd,
if(sc_data && sc_data[SC_MEMORIZE].timer != -1 && casttime > 0){
casttime = casttime/3;
if((--sc_data[SC_MEMORIZE].val2)<=0)
- skill_status_change_end(&sd->bl, SC_MEMORIZE, -1);
+ status_change_end(&sd->bl, SC_MEMORIZE, -1);
}
if( casttime>0 ) /* 詠唱が必要 */
@@ -7964,7 +7965,7 @@ int skill_use_pos( struct map_session_data *sd,
sd->canact_tick = tick + casttime + delay;
sd->canmove_tick = tick;
if(!(battle_config.pc_cloak_check_type&2) && sc_data && sc_data[SC_CLOAKING].timer != -1)
- skill_status_change_end(&sd->bl,SC_CLOAKING,-1);
+ status_change_end(&sd->bl,SC_CLOAKING,-1);
if(casttime > 0) {
sd->skilltimer = add_timer( tick+casttime, skill_castend_pos, sd->bl.id, 0 );
if((skill = pc_checkskill(sd,SA_FREECAST)) > 0) {
@@ -7981,7 +7982,7 @@ int skill_use_pos( struct map_session_data *sd,
}
//マジックパワ?の?果終了
if(sc_data && sc_data[SC_MAGICPOWER].timer != -1 && skill_num != HW_MAGICPOWER)
- skill_status_change_end(&sd->bl,SC_MAGICPOWER,-1);
+ status_change_end(&sd->bl,SC_MAGICPOWER,-1);
return 0;
}
@@ -8246,7 +8247,7 @@ void skill_devotion_end(struct map_session_data *md,struct map_session_data *sd,
md->dev.val1[target]=md->dev.val2[target]=0;
if(sd && sd->sc_data){
- // skill_status_change_end(sd->bl,SC_DEVOTION,-1);
+ // status_change_end(sd->bl,SC_DEVOTION,-1);
sd->sc_data[SC_DEVOTION].val1=0;
sd->sc_data[SC_DEVOTION].val2=0;
clif_status_change(&sd->bl,SC_DEVOTION,0);
@@ -8288,7 +8289,7 @@ int skill_autospell(struct map_session_data *sd,int skillid)
if(maxlv > (lv=pc_checkskill(sd,skillid)))
maxlv = lv;
- skill_status_change_start(&sd->bl,SC_AUTOSPELL,skilllv,skillid,maxlv,0, // val1:スキルID val2:使用最大Lv
+ status_change_start(&sd->bl,SC_AUTOSPELL,skilllv,skillid,maxlv,0, // val1:スキルID val2:使用最大Lv
skill_get_time(SA_AUTOSPELL,skilllv),0);// にしてみたけどbscriptが書き易い????
return 0;
}
@@ -8664,994 +8665,6 @@ int skill_trap_splash(struct block_list *bl, va_list ap )
return 0;
}
-/*----------------------------------------------------------------------------
- * ステ?タス異常
- *----------------------------------------------------------------------------
- */
-
-/*==========================================
- * ステ?タス異常タイマ?範??理
- *------------------------------------------
- */
-int skill_status_change_timer_sub(struct block_list *bl, va_list ap )
-{
- struct block_list *src;
- int type;
- unsigned int tick;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, ap);
- nullpo_retr(0, src=va_arg(ap,struct block_list*));
- type=va_arg(ap,int);
- tick=va_arg(ap,unsigned int);
-
- if(bl->type!=BL_PC && bl->type!=BL_MOB)
- return 0;
-
- switch( type ){
- case SC_SIGHT: /* サイト */
- case SC_CONCENTRATE:
- if( (*battle_get_option(bl))&6 ){
- skill_status_change_end( bl, SC_HIDING, -1);
- skill_status_change_end( bl, SC_CLOAKING, -1);
- }
- break;
- case SC_RUWACH: /* ルアフ */
- if( (*battle_get_option(bl))&6 ){
- if(battle_check_target( src,bl, BCT_ENEMY ) > 0) {
- struct status_change *sc_data = battle_get_sc_data(bl); // check whether the target is hiding/cloaking [celest]
- if (sc_data && (sc_data[SC_HIDING].timer != -1 || // if the target is using a special hiding, i.e not using normal hiding/cloaking, don't bother
- sc_data[SC_CLOAKING].timer != -1)) {
- skill_status_change_end( bl, SC_HIDING, -1);
- skill_status_change_end( bl, SC_CLOAKING, -1);
- skill_attack(BF_MAGIC,src,src,bl,AL_RUWACH,sc_data[type].val1,tick,0);
- }
- }
- }
- break;
- }
- return 0;
-}
-
-/*==========================================
- * ステ?タス異常終了
- *------------------------------------------
- */
-int skill_status_change_end(struct block_list* bl, int type, int tid)
-{
- struct status_change* sc_data;
- int opt_flag=0, calc_flag = 0;
- short *sc_count, *option, *opt1, *opt2, *opt3;
-
- nullpo_retr(0, bl);
- if(bl->type!=BL_PC && bl->type!=BL_MOB) {
- if(battle_config.error_log)
- printf("skill_status_change_end: neither MOB nor PC !\n");
- return 0;
- }
- nullpo_retr(0, sc_data = battle_get_sc_data(bl));
- nullpo_retr(0, sc_count = battle_get_sc_count(bl));
- nullpo_retr(0, option = battle_get_option(bl));
- nullpo_retr(0, opt1 = battle_get_opt1(bl));
- nullpo_retr(0, opt2 = battle_get_opt2(bl));
- nullpo_retr(0, opt3 = battle_get_opt3(bl));
-
- if ((*sc_count) > 0 && sc_data[type].timer != -1 && (sc_data[type].timer == tid || tid == -1)) {
-
- if (tid == -1) // タイマから呼ばれていないならタイマ削除をする
- delete_timer(sc_data[type].timer,skill_status_change_timer);
-
- /* 該?の異常を正常に?す */
- sc_data[type].timer=-1;
- (*sc_count)--;
-
- switch(type){ /* 異常の種類ごとの?理 */
- case SC_PROVOKE: /* プロボック */
- case SC_ENDURE: // celest
- case SC_CONCENTRATE: /* 集中力向上 */
- case SC_BLESSING: /* ブレッシング */
- case SC_ANGELUS: /* アンゼルス */
- case SC_INCREASEAGI: /* 速度上昇 */
- case SC_DECREASEAGI: /* 速度減少 */
- case SC_SIGNUMCRUCIS: /* シグナムクルシス */
- case SC_HIDING:
- case SC_TWOHANDQUICKEN: /* 2HQ */
- case SC_ADRENALINE: /* アドレナリンラッシュ */
- case SC_ENCPOISON: /* エンチャントポイズン */
- case SC_IMPOSITIO: /* インポシティオマヌス */
- case SC_GLORIA: /* グロリア */
- case SC_LOUD: /* ラウドボイス */
- case SC_QUAGMIRE: /* クァグマイア */
- case SC_PROVIDENCE: /* プロヴィデンス */
- case SC_SPEARSQUICKEN: /* スピアクイッケン */
- case SC_VOLCANO:
- case SC_DELUGE:
- case SC_VIOLENTGALE:
- case SC_ETERNALCHAOS: /* エタ?ナルカオス */
- case SC_DRUMBATTLE: /* ?太鼓の響き */
- case SC_NIBELUNGEN: /* ニ?ベルングの指輪 */
- case SC_SIEGFRIED: /* 不死身のジ?クフリ?ド */
- case SC_WHISTLE: /* 口笛 */
- case SC_ASSNCROS: /* 夕陽のアサシンクロス */
- case SC_HUMMING: /* ハミング */
- case SC_DONTFORGETME: /* 私を忘れないで */
- case SC_FORTUNE: /* 幸運のキス */
- case SC_SERVICE4U: /* サ?ビスフォ?ユ? */
- case SC_EXPLOSIONSPIRITS: // 爆裂波動
- case SC_STEELBODY: // 金剛
- case SC_DEFENDER:
- case SC_SPEEDPOTION0: /* ?速ポ?ション */
- case SC_SPEEDPOTION1:
- case SC_SPEEDPOTION2:
- case SC_SPEEDPOTION3:
- case SC_APPLEIDUN: /* イドゥンの林檎 */
- case SC_RIDING:
- case SC_BLADESTOP_WAIT:
- case SC_AURABLADE: /* オ?ラブレ?ド */
- case SC_PARRYING: /* パリイング */
- case SC_CONCENTRATION: /* コンセントレ?ション */
- case SC_TENSIONRELAX: /* テンションリラックス */
- case SC_ASSUMPTIO: /* アシャンプティオ */
- case SC_WINDWALK: /* ウインドウォ?ク */
- case SC_TRUESIGHT: /* トゥル?サイト */
- case SC_SPIDERWEB: /* スパイダ?ウェッブ */
- case SC_MAGICPOWER: /* 魔法力?幅 */
- case SC_CHASEWALK:
- case SC_ATKPOT: /* attack potion [Valaris] */
- case SC_MATKPOT: /* magic attack potion [Valaris] */
- case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
- case SC_MELTDOWN: /* メルトダウン */
- // Celest
- case SC_EDP:
- case SC_SLOWDOWN:
- case SC_SPEEDUP0:
-/* case SC_LEADERSHIP:
- case SC_GLORYWOUNDS:
- case SC_SOULCOLD:
- case SC_HAWKEYES:*/
- case SC_BATTLEORDERS:
- case SC_REGENERATION:
- calc_flag = 1;
- break;
- case SC_AUTOBERSERK:
- if (sc_data[SC_PROVOKE].timer != -1)
- skill_status_change_end(bl,SC_PROVOKE,-1);
- break;
- case SC_BERSERK: /* バ?サ?ク */
- calc_flag = 1;
- clif_status_change(bl,SC_INCREASEAGI,0); /* アイコン消去 */
- break;
- case SC_DEVOTION: /* ディボ?ション */
- {
- struct map_session_data *md = map_id2sd(sc_data[type].val1);
- sc_data[type].val1=sc_data[type].val2=0;
- skill_devotion(md,bl->id);
- calc_flag = 1;
- }
- break;
- case SC_BLADESTOP:
- {
- struct status_change *t_sc_data = battle_get_sc_data((struct block_list *)sc_data[type].val4);
- //片方が切れたので相手の白刃?態が切れてないのなら解除
- if(t_sc_data && t_sc_data[SC_BLADESTOP].timer!=-1)
- skill_status_change_end((struct block_list *)sc_data[type].val4,SC_BLADESTOP,-1);
-
- if(sc_data[type].val2==2)
- clif_bladestop((struct block_list *)sc_data[type].val3,(struct block_list *)sc_data[type].val4,0);
- }
- break;
- case SC_DANCING:
- {
- struct map_session_data *dsd;
- struct status_change *d_sc_data;
- if(sc_data[type].val4 && (dsd=map_id2sd(sc_data[type].val4))){
- d_sc_data = dsd->sc_data;
- //合奏で相手がいる場合相手のval4を0にする
- if(d_sc_data && d_sc_data[type].timer!=-1)
- d_sc_data[type].val4=0;
- }
- }
- calc_flag = 1;
- break;
- case SC_GRAFFITI:
- {
- struct skill_unit_group *sg=(struct skill_unit_group *)sc_data[type].val4; //val4がグラフィティのgroup_id
- if(sg)
- skill_delunitgroup(sg);
- }
- break;
- case SC_NOCHAT: //チャット禁止?態
- {
- struct map_session_data *sd=NULL;
- if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){
- if (sd->status.manner >= 0) // weeee ^^ [celest]
- sd->status.manner = 0;
- clif_updatestatus(sd,SP_MANNER);
- }
- }
- break;
- case SC_SPLASHER: /* ベナムスプラッシャ? */
- {
- struct block_list *src=map_id2bl(sc_data[type].val3);
- if(src && tid!=-1){
- //自分にダメ?ジ&周?3*3にダメ?ジ
- skill_castend_damage_id(src, bl,sc_data[type].val2,sc_data[type].val1,gettick(),0 );
- }
- }
- break;
- case SC_SELFDESTRUCTION: /* 自爆 */
- {
- //自分のダメ?ジは0にして
- struct mob_data *md=NULL;
- if(bl->type == BL_MOB && (md=(struct mob_data*)bl))
- skill_castend_damage_id(bl, bl,sc_data[type].val2,sc_data[type].val1,gettick(),0 );
- }
- break;
- /* option1 */
- case SC_FREEZE:
- sc_data[type].val3 = 0;
- break;
-
- /* option2 */
- case SC_POISON: /* 毒 */
- case SC_BLIND: /* 暗? */
- case SC_CURSE:
- calc_flag = 1;
- break;
-
- // celest
- case SC_CONFUSION:
- {
- struct map_session_data *sd=NULL;
- if(bl->type == BL_PC && (sd=(struct map_session_data *)bl)){
- sd->next_walktime = -1;
- }
- }
- break;
-
- case SC_MARIONETTE: /* マリオネットコントロ?ル */
- case SC_MARIONETTE2: /// Marionette target
- {
- // check for partner and end their marionette status as well
- int type2 = (type == SC_MARIONETTE) ? SC_MARIONETTE2 : SC_MARIONETTE;
- struct block_list *pbl = map_id2bl(sc_data[type].val3);
- if (pbl) {
- struct status_change* sc_data;
- if (*battle_get_sc_count(pbl) > 0 &&
- (sc_data = battle_get_sc_data(pbl)) &&
- sc_data[type2].timer != -1)
- skill_status_change_end(pbl, type2, -1);
- }
- calc_flag = 1;
- }
- break;
- }
-
- if(bl->type==BL_PC &&
- (type<SC_SENDMAX || type==SC_PRESERVE || type==SC_BATTLEORDERS))
- clif_status_change(bl,type,0); /* アイコン消去 */
-
- switch(type){ /* 正常に?るときなにか?理が必要 */
- case SC_STONE:
- case SC_FREEZE:
- case SC_STAN:
- case SC_SLEEP:
- *opt1 = 0;
- opt_flag = 1;
- break;
-
- case SC_POISON:
- if (sc_data[SC_DPOISON].timer != -1) //
- break; // DPOISON用のオプション
- *opt2 &= ~1; // が?用に用意された場合には
- opt_flag = 1; // ここは削除する
- break; //
- case SC_CURSE:
- case SC_SILENCE:
- case SC_BLIND:
- *opt2 &= ~(1<<(type-SC_POISON));
- opt_flag = 1;
- break;
- case SC_DPOISON:
- if (sc_data[SC_POISON].timer != -1) // DPOISON用のオプションが
- break; // 用意されたら削除
- *opt2 &= ~1; // 毒?態解除
- opt_flag = 1;
- break;
- case SC_SIGNUMCRUCIS:
- *opt2 &= ~0x40;
- opt_flag = 1;
- break;
-
- case SC_HIDING:
- case SC_CLOAKING:
- *option &= ~((type == SC_HIDING) ? 2 : 4);
- calc_flag = 1; // orn
- opt_flag = 1 ;
- break;
-
- case SC_CHASEWALK:
- *option &= ~16388;
- opt_flag = 1 ;
- break;
-
- case SC_SIGHT:
- *option &= ~1;
- opt_flag = 1;
- break;
- case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
- *option &= ~4096;
- opt_flag = 1;
- break;
- case SC_RUWACH:
- *option &= ~8192;
- opt_flag = 1;
- break;
-
- //opt3
- case SC_TWOHANDQUICKEN: /* 2HQ */
- case SC_SPEARSQUICKEN: /* スピアクイッケン */
- case SC_CONCENTRATION: /* コンセントレ?ション */
- *opt3 &= ~1;
- break;
- case SC_OVERTHRUST: /* オ?バ?スラスト */
- *opt3 &= ~2;
- break;
- case SC_ENERGYCOAT: /* エナジ?コ?ト */
- *opt3 &= ~4;
- break;
- case SC_EXPLOSIONSPIRITS: // 爆裂波動
- *opt3 &= ~8;
- break;
- case SC_STEELBODY: // 金剛
- *opt3 &= ~16;
- break;
- case SC_BLADESTOP: /* 白刃取り */
- *opt3 &= ~32;
- break;
- case SC_BERSERK: /* バ?サ?ク */
- *opt3 &= ~128;
- break;
- case SC_MARIONETTE: /* マリオネットコントロ?ル */
- case SC_MARIONETTE2:
- *opt3 &= ~1024;
- break;
- case SC_ASSUMPTIO: /* アスムプティオ */
- *opt3 &= ~2048;
- break;
- }
-
- if (night_flag == 1 && (*opt2 & STATE_BLIND) == 0 && bl->type == BL_PC && // by [Yor]
- !map[bl->m].flag.indoors && battle_config.night_darkness_level <= 0) { // [celest]
- *opt2 |= STATE_BLIND;
- opt_flag = 1;
- }
-
- if(opt_flag) /* optionの?更を?える */
- clif_changeoption(bl);
-
- if (bl->type == BL_PC && calc_flag)
- pc_calcstatus((struct map_session_data *)bl,0); /* ステ?タス再計算 */
- }
-
- return 0;
-}
-/*==========================================
- * ステ?タス異常終了タイマ?
- *------------------------------------------
- */
-int skill_status_change_timer(int tid, unsigned int tick, int id, int data)
-{
- int type=data;
- struct block_list *bl;
- struct map_session_data *sd=NULL;
- struct status_change *sc_data;
- //short *sc_count; //使ってない?
-
- nullpo_retr(0, bl=map_id2bl(id));
- nullpo_retr(0, sc_data=battle_get_sc_data(bl));
-
- if(bl->type==BL_PC)
- nullpo_retr(0, sd=(struct map_session_data *)bl);
-
- //sc_count=battle_get_sc_count(bl); //使ってない?
-
- if(sc_data[type].timer != tid) {
- if(battle_config.error_log)
- printf("skill_status_change_timer %d != %d\n",tid,sc_data[type].timer);
- return 0;
- }
-
- switch(type){ /* 特殊な?理になる場合 */
- case SC_MAXIMIZEPOWER: /* マキシマイズパワ? */
- case SC_CLOAKING:
- if(sd){
- if( sd->status.sp > 0 ){ /* SP切れるまで持? */
- sd->status.sp--;
- clif_updatestatus(sd,SP_SP);
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- sc_data[type].val2+tick, skill_status_change_timer, bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_CHASEWALK:
- if(sd){
- int sp = 10+sc_data[SC_CHASEWALK].val1*2;
- if (map[sd->bl.m].flag.gvg) sp *= 5;
- if( sd->status.sp > sp){
- sd->status.sp -= sp; // update sp cost [Celest]
- clif_updatestatus(sd,SP_SP);
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- sc_data[type].val2+tick, skill_status_change_timer, bl->id, data);
- sc_data[SC_CHASEWALK].val4++;
- if (sc_data[SC_CHASEWALK].val4 > 3)
- sc_data[SC_CHASEWALK].val4 = 0;
- pc_calcstatus (sd, 0);
- return 0;
- }
- }
- break;
-
- case SC_HIDING: /* ハイディング */
- if(sd){ /* SPがあって、時間制限の間は持? */
- if( sd->status.sp > 0 && (--sc_data[type].val2)>0 ){
- if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
- sd->status.sp--;
- clif_updatestatus(sd,SP_SP);
- }
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- 1000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_SIGHT: /* サイト */
- case SC_RUWACH: /* ルアフ */
- {
- int range = 5;
- if ( type == SC_SIGHT ) range = 7;
- map_foreachinarea( skill_status_change_timer_sub,
- bl->m, bl->x-range, bl->y-range, bl->x+range,bl->y+range,0,
- bl,type,tick);
-
- if( (--sc_data[type].val2)>0 ){
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- 250+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_SIGNUMCRUCIS: /* シグナムクルシス */
- {
- int race = battle_get_race(bl);
- if(race == 6 || battle_check_undead(race,battle_get_elem_type(bl))) {
- sc_data[type].timer=add_timer(1000*600+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- }
- break;
-
- case SC_PROVOKE: /* プロボック/オ?トバ?サ?ク */
- if(sc_data[type].val2!=0){ /* オ?トバ?サ?ク(1秒ごとにHPチェック) */
- if(sd && sd->status.hp>sd->status.max_hp>>2) /* 停止 */
- break;
- sc_data[type].timer=add_timer( 1000+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
-
- case SC_WATERBALL: /* ウォ?タ?ボ?ル */
- {
- struct block_list *target=map_id2bl(sc_data[type].val2);
- nullpo_retb(target);
- nullpo_retb(target->prev);
- skill_attack(BF_MAGIC,bl,bl,target,WZ_WATERBALL,sc_data[type].val1,tick,0);
- if((--sc_data[type].val3)>0) {
- sc_data[type].timer=add_timer( 150+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- }
- break;
-
- case SC_ENDURE: /* インデュア */
- case SC_AUTOBERSERK: // Celest
- if(sd && sd->special_state.infinite_endure) {
-#ifdef TWILIGHT
- sc_data[type].timer=add_timer( 1000*600+tick,skill_status_change_timer, bl->id, data );
-#else
- sc_data[type].timer=add_timer( 1000*60+tick,skill_status_change_timer, bl->id, data );
-#endif
- //sc_data[type].val2=1;
- return 0;
- }
- break;
-
- case SC_DISSONANCE: /* 不協和音 */
- if( (--sc_data[type].val2)>0){
- struct skill_unit *unit=
- (struct skill_unit *)sc_data[type].val4;
- struct block_list *src;
- /*if(!unit || !unit->group)
- break;
- src=map_id2bl(unit->group->src_id);
- if(!src)
- break;*/
- nullpo_retb(unit);
- nullpo_retb(unit->group);
- nullpo_retr(0, src=map_id2bl(unit->group->src_id));
- skill_attack(BF_MISC,src,&unit->bl,bl,unit->group->skill_id,sc_data[type].val1,tick,0);
- sc_data[type].timer=add_timer(skill_get_time2(unit->group->skill_id,unit->group->skill_lv)+tick,
- skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
-
- case SC_LULLABY: /* 子守唄 */
- if( (--sc_data[type].val2)>0){
- struct skill_unit *unit=
- (struct skill_unit *)sc_data[type].val4;
- nullpo_retb(unit);
- nullpo_retb(unit->group);
- if(unit->group->src_id == bl->id)
- break;
- skill_additional_effect(bl,bl,unit->group->skill_id,sc_data[type].val1,BF_LONG|BF_SKILL|BF_MISC,tick);
- if (unit->group != 0)
- sc_data[type].timer=add_timer(skill_get_time(unit->group->skill_id,unit->group->skill_lv)/10+tick,
- skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
-
- case SC_STONE:
- if(sc_data[type].val2 != 0) {
- short *opt1 = battle_get_opt1(bl);
- sc_data[type].val2 = 0;
- sc_data[type].val4 = 0;
- battle_stopwalking(bl,1);
- if(opt1) {
- *opt1 = 1;
- clif_changeoption(bl);
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- else if( (--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if((++sc_data[type].val4)%5 == 0 && battle_get_hp(bl) > hp>>2) {
- hp = hp/100;
- if(hp < 1) hp = 1;
- if(sd)
- pc_heal(sd,-hp,0);
- else if(bl->type == BL_MOB){
- struct mob_data *md;
- if((md=((struct mob_data *)bl)) == NULL)
- break;
- md->hp -= hp;
- }
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- return 0;
- }
- break;
- case SC_POISON:
- if(sc_data[SC_SLOWPOISON].timer == -1) {
- if( (--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if(battle_get_hp(bl) > hp>>2) {
- if(bl->type == BL_PC) {
- hp = 3 + hp*3/200;
- pc_heal((struct map_session_data *)bl,-hp,0);
- }
- else if(bl->type == BL_MOB) {
- struct mob_data *md;
- nullpo_retr(0, md=(struct mob_data *)bl);
- /*if((md=((struct mob_data *)bl)) == NULL)
- break;*/
- hp = 3 + hp/200;
- md->hp -= hp;
- }
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- }
- }
- else
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- break;
- case SC_DPOISON:
- if (sc_data[SC_SLOWPOISON].timer == -1 && (--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if (battle_get_hp(bl) > hp>>2) {
- if(sd) {
- hp = 3 + hp/50;
- pc_heal(sd, -hp, 0);
- } else if (bl->type == BL_MOB) {
- struct mob_data *md;
- nullpo_retr(0, md=(struct mob_data *)bl);
- /*if ((md=((struct mob_data *)bl)) == NULL)
- break;*/
- hp = 3 + hp/100;
- md->hp -= hp;
- }
- }
- }
- if (sc_data[type].val3 > 0)
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- break;
-
- case SC_TENSIONRELAX: /* テンションリラックス */
- if(sd){ /* SPがあって、HPが?タンでなければ?? */
- if( sd->status.sp > 12 && sd->status.max_hp > sd->status.hp ){
-/* if(sc_data[type].val2 % (sc_data[type].val1+3) ==0 ){
- sd->status.sp -= 12;
- clif_updatestatus(sd,SP_SP);
- } */
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- 10000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- if(sd->status.max_hp <= sd->status.hp)
- skill_status_change_end(&sd->bl,SC_TENSIONRELAX,-1);
- }
- break;
- case SC_HEADCRUSH: // temporary damage [celest]
-// case SC_BLEEDING:
- if((--sc_data[type].val3) > 0) {
- int hp = battle_get_max_hp(bl);
- if(sd) {
- hp = 3 + hp*3/200;
- pc_heal(sd,-hp,0);
- }
- else if(bl->type == BL_MOB) {
- struct mob_data *md;
- nullpo_retr(0, md=(struct mob_data *)bl);
- /*if((md=((struct mob_data *)bl)) == NULL)
- break;*/
- hp = 3 + hp/200;
- md->hp -= hp;
- }
- sc_data[type].timer=add_timer(1000+tick,skill_status_change_timer, bl->id, data );
- }
- break;
-
- /* 時間切れ無し?? */
- case SC_AETERNA:
- case SC_TRICKDEAD:
- case SC_RIDING:
- case SC_FALCON:
- case SC_WEIGHT50:
- case SC_WEIGHT90:
- case SC_MAGICPOWER: /* 魔法力?幅 */
- case SC_REJECTSWORD: /* リジェクトソ?ド */
- case SC_MEMORIZE: /* メモライズ */
- case SC_BROKNWEAPON:
- case SC_BROKNARMOR:
- case SC_SACRIFICE:
-// if(sc_data[type].timer==tid)
- sc_data[type].timer=add_timer( 1000*600+tick,skill_status_change_timer, bl->id, data );
- return 0;
-
- case SC_DANCING: //ダンススキルの時間SP消費
- {
- int s=0;
- if(sd){
- if(sd->status.sp > 0 && (--sc_data[type].val3)>0){
- switch(sc_data[type].val1){
- case BD_RICHMANKIM: /* ニヨルドの宴 3秒にSP1 */
- case BD_DRUMBATTLEFIELD: /* ?太鼓の響き 3秒にSP1 */
- case BD_RINGNIBELUNGEN: /* ニ?ベルングの指輪 3秒にSP1 */
- case BD_SIEGFRIED: /* 不死身のジ?クフリ?ド 3秒にSP1 */
- case BA_DISSONANCE: /* 不協和音 3秒でSP1 */
- case BA_ASSASSINCROSS: /* 夕陽のアサシンクロス 3秒でSP1 */
- case DC_UGLYDANCE: /* 自分勝手なダンス 3秒でSP1 */
- s=3;
- break;
- case BD_LULLABY: /* 子守歌 4秒にSP1 */
- case BD_ETERNALCHAOS: /* 永遠の混沌 4秒にSP1 */
- case BD_ROKISWEIL: /* ロキの叫び 4秒にSP1 */
- case DC_FORTUNEKISS: /* 幸運のキス 4秒でSP1 */
- s=4;
- break;
- case BD_INTOABYSS: /* 深淵の中に 5秒にSP1 */
- case BA_WHISTLE: /* 口笛 5秒でSP1 */
- case DC_HUMMING: /* ハミング 5秒でSP1 */
- case BA_POEMBRAGI: /* ブラギの詩 5秒でSP1 */
- case DC_SERVICEFORYOU: /* サ?ビスフォ?ユ? 5秒でSP1 */
- s=5;
- break;
- case BA_APPLEIDUN: /* イドゥンの林檎 6秒でSP1 */
- s=6;
- break;
- case DC_DONTFORGETME: /* 私を忘れないで… 10秒でSP1 */
- case CG_MOONLIT: /* 月明りの泉に落ちる花びら 10秒でSP1? */
- s=10;
- break;
- }
- if(s && ((sc_data[type].val3 % s) == 0)){
- sd->status.sp--;
- clif_updatestatus(sd,SP_SP);
- }
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- 1000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- }
- break;
- case SC_BERSERK: /* バ?サ?ク */
- if(sd){ /* HPが100以上なら?? */
- if( (sd->status.hp - sd->status.max_hp*5/100) > 100 ){ // 5% every 10 seconds [DracoRPG]
- sd->status.hp -= sd->status.max_hp*5/100; // changed to max hp [celest]
- clif_updatestatus(sd,SP_HP);
- sc_data[type].timer = add_timer( /* タイマ?再設定 */
- 10000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
- if(sd){
- time_t timer;
- if(time(&timer) < ((sc_data[type].val2) + 3600)){ //1時間たっていないので??
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- 10000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_NOCHAT: //チャット禁止?態
- if(sd && battle_config.muting_players){
- time_t timer;
- if((++sd->status.manner) && time(&timer) < ((sc_data[type].val2) + 60*(0-sd->status.manner))){ //開始からstatus.manner分?ってないので??
- clif_updatestatus(sd,SP_MANNER);
- sc_data[type].timer=add_timer( /* タイマ?再設定(60秒) */
- 60000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
- case SC_SELFDESTRUCTION: /* 自爆 */
- if(--sc_data[type].val3>0){
- struct mob_data *md;
- if(bl->type==BL_MOB && (md=(struct mob_data *)bl) && md->speed > 250){
- md->speed -= 250;
- md->next_walktime=tick;
- }
- sc_data[type].timer=add_timer( /* タイマ?再設定 */
- 1000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- break;
-
- case SC_SPLASHER:
- if (sc_data[type].val4 % 1000 == 0) {
- char timer[2];
- sprintf (timer, "%d", sc_data[type].val4/1000);
- clif_message(bl, timer);
- }
- if((sc_data[type].val4 -= 500) > 0) {
- sc_data[type].timer = add_timer(
- 500 + tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- break;
-
- case SC_MARIONETTE: /* マリオネットコントロ?ル */
- case SC_MARIONETTE2:
- {
- struct block_list *pbl = map_id2bl(sc_data[type].val3);
- if (pbl && battle_check_range(bl, pbl, 7) &&
- (sc_data[type].val2 -= 1000)>0) {
- sc_data[type].timer = add_timer(
- 1000 + tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
-
-/* case SC_LEADERSHIP:
- case SC_GLORYWOUNDS:
- case SC_SOULCOLD:
- case SC_HAWKEYES:
- if (sd) {
- sc_data[type].timer = add_timer(
- 1000+tick, skill_status_change_timer,
- bl->id, data);
- }
- break;*/
-
- // Celest
- case SC_CONFUSION:
- {
- int i = 3000;
- //struct mob_data *md;
- if (sd) {
- pc_randomwalk (sd, gettick());
- sd->next_walktime = tick + (i=1000 + rand()%1000);
- } /*else if (bl->type==BL_MOB && (md=(struct mob_data *)bl) && md->mode&1 && mob_can_move(md)) {
- md->state.state=MS_WALK;
- if( DIFF_TICK(md->next_walktime,tick) > + 7000 &&
- (md->walkpath.path_len==0 || md->walkpath.path_pos>=md->walkpath.path_len) )
- md->next_walktime = tick + 3000*rand()%2000;
- mob_randomwalk(md,tick);
- }*/
- if ((sc_data[type].val2 -= 1000) > 0) {
- sc_data[type].timer = add_timer(
- i + tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- break;
-
- case SC_GOSPEL:
- {
- int calc_flag = 0;
- if (sc_data[type].val3 > 0) {
- sc_data[type].val3 = 0;
- calc_flag = 1;
- }
- if(sd && sc_data[type].val4 == BCT_SELF){
- int hp, sp;
- hp = (sc_data[type].val1 > 5) ? 45 : 30;
- sp = (sc_data[type].val1 > 5) ? 35 : 20;
- if(sd->status.hp - hp > 0 &&
- sd->status.sp - sp > 0){
- sd->status.hp -= hp;
- sd->status.sp -= sp;
- clif_updatestatus(sd,SP_HP);
- clif_updatestatus(sd,SP_SP);
- if ((sc_data[type].val2 -= 10000) > 0) {
- sc_data[type].timer = add_timer(
- 10000+tick, skill_status_change_timer,
- bl->id, data);
- return 0;
- }
- }
- } else if (sd && sc_data[type].val4 == BCT_PARTY) {
- int i;
- switch ((i = rand() % 12)) {
- case 1: // heal between 100-1000
- {
- struct block_list tbl;
- int heal = rand() % 900 + 100;
- tbl.id = 0;
- tbl.m = bl->m;
- tbl.x = bl->x;
- tbl.y = bl->y;
- clif_skill_nodamage(&tbl,bl,AL_HEAL,heal,1);
- battle_heal(NULL,bl,heal,0,0);
- }
- break;
- case 2: // end negative status
- {
- int j;
- for (j=0; j<4; j++)
- if(sc_data[i + SC_POISON].timer!=-1) {
- skill_status_change_end(bl,j,-1);
- break;
- }
- }
- break;
- case 3: // +25% resistance to negative status
- case 4: // +25% max hp
- case 5: // +25% max sp
- case 6: // +2 to all stats
- case 11: // +25% armor and vit def
- case 12: // +8% atk
- case 13: // +5% flee
- case 14: // +5% hit
- sc_data[type].val3 = i;
- if (i == 6 ||
- (i >= 11 && i <= 14))
- calc_flag = 1;
- break;
- case 7: // level 5 bless
- {
- struct block_list tbl;
- tbl.id = 0;
- tbl.m = bl->m;
- tbl.x = bl->x;
- tbl.y = bl->y;
- clif_skill_nodamage(&tbl,bl,AL_BLESSING,5,1);
- skill_status_change_start(bl,SkillStatusChangeTable[AL_BLESSING],5,0,0,0,10000,0 );
- }
- break;
- case 8: // level 5 increase agility
- {
- struct block_list tbl;
- tbl.id = 0;
- tbl.m = bl->m;
- tbl.x = bl->x;
- tbl.y = bl->y;
- clif_skill_nodamage(&tbl,bl,AL_INCAGI,5,1);
- skill_status_change_start(bl,SkillStatusChangeTable[AL_INCAGI],5,0,0,0,10000,0 );
- }
- break;
- case 9: // holy element to weapon
- {
- struct block_list tbl;
- tbl.id = 0;
- tbl.m = bl->m;
- tbl.x = bl->x;
- tbl.y = bl->y;
- clif_skill_nodamage(&tbl,bl,PR_ASPERSIO,1,1);
- skill_status_change_start(bl,SkillStatusChangeTable[PR_ASPERSIO],1,0,0,0,10000,0 );
- }
- break;
- case 10: // holy element to armour
- {
- struct block_list tbl;
- tbl.id = 0;
- tbl.m = bl->m;
- tbl.x = bl->x;
- tbl.y = bl->y;
- clif_skill_nodamage(&tbl,bl,PR_BENEDICTIO,1,1);
- skill_status_change_start(bl,SkillStatusChangeTable[PR_BENEDICTIO],1,0,0,0,10000,0 );
- }
- break;
- default:
- break;
- }
- } else if (sc_data[type].val4 == BCT_ENEMY) {
- int i;
- switch ((i = rand() % 8)) {
- case 1: // damage between 300-800
- case 2: // damage between 150-550 (ignore def)
- battle_damage(NULL, bl, rand() % 500,0); // temporary damage
- break;
- case 3: // random status effect
- {
- int effect[3] = {
- SC_CURSE,
- SC_BLIND,
- SC_POISON };
- skill_status_change_start(bl,effect[rand()%3],1,0,0,0,10000,0 );
- }
- break;
- case 4: // level 10 provoke
- {
- struct block_list tbl;
- tbl.id = 0;
- tbl.m = bl->m;
- tbl.x = bl->x;
- tbl.y = bl->y;
- clif_skill_nodamage(&tbl,bl,SM_PROVOKE,1,1);
- skill_status_change_start(bl,SkillStatusChangeTable[SM_PROVOKE],10,0,0,0,10000,0 );
- }
- break;
- case 5: // 0 def
- case 6: // 0 atk
- case 7: // 0 flee
- case 8: // -75% move speed and aspd
- sc_data[type].val3 = i;
- calc_flag = 1;
- break;
- default:
- break;
- }
- }
- if (sd && calc_flag)
- pc_calcstatus (sd, 0);
- }
- break;
- }
-
- return skill_status_change_end( bl,type,tid );
-}
/*==========================================
* ステ?タス異常終了
@@ -9662,979 +8675,20 @@ int skill_encchant_eremental_end(struct block_list *bl,int type)
struct status_change *sc_data;
nullpo_retr(0, bl);
- nullpo_retr(0, sc_data=battle_get_sc_data(bl));
+ nullpo_retr(0, sc_data=status_get_sc_data(bl));
if( type!=SC_ENCPOISON && sc_data[SC_ENCPOISON].timer!=-1 ) /* エンチャントポイズン解除 */
- skill_status_change_end(bl,SC_ENCPOISON,-1);
+ status_change_end(bl,SC_ENCPOISON,-1);
if( type!=SC_ASPERSIO && sc_data[SC_ASPERSIO].timer!=-1 ) /* アスペルシオ解除 */
- skill_status_change_end(bl,SC_ASPERSIO,-1);
+ status_change_end(bl,SC_ASPERSIO,-1);
if( type!=SC_FLAMELAUNCHER && sc_data[SC_FLAMELAUNCHER].timer!=-1 ) /* フレイムランチャ解除 */
- skill_status_change_end(bl,SC_FLAMELAUNCHER,-1);
+ status_change_end(bl,SC_FLAMELAUNCHER,-1);
if( type!=SC_FROSTWEAPON && sc_data[SC_FROSTWEAPON].timer!=-1 ) /* フロストウェポン解除 */
- skill_status_change_end(bl,SC_FROSTWEAPON,-1);
+ status_change_end(bl,SC_FROSTWEAPON,-1);
if( type!=SC_LIGHTNINGLOADER && sc_data[SC_LIGHTNINGLOADER].timer!=-1 ) /* ライトニングロ?ダ?解除 */
- skill_status_change_end(bl,SC_LIGHTNINGLOADER,-1);
+ status_change_end(bl,SC_LIGHTNINGLOADER,-1);
if( type!=SC_SEISMICWEAPON && sc_data[SC_SEISMICWEAPON].timer!=-1 ) /* サイスミックウェポン解除 */
- skill_status_change_end(bl,SC_SEISMICWEAPON,-1);
-
- return 0;
-}
-/*==========================================
- * ステ?タス異常開始
- *------------------------------------------
- */
-int skill_status_change_start(struct block_list *bl, int type, int val1, int val2, int val3, int val4, int tick, int flag)
-{
- struct map_session_data *sd = NULL;
- struct status_change* sc_data;
- short *sc_count, *option, *opt1, *opt2, *opt3;
- int opt_flag = 0, calc_flag = 0,updateflag = 0, save_flag = 0, race, mode, elem, undead_flag;
- int scdef=0;
-
- nullpo_retr(0, bl);
- if(bl->type == BL_SKILL)
- return 0;
- nullpo_retr(0, sc_data=battle_get_sc_data(bl));
- nullpo_retr(0, sc_count=battle_get_sc_count(bl));
- nullpo_retr(0, option=battle_get_option(bl));
- nullpo_retr(0, opt1=battle_get_opt1(bl));
- nullpo_retr(0, opt2=battle_get_opt2(bl));
- nullpo_retr(0, opt3=battle_get_opt3(bl));
-
-
- race=battle_get_race(bl);
- mode=battle_get_mode(bl);
- elem=battle_get_elem_type(bl);
- undead_flag=battle_check_undead(race,elem);
-
- if(type == SC_AETERNA && (sc_data[SC_STONE].timer != -1 || sc_data[SC_FREEZE].timer != -1) )
- return 0;
-
- switch(type){
- case SC_STONE:
- case SC_FREEZE:
- scdef=3+battle_get_mdef(bl)+battle_get_luk(bl)/3;
- break;
- case SC_STAN:
- case SC_SILENCE:
- case SC_POISON:
- case SC_DPOISON:
- scdef=3+battle_get_vit(bl)+battle_get_luk(bl)/3;
- break;
- case SC_SLEEP:
- case SC_BLIND:
- scdef=3+battle_get_int(bl)+battle_get_luk(bl)/3;
- break;
- case SC_CURSE:
- scdef=3+battle_get_luk(bl);
- break;
-
-// case SC_CONFUSION:
- default:
- scdef=0;
- }
- if(scdef>=100)
- return 0;
- if(bl->type==BL_PC){
- sd=(struct map_session_data *)bl;
- if( sd && type == SC_ADRENALINE && !(skill_get_weapontype(BS_ADRENALINE)&(1<<sd->status.weapon)))
- return 0;
-
- if(SC_STONE<=type && type<=SC_BLIND){ /* カ?ドによる耐性 */
- if( sd && sd->reseff[type-SC_STONE] > 0 && rand()%10000<sd->reseff[type-SC_STONE]){
- if(battle_config.battle_log)
- printf("PC %d skill_sc_start: cardによる異常耐性?動\n",sd->bl.id);
- return 0;
- }
- }
- }
- else if(bl->type == BL_MOB) {
- }
- else {
- if(battle_config.error_log)
- printf("skill_status_change_start: neither MOB nor PC !\n");
- return 0;
- }
-
- if(type==SC_FREEZE && undead_flag && !(flag&1))
- return 0;
-
- if((type == SC_ADRENALINE || type == SC_WEAPONPERFECTION || type == SC_OVERTHRUST) &&
- sc_data[type].timer != -1 && sc_data[type].val2 && !val2)
- return 0;
-
- if(mode & 0x20 && (type==SC_STONE || type==SC_FREEZE ||
- type==SC_STAN || type==SC_SLEEP || type==SC_SILENCE || type==SC_QUAGMIRE || type == SC_DECREASEAGI || type == SC_SIGNUMCRUCIS || type == SC_PROVOKE ||
- (type == SC_BLESSING && (undead_flag || race == 6))) && !(flag&1)){
- /* ボスには?かない(ただしカ?ドによる?果は適用される) */
- return 0;
- }
- if(type==SC_FREEZE || type==SC_STAN || type==SC_SLEEP)
- battle_stopwalking(bl,1);
-
- if(sc_data[type].timer != -1){ /* すでに同じ異常になっている場合タイマ解除 */
- if(sc_data[type].val1 > val1 && type != SC_COMBO && type != SC_DANCING && type != SC_DEVOTION &&
- type != SC_SPEEDPOTION0 && type != SC_SPEEDPOTION1 && type != SC_SPEEDPOTION2 && type != SC_SPEEDPOTION3
- && type != SC_ATKPOT && type != SC_MATKPOT) // added atk and matk potions [Valaris]
- return 0;
- if ((type >=SC_STAN && type <= SC_BLIND) || type == SC_DPOISON)
- return 0;/* ?ぎ足しができない?態異常である時は?態異常を行わない */
- if(type == SC_GRAFFITI){ //異常中にもう一度?態異常になった時に解除してから再度かかる
- skill_status_change_end(bl,type,-1);
- } else {
- (*sc_count)--;
- delete_timer(sc_data[type].timer, skill_status_change_timer);
- sc_data[type].timer = -1;
- }
- }
-
- switch(type){ /* 異常の種類ごとの?理 */
- case SC_PROVOKE: /* プロボック */
- calc_flag = 1;
- if(tick <= 0) tick = 1000; /* (オ?トバ?サ?ク) */
- break;
- case SC_ENDURE: /* インデュア */
- if(tick <= 0) tick = 1000 * 60;
- calc_flag = 1; // for updating mdef
- val2 = 7; // [Celest]
- break;
- case SC_AUTOBERSERK:
- {
- tick = 60*1000;
- if (bl->type == BL_PC && sd->status.hp<sd->status.max_hp>>2 &&
- (sc_data[SC_PROVOKE].timer==-1 || sc_data[SC_PROVOKE].val2==0))
- skill_status_change_start(bl,SC_PROVOKE,10,1,0,0,0,0);
- }
- break;
- case SC_CONCENTRATE: /* 集中力向上 */
- calc_flag = 1;
- break;
- case SC_BLESSING: /* ブレッシング */
- {
- if(bl->type == BL_PC || (!undead_flag && race != 6)) {
- if(sc_data[SC_CURSE].timer!=-1 )
- skill_status_change_end(bl,SC_CURSE,-1);
- if(sc_data[SC_STONE].timer!=-1 && sc_data[SC_STONE].val2 == 0)
- skill_status_change_end(bl,SC_STONE,-1);
- }
- calc_flag = 1;
- }
- break;
- case SC_ANGELUS: /* アンゼルス */
- calc_flag = 1;
- break;
- case SC_INCREASEAGI: /* 速度上昇 */
- calc_flag = 1;
- if(sc_data[SC_DECREASEAGI].timer!=-1 )
- skill_status_change_end(bl,SC_DECREASEAGI,-1);
- // the effect will still remain [celest]
-// if(sc_data[SC_WINDWALK].timer!=-1 ) /* ウインドウォ?ク */
-// skill_status_change_end(bl,SC_WINDWALK,-1);
- break;
- case SC_DECREASEAGI: /* 速度減少 */
- if (bl->type == BL_PC) // Celest
- tick>>=1;
- calc_flag = 1;
- if(sc_data[SC_INCREASEAGI].timer!=-1 )
- skill_status_change_end(bl,SC_INCREASEAGI,-1);
- if(sc_data[SC_ADRENALINE].timer!=-1 )
- skill_status_change_end(bl,SC_ADRENALINE,-1);
- if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
- if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
- break;
- case SC_SIGNUMCRUCIS: /* シグナムクルシス */
- calc_flag = 1;
-// val2 = 14 + val1;
- val2 = 10 + val1*2;
- tick = 600*1000;
- clif_emotion(bl,4);
- break;
- case SC_SLOWPOISON:
- if (sc_data[SC_POISON].timer == -1 && sc_data[SC_DPOISON].timer == -1)
- return 0;
- break;
- case SC_TWOHANDQUICKEN: /* 2HQ */
- if(sc_data[SC_DECREASEAGI].timer!=-1)
- return 0;
- *opt3 |= 1;
- calc_flag = 1;
- break;
- case SC_ADRENALINE: /* アドレナリンラッシュ */
- if(sc_data[SC_DECREASEAGI].timer!=-1)
- return 0;
- calc_flag = 1;
- break;
- case SC_WEAPONPERFECTION: /* ウェポンパ?フェクション */
- // Lasting time penalties have been removed on sakray as of 12/14 [celest]
- //if(battle_config.party_skill_penalty && !val2) tick /= 5;
- break;
- case SC_OVERTHRUST: /* オ?バ?スラスト */
- *opt3 |= 2;
- // Lasting time penalties have been removed on sakray as of 12/14 [celest]
- //if(battle_config.party_skill_penalty && !val2) tick /= 10;
- break;
- case SC_MAXIMIZEPOWER: /* マキシマイズパワ?(SPが1減る時間,val2にも) */
- if(bl->type == BL_PC)
- val2 = tick;
- else
- tick = 5000*val1;
- break;
- case SC_ENCPOISON: /* エンチャントポイズン */
- calc_flag = 1;
- val2=(((val1 - 1) / 2) + 3)*100; /* 毒付?確率 */
- skill_encchant_eremental_end(bl,SC_ENCPOISON);
- break;
- case SC_EDP: // [Celest]
- val2 = val1 + 2; /* 猛毒付?確率(%) */
- calc_flag = 1;
- break;
- case SC_POISONREACT: /* ポイズンリアクト */
- val2=val1/2 + val1%2; // [Celest]
- break;
- case SC_IMPOSITIO: /* インポシティオマヌス */
- calc_flag = 1;
- break;
- case SC_ASPERSIO: /* アスペルシオ */
- skill_encchant_eremental_end(bl,SC_ASPERSIO);
- break;
- case SC_SUFFRAGIUM: /* サフラギム */
- case SC_BENEDICTIO: /* 聖? */
- case SC_MAGNIFICAT: /* マグニフィカ?ト */
- case SC_AETERNA: /* エ?テルナ */
- break;
- case SC_ENERGYCOAT: /* エナジ?コ?ト */
- *opt3 |= 4;
- break;
- case SC_MAGICROD:
- val2 = val1*20;
- break;
- case SC_KYRIE: /* キリエエレイソン */
- val2 = battle_get_max_hp(bl) * (val1 * 2 + 10) / 100;/* 耐久度 */
- val3 = (val1 / 2 + 5); /* 回? */
-// -- moonsoul (added to undo assumptio status if target has it)
- if(sc_data[SC_ASSUMPTIO].timer!=-1 )
- skill_status_change_end(bl,SC_ASSUMPTIO,-1);
- break;
- case SC_MINDBREAKER:
- calc_flag = 1;
- if(tick <= 0) tick = 1000; /* (オ?トバ?サ?ク) */
- case SC_GLORIA: /* グロリア */
- calc_flag = 1;
- break;
- case SC_LOUD: /* ラウドボイス */
- calc_flag = 1;
- break;
- case SC_TRICKDEAD: /* 死んだふり */
- if (bl->type == BL_PC) {
- pc_stopattack((struct map_session_data *)sd);
- }
- break;
- case SC_QUAGMIRE: /* クァグマイア */
- calc_flag = 1;
- if(sc_data[SC_CONCENTRATE].timer!=-1 ) /* 集中力向上解除 */
- skill_status_change_end(bl,SC_CONCENTRATE,-1);
- if(sc_data[SC_INCREASEAGI].timer!=-1 ) /* 速度上昇解除 */
- skill_status_change_end(bl,SC_INCREASEAGI,-1);
- if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
- if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
- if(sc_data[SC_ADRENALINE].timer!=-1 )
- skill_status_change_end(bl,SC_ADRENALINE,-1);
- if(sc_data[SC_LOUD].timer!=-1 )
- skill_status_change_end(bl,SC_LOUD,-1);
- if(sc_data[SC_TRUESIGHT].timer!=-1 ) /* トゥル?サイト */
- skill_status_change_end(bl,SC_TRUESIGHT,-1);
- if(sc_data[SC_WINDWALK].timer!=-1 ) /* ウインドウォ?ク */
- skill_status_change_end(bl,SC_WINDWALK,-1);
- if(sc_data[SC_CARTBOOST].timer!=-1 ) /* カ?トブ?スト */
- skill_status_change_end(bl,SC_CARTBOOST,-1);
- break;
- case SC_MAGICPOWER:
- calc_flag = 1;
- val2 = 1;
- break;
- case SC_SACRIFICE:
- val2 = 5;
- break;
- case SC_FLAMELAUNCHER: /* フレ?ムランチャ? */
- skill_encchant_eremental_end(bl,SC_FLAMELAUNCHER);
- break;
- case SC_FROSTWEAPON: /* フロストウェポン */
- skill_encchant_eremental_end(bl,SC_FROSTWEAPON);
- break;
- case SC_LIGHTNINGLOADER: /* ライトニングロ?ダ? */
- skill_encchant_eremental_end(bl,SC_LIGHTNINGLOADER);
- break;
- case SC_SEISMICWEAPON: /* サイズミックウェポン */
- skill_encchant_eremental_end(bl,SC_SEISMICWEAPON);
- break;
- case SC_DEVOTION: /* ディボ?ション */
- calc_flag = 1;
- break;
- case SC_PROVIDENCE: /* プロヴィデンス */
- calc_flag = 1;
- val2=val1*5;
- break;
- case SC_REFLECTSHIELD:
- val2=10+val1*3;
- break;
- case SC_STRIPWEAPON:
- if (val2==0) val2=90;
- break;
- case SC_STRIPSHIELD:
- if (val2==0) val2=85;
- break;
- case SC_STRIPARMOR:
- case SC_STRIPHELM:
- case SC_CP_WEAPON:
- case SC_CP_SHIELD:
- case SC_CP_ARMOR:
- case SC_CP_HELM:
- break;
-
- case SC_AUTOSPELL: /* オ?トスペル */
- val4 = 5 + val1*2;
- break;
-
- case SC_VOLCANO:
- calc_flag = 1;
- val3 = val1*10;
- val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
- break;
- case SC_DELUGE:
- calc_flag = 1;
- val3 = val1>=5?15: (val1==4?14: (val1==3?12: ( val1==2?9:5 ) ) );
- val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
- break;
- case SC_VIOLENTGALE:
- calc_flag = 1;
- val3 = val1*3;
- val4 = val1>=5?20: (val1==4?19: (val1==3?17: ( val1==2?14:10 ) ) );
- break;
-
- case SC_SPEARSQUICKEN: /* スピアクイッケン */
- calc_flag = 1;
- val2 = 20+val1;
- *opt3 |= 1;
- break;
- case SC_COMBO:
- break;
- case SC_BLADESTOP_WAIT: /* 白刃取り(待ち) */
- break;
- case SC_BLADESTOP: /* 白刃取り */
- if(val2==2) clif_bladestop((struct block_list *)val3,(struct block_list *)val4,1);
- *opt3 |= 32;
- break;
-
- case SC_LULLABY: /* 子守唄 */
- val2 = 11;
- break;
- case SC_RICHMANKIM:
- break;
- case SC_ETERNALCHAOS: /* エタ?ナルカオス */
- calc_flag = 1;
- break;
- case SC_DRUMBATTLE: /* ?太鼓の響き */
- calc_flag = 1;
- val2 = (val1+1)*25;
- val3 = (val1+1)*2;
- break;
- case SC_NIBELUNGEN: /* ニ?ベルングの指輪 */
- calc_flag = 1;
- //val2 = (val1+2)*50;
- val3 = (val1+2)*25;
- break;
- case SC_ROKISWEIL: /* ロキの叫び */
- break;
- case SC_INTOABYSS: /* 深淵の中に */
- break;
- case SC_SIEGFRIED: /* 不死身のジ?クフリ?ド */
- calc_flag = 1;
- val2 = 55 + val1*5;
- val3 = val1*10;
- break;
- case SC_DISSONANCE: /* 不協和音 */
- val2 = 10;
- break;
- case SC_WHISTLE: /* 口笛 */
- calc_flag = 1;
- break;
- case SC_ASSNCROS: /* 夕陽のアサシンクロス */
- calc_flag = 1;
- break;
- case SC_POEMBRAGI: /* ブラギの詩 */
- break;
- case SC_APPLEIDUN: /* イドゥンの林檎 */
- calc_flag = 1;
- break;
- case SC_UGLYDANCE: /* 自分勝手なダンス */
- val2 = 10;
- break;
- case SC_HUMMING: /* ハミング */
- calc_flag = 1;
- break;
- case SC_DONTFORGETME: /* 私を忘れないで */
- calc_flag = 1;
- if(sc_data[SC_INCREASEAGI].timer!=-1 ) /* 速度上昇解除 */
- skill_status_change_end(bl,SC_INCREASEAGI,-1);
- if(sc_data[SC_TWOHANDQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_TWOHANDQUICKEN,-1);
- if(sc_data[SC_SPEARSQUICKEN].timer!=-1 )
- skill_status_change_end(bl,SC_SPEARSQUICKEN,-1);
- if(sc_data[SC_ADRENALINE].timer!=-1 )
- skill_status_change_end(bl,SC_ADRENALINE,-1);
- if(sc_data[SC_ASSNCROS].timer!=-1 )
- skill_status_change_end(bl,SC_ASSNCROS,-1);
- if(sc_data[SC_TRUESIGHT].timer!=-1 ) /* トゥル?サイト */
- skill_status_change_end(bl,SC_TRUESIGHT,-1);
- if(sc_data[SC_WINDWALK].timer!=-1 ) /* ウインドウォ?ク */
- skill_status_change_end(bl,SC_WINDWALK,-1);
- if(sc_data[SC_CARTBOOST].timer!=-1 ) /* カ?トブ?スト */
- skill_status_change_end(bl,SC_CARTBOOST,-1);
- break;
- case SC_FORTUNE: /* 幸運のキス */
- calc_flag = 1;
- break;
- case SC_SERVICE4U: /* サ?ビスフォ?ユ? */
- calc_flag = 1;
- break;
- case SC_MOONLIT:
- val2 = bl->id;
- break;
- case SC_DANCING: /* ダンス/演奏中 */
- calc_flag = 1;
- val3= tick / 1000;
- tick = 1000;
- break;
-
- case SC_EXPLOSIONSPIRITS: // 爆裂波動
- calc_flag = 1;
- val2 = 75 + 25*val1;
- *opt3 |= 8;
- break;
- case SC_STEELBODY: // 金剛
- calc_flag = 1;
- *opt3 |= 16;
- break;
- case SC_EXTREMITYFIST: /* 阿修羅覇凰拳 */
- break;
- case SC_AUTOCOUNTER:
- val3 = val4 = 0;
- break;
-
- case SC_SPEEDPOTION0: /* ?速ポ?ション */
- case SC_SPEEDPOTION1:
- case SC_SPEEDPOTION2:
- case SC_SPEEDPOTION3:
- calc_flag = 1;
- tick = 1000 * tick;
- val2 = 5*(2+type-SC_SPEEDPOTION0);
- break;
-
- /* atk & matk potions [Valaris] */
- case SC_ATKPOT:
- case SC_MATKPOT:
- calc_flag = 1;
- tick = 1000 * tick;
- break;
- case SC_WEDDING: //結婚用(結婚衣裳になって?くのが?いとか)
- {
- time_t timer;
-
- calc_flag = 1;
- tick = 10000;
- if(!val2)
- val2 = time(&timer);
- }
- break;
- case SC_NOCHAT: //チャット禁止?態
- {
- time_t timer;
-
- if(!battle_config.muting_players)
- break;
-
- tick = 60000;
- if(!val2)
- val2 = time(&timer);
- updateflag = SP_MANNER;
- save_flag = 1; // celest
- }
- break;
- case SC_SELFDESTRUCTION: //自爆
- clif_skillcasting(bl,bl->id, bl->id,0,0,331,skill_get_time(val2,val1));
- val3 = tick / 1000;
- tick = 1000;
- break;
-
- /* option1 */
- case SC_STONE: /* 石化 */
- if(!(flag&2)) {
- int sc_def = battle_get_mdef(bl)*200;
- tick = tick - sc_def;
- }
- val3 = tick/1000;
- if(val3 < 1) val3 = 1;
- tick = 5000;
- val2 = 1;
- break;
- case SC_SLEEP: /* 睡眠 */
- if(!(flag&2)) {
-// int sc_def = 100 - (battle_get_int(bl) + battle_get_luk(bl)/3);
-// tick = tick * sc_def / 100;
-// if(tick < 1000) tick = 1000;
- tick = 30000;//睡眠はステ?タス耐性に?わらず30秒
- }
- break;
- case SC_FREEZE: /* 凍結 */
- if(!(flag&2)) {
- int sc_def = 100 - battle_get_mdef(bl);
- tick = tick * sc_def / 100;
- }
- break;
- case SC_STAN: /* スタン(val2にミリ秒セット) */
- if(!(flag&2)) {
- int sc_def = 100 - (battle_get_vit(bl) + battle_get_luk(bl)/3);
- tick = tick * sc_def / 100;
- }
- break;
-
- /* option2 */
- case SC_DPOISON: /* 猛毒 */
- {
- int mhp = battle_get_max_hp(bl);
- int hp = battle_get_hp(bl);
- // MHP?1/4????????
- if (hp > mhp>>2) {
- if(bl->type == BL_PC) {
- int diff = mhp*10/100;
- if (hp - diff < mhp>>2)
- hp = hp - (mhp>>2);
- pc_heal((struct map_session_data *)bl, -hp, 0);
- } else if(bl->type == BL_MOB) {
- struct mob_data *md = (struct mob_data *)bl;
- hp -= mhp*15/100;
- if (hp > mhp>>2)
- md->hp = hp;
- else
- md->hp = mhp>>2;
- }
- }
- } // fall through
- case SC_POISON: /* 毒 */
- calc_flag = 1;
- if(!(flag&2)) {
- int sc_def = 100 - (battle_get_vit(bl) + battle_get_luk(bl)/5);
- tick = tick * sc_def / 100;
- }
- val3 = tick/1000;
- if(val3 < 1) val3 = 1;
- tick = 1000;
- break;
- case SC_SILENCE: /* 沈?(レックスデビ?ナ) */
- if(!(flag&2)) {
- int sc_def = 100 - battle_get_vit(bl);
- tick = tick * sc_def / 100;
- }
- break;
- case SC_CONFUSION:
- val2 = tick;
- tick = 100;
- clif_emotion(bl,1);
- if (sd) {
- pc_stop_walking (sd, 0);
- }
- break;
- case SC_BLIND: /* 暗? */
- calc_flag = 1;
- if(!(flag&2)) {
- int sc_def = battle_get_lv(bl)/10 + battle_get_int(bl)/15;
- tick = 30000 - sc_def;
- }
- break;
- case SC_CURSE:
- calc_flag = 1;
- if(!(flag&2)) {
- int sc_def = 100 - battle_get_vit(bl);
- tick = tick * sc_def / 100;
- }
- break;
-
- /* option */
- case SC_HIDING: /* ハイディング */
- calc_flag = 1;
- if(bl->type == BL_PC) {
- val2 = tick / 1000; /* 持?時間 */
- tick = 1000;
- }
- break;
- case SC_CHASEWALK:
- case SC_CLOAKING: /* クロ?キング */
- if(bl->type == BL_PC) {
- calc_flag = 1; // [Celest]
- val2 = tick;
- val3 = type==SC_CLOAKING ? 130-val1*3 : 135-val1*5;
- }
- else
- tick = 5000*val1;
- break;
- case SC_SIGHT: /* サイト/ルアフ */
- case SC_RUWACH:
- val2 = tick/250;
- tick = 10;
- break;
-
- /* セ?フティウォ?ル、ニュ?マ */
- case SC_SAFETYWALL: case SC_PNEUMA:
- tick=((struct skill_unit *)val2)->group->limit;
- break;
-
- /* アンクル */
- case SC_ANKLE:
- break;
-
- /* ウォ?タ?ボ?ル */
- case SC_WATERBALL:
- tick=150;
- if(val1>5) //レベルが5以上の場合は25?に制限(1?目はすでに打ってるので-1)
- val3=5*5-1;
- else
- val3= (val1|1)*(val1|1)-1;
- break;
-
- /* スキルじゃない/時間に?係しない */
- case SC_RIDING:
- calc_flag = 1;
- tick = 600*1000;
- break;
- case SC_FALCON:
- case SC_WEIGHT50:
- case SC_WEIGHT90:
- case SC_BROKNWEAPON:
- case SC_BROKNARMOR:
- tick=600*1000;
- break;
-
- case SC_AUTOGUARD:
- {
- int i,t;
- for(i=val2=0;i<val1;i++) {
- t = 5-(i>>1);
- val2 += (t < 0)? 1:t;
- }
- }
- break;
-
- case SC_DEFENDER:
- calc_flag = 1;
- val2 = 5 + val1*15;
- break;
-
- case SC_KEEPING:
- case SC_BARRIER:
- calc_flag = 1;
-
- case SC_HALLUCINATION:
- break;
-
- case SC_CONCENTRATION: /* コンセントレ?ション */
- *opt3 |= 1;
- calc_flag = 1;
- break;
-
- case SC_TENSIONRELAX: /* テンションリラックス */
- calc_flag = 1;
- if(bl->type == BL_PC) {
- tick = 10000;
- }
- break;
-
- case SC_AURABLADE: /* オ?ラブレ?ド */
- case SC_PARRYING: /* パリイング */
-// case SC_ASSUMPTIO: /* */
- case SC_HEADCRUSH: /* ヘッドクラッシュ */
- case SC_JOINTBEAT: /* ジョイントビ?ト */
-// case SC_MARIONETTE: /* マリオネットコントロ?ル */
-
- //とりあえず手?き
- break;
-
-// -- moonsoul (for new upper class related skill status effects)
-/*
- case SC_AURABLADE:
- val2 = val1*10;
- break;
- case SC_PARRYING:
- val2=val1*3;
- break;
- case SC_CONCENTRATION:
- calc_flag=1;
- val2=val1*10;
- val3=val1*5;
- break;
- case SC_TENSIONRELAX:
-// val2 = 10;
-// val3 = 15;
- break;
- case SC_BERSERK:
- calc_flag=1;
- break;
- case SC_ASSUMPTIO:
- if(sc_data[SC_KYRIE].timer!=-1 )
- skill_status_change_end(bl,SC_KYRIE,-1);
- break;*/
-
- case SC_WINDWALK: /* ウインドウォ?ク */
- calc_flag = 1;
- val2 = (val1 / 2); //Flee上昇率
- break;
-
- case SC_BERSERK: /* バ?サ?ク */
- if(sd){
- sd->status.hp = sd->status.max_hp * 3;
- sd->status.sp = 0;
- clif_updatestatus(sd,SP_HP);
- clif_updatestatus(sd,SP_SP);
- clif_status_change(bl,SC_INCREASEAGI,1); /* アイコン表示 */
- sd->canregen_tick = gettick() + 300000;
- }
- *opt3 |= 128;
- tick = 10000;
- calc_flag = 1;
- break;
-
- case SC_ASSUMPTIO: /* アスムプティオ */
- if(sc_data[SC_KYRIE].timer!=-1 )
- skill_status_change_end(bl,SC_KYRIE,-1);
- break;
- *opt3 |= 2048;
- break;
-
- case SC_BASILICA: // [celest]
- break;
-
- case SC_GOSPEL:
- if (val4 == BCT_SELF) { // self effect
- int i;
- if (sd) {
- sd->canact_tick += tick;
- sd->canmove_tick += tick;
- }
- val2 = tick;
- tick = 1000;
- for (i=0; i<=26; i++) {
- if(sc_data[i].timer!=-1)
- skill_status_change_end(bl,i,-1);
- }
- for (i=58; i<=62; i++) {
- if(sc_data[i].timer!=-1)
- skill_status_change_end(bl,i,-1);
- }
- for (i=132; i<=136; i++) {
- if(sc_data[i].timer!=-1)
- skill_status_change_end(bl,i,-1);
- }
- }
- break;
-
- case SC_MARIONETTE: /* マリオネットコントロ?ル */
- case SC_MARIONETTE2:
- val2 = tick;
- if (!val3)
- return 0;
- tick = 1000;
- calc_flag = 1;
- *opt3 |= 1024;
- break;
-
- case SC_MELTDOWN: /* メルトダウン */
- case SC_CARTBOOST: /* カ?トブ?スト */
- case SC_TRUESIGHT: /* トゥル?サイト */
- case SC_SPIDERWEB: /* スパイダ?ウェッブ */
- calc_flag = 1;
- break;
-
- case SC_REJECTSWORD: /* リジェクトソ?ド */
- val2 = 3; //3回攻?を跳ね返す
- break;
-
- case SC_MEMORIZE: /* メモライズ */
- val2 = 3; //3回詠唱を1/3にする
- break;
-
- case SC_GRAFFITI: /* グラフィティ */
- {
- struct skill_unit_group *sg = skill_unitsetting(bl,RG_GRAFFITI,val1,val2,val3,0);
- if(sg)
- val4 = (int)sg;
- }
- break;
-
- case SC_SPLASHER: /* ベナムスプラッシャ? */
- break;
-
- case SC_FOGWALL:
- val2 = 75;
- // calc_flag = 1; // not sure of effects yet [celest]
- break;
-
- case SC_PRESERVE:
- break;
-
- case SC_BLOCKSKILL:
- if (!tick) tick = 60000;
- if (!val3) val3 = -1;
- break;
-
- case SC_SLOWDOWN:
- case SC_SPEEDUP0:
- calc_flag = 1;
- break;
-
- case SC_REGENERATION:
- val1 = 2;
- case SC_BATTLEORDERS:
- tick = 60000; // 1 minute
- calc_flag = 1;
- break;
-
- default:
- if(battle_config.error_log)
- printf("UnknownStatusChange [%d]\n", type);
- return 0;
- }
-
- if(bl->type==BL_PC &&
- (type<SC_SENDMAX || type==SC_PRESERVE || type==SC_BATTLEORDERS))
- clif_status_change(bl,type,1); /* アイコン表示 */
-
- /* optionの?更 */
- switch(type){
- case SC_STONE:
- case SC_FREEZE:
- case SC_STAN:
- case SC_SLEEP:
- battle_stopattack(bl); /* 攻?停止 */
- skill_stop_dancing(bl,0); /* 演奏/ダンスの中? */
- { /* 同時に掛からないステ?タス異常を解除 */
- int i;
- for(i = SC_STONE; i <= SC_SLEEP; i++){
- if(sc_data[i].timer != -1){
- (*sc_count)--;
- delete_timer(sc_data[i].timer, skill_status_change_timer);
- sc_data[i].timer = -1;
- }
- }
- }
- if(type == SC_STONE)
- *opt1 = 6;
- else
- *opt1 = type - SC_STONE + 1;
- opt_flag = 1;
- break;
- case SC_POISON:
- case SC_CURSE:
- case SC_SILENCE:
- case SC_BLIND:
- *opt2 |= 1<<(type-SC_POISON);
- opt_flag = 1;
- break;
- case SC_DPOISON: // 暫定で毒のエフェクトを使用
- *opt2 |= 1;
- opt_flag = 1;
- break;
- case SC_SIGNUMCRUCIS:
- *opt2 |= 0x40;
- opt_flag = 1;
- break;
- case SC_HIDING:
- case SC_CLOAKING:
- battle_stopattack(bl); /* 攻?停止 */
- *option |= ((type==SC_HIDING)?2:4);
- opt_flag =1 ;
- break;
- case SC_CHASEWALK:
- battle_stopattack(bl); /* 攻?停止 */
- *option |= 16388;
- opt_flag =1 ;
- break;
- case SC_SIGHT:
- *option |= 1;
- opt_flag = 1;
- break;
- case SC_RUWACH:
- *option |= 8192;
- opt_flag = 1;
- break;
- case SC_WEDDING:
- *option |= 4096;
- opt_flag = 1;
- }
-
- if(opt_flag) /* optionの?更 */
- clif_changeoption(bl);
-
- (*sc_count)++; /* ステ?タス異常の? */
-
- sc_data[type].val1 = val1;
- sc_data[type].val2 = val2;
- sc_data[type].val3 = val3;
- sc_data[type].val4 = val4;
- /* タイマ?設定 */
- sc_data[type].timer = add_timer(
- gettick() + tick, skill_status_change_timer, bl->id, type);
-
- if(bl->type==BL_PC && calc_flag)
- pc_calcstatus(sd,0); /* ステ?タス再計算 */
-
- if(bl->type==BL_PC && save_flag)
- chrif_save(sd); // save the player status
-
- if(bl->type==BL_PC && updateflag)
- clif_updatestatus(sd,updateflag); /* ステ?タスをクライアントに送る */
-
- return 0;
-}
-/*==========================================
- * ステ?タス異常全解除
- *------------------------------------------
- */
-int skill_status_change_clear(struct block_list *bl, int type)
-{
- struct status_change* sc_data;
- short *sc_count, *option, *opt1, *opt2, *opt3;
- int i;
-
- nullpo_retr(0, bl);
- nullpo_retr(0, sc_data = battle_get_sc_data(bl));
- nullpo_retr(0, sc_count = battle_get_sc_count(bl));
- nullpo_retr(0, option = battle_get_option(bl));
- nullpo_retr(0, opt1 = battle_get_opt1(bl));
- nullpo_retr(0, opt2 = battle_get_opt2(bl));
- nullpo_retr(0, opt3 = battle_get_opt3(bl));
-
- if (*sc_count == 0)
- return 0;
- for(i = 0; i < MAX_STATUSCHANGE; i++){
- if(sc_data[i].timer != -1){ /* 異常があるならタイマ?を削除する */
- skill_status_change_end(bl, i, -1);
- }
- }
- *sc_count = 0;
- *opt1 = 0;
- *opt2 = 0;
- *opt3 = 0;
- *option &= OPTION_MASK;
-
- if (night_flag == 1 && type == BL_PC && !map[bl->m].flag.indoors && // by [Yor]
- !map[bl->m].flag.indoors && battle_config.night_darkness_level <= 0) // [celest]
- *opt2 |= STATE_BLIND;
-
- if(!type || type&2)
- clif_changeoption(bl);
+ status_change_end(bl,SC_SEISMICWEAPON,-1);
return 0;
}
@@ -10663,18 +8717,18 @@ int skill_check_cloaking(struct block_list *bl)
}
if(end){
if ((bl->type == BL_PC && pc_checkskill(sd,AS_CLOAKING)<3) || bl->type == BL_MOB) {
- skill_status_change_end(bl, SC_CLOAKING, -1);
- *battle_get_option(bl)&=~4; /* 念のための?理 */
+ status_change_end(bl, SC_CLOAKING, -1);
+ *status_get_option(bl)&=~4; /* 念のための?理 */
}
else if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 130) {
sd->sc_data[SC_CLOAKING].val3 = 130;
- pc_calcspeed (sd);
+ status_calc_speed (sd);
}
}
else {
if (bl->type == BL_PC && sd->sc_data[SC_CLOAKING].val3 != 103) {
sd->sc_data[SC_CLOAKING].val3 = 103;
- pc_calcspeed (sd);
+ status_calc_speed (sd);
}
}
return end;
@@ -10760,8 +8814,8 @@ void skill_stop_dancing(struct block_list *src, int flag)
short* sc_count;
nullpo_retv(src);
- nullpo_retv(sc_data = battle_get_sc_data(src));
- nullpo_retv(sc_count = battle_get_sc_count(src));
+ nullpo_retv(sc_data = status_get_sc_data(src));
+ nullpo_retv(sc_count = status_get_sc_count(src));
if((*sc_count)>0 && sc_data[SC_DANCING].timer != -1) {
group=(struct skill_unit_group *)sc_data[SC_DANCING].val2; //ダンスのスキルユニットIDはval2に入ってる
@@ -10780,15 +8834,15 @@ void skill_stop_dancing(struct block_list *src, int flag)
if(flag&2) //ハエ飛びなど
return; //合奏もダンス?態も終了させない&スキルユニットは置いてけぼり
}
- skill_status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる
+ status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる
//そしてグル?プは消さない&消さないのでステ?タス計算もいらない?
return;
}else{
if(dsd && src->id == group->src_id){ //グル?プを持ってるPCが止める
- skill_status_change_end((struct block_list *)dsd,SC_DANCING,-1);//相手のステ?タスを終了させる
+ status_change_end((struct block_list *)dsd,SC_DANCING,-1);//相手のステ?タスを終了させる
}
if(dsd && dsd->bl.id == group->src_id){ //相方がグル?プを持っているPCが止める(自分はグル?プを持っていない)
- skill_status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる
+ status_change_end(src,SC_DANCING,-1);//自分のステ?タスを終了させる
}
}
}
@@ -10799,7 +8853,7 @@ void skill_stop_dancing(struct block_list *src, int flag)
}
skill_delunitgroup(group);
if(src->type==BL_PC)
- pc_calcstatus((struct map_session_data *)src,0);
+ status_calc_pc((struct map_session_data *)src,0);
}
}
@@ -10917,8 +8971,8 @@ struct skill_unit_group *skill_initunitgroup(struct block_list *src,
}
group->src_id=src->id;
- group->party_id=battle_get_party_id(src);
- group->guild_id=battle_get_guild_id(src);
+ group->party_id=status_get_party_id(src);
+ group->guild_id=status_get_guild_id(src);
group->group_id=skill_unit_group_newid++;
if(skill_unit_group_newid<=0)
skill_unit_group_newid=10;
@@ -10941,7 +8995,7 @@ struct skill_unit_group *skill_initunitgroup(struct block_list *src,
sd->skillid_dance=skillid;
sd->skilllv_dance=skilllv;
}
- skill_status_change_start(src,SC_DANCING,skillid,(int)group,0,0,skill_get_time(skillid,skilllv)+1000,0);
+ status_change_start(src,SC_DANCING,skillid,(int)group,0,0,skill_get_time(skillid,skilllv)+1000,0);
switch(skillid){ //合奏スキルは相方をダンス?態にする
case BD_LULLABY: /* 子守歌 */
case BD_RICHMANKIM: /* ニヨルドの宴 */
@@ -10983,7 +9037,7 @@ int skill_delunitgroup(struct skill_unit_group *group)
src=map_id2bl(group->src_id);
if( skill_is_danceskill(group->skill_id) ){ //ダンススキルはダンス?態を解除する
if(src)
- skill_status_change_end(src,SC_DANCING,-1);
+ status_change_end(src,SC_DANCING,-1);
}
group->alive_count=0;
@@ -12382,7 +10436,6 @@ int do_init_skill(void)
add_timer_func_list(skill_castend_id,"skill_castend_id");
add_timer_func_list(skill_castend_pos,"skill_castend_pos");
add_timer_func_list(skill_timerskill,"skill_timerskill");
- add_timer_func_list(skill_status_change_timer,"skill_status_change_timer");
add_timer_interval(gettick()+SKILLUNITTIMER_INVERVAL,skill_unit_timer,0,0,SKILLUNITTIMER_INVERVAL);
return 0;