diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 27 | ||||
-rw-r--r-- | src/map/skill.c | 2 | ||||
-rw-r--r-- | src/map/status.c | 63 |
3 files changed, 76 insertions, 16 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 128ede1a8..b9908f835 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -689,8 +689,13 @@ static struct Damage battle_calc_pet_weapon_attack( if(cri < 1) cri = 1; } - if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 ) - cri <<=1; + if(t_sc_data) { + if (t_sc_data[SC_SLEEP].timer!=-1) + cri <<=1; + if(t_sc_data[SC_JOINTBEAT].timer != -1 && + t_sc_data[SC_JOINTBEAT].val2 == 6) // Always take crits with Neck broken by Joint Beat [DracoRPG] + cri = 1000; + } if(skill_num == 0 && battle_config.enemy_critical && (rand() % 1000) < cri) { @@ -1155,8 +1160,13 @@ static struct Damage battle_calc_mob_weapon_attack( if(cri < 1) cri = 1; } - if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 ) // 睡眠中はクリティカルが倍に - cri <<=1; + if(t_sc_data) { + if (t_sc_data[SC_SLEEP].timer!=-1 ) // 睡眠中はクリティカルが倍に + cri <<=1; + if(t_sc_data[SC_JOINTBEAT].timer != -1 && + t_sc_data[SC_JOINTBEAT].val2 == 6) // Always take crits with Neck broken by Joint Beat [DracoRPG] + cri = 1000; + } if(ac_flag) cri = 1000; @@ -1767,8 +1777,13 @@ static struct Damage battle_calc_pc_weapon_attack( // カタールの場合、クリティカルを倍に cri <<=1; cri -= status_get_luk(target) * 3; - if(t_sc_data != NULL && t_sc_data[SC_SLEEP].timer!=-1 ) // 睡眠中はクリティカルが倍に - cri <<=1; + if(t_sc_data) { + if (t_sc_data[SC_SLEEP].timer!=-1 ) // 睡眠中はクリティカルが倍に + cri <<=1; + if(t_sc_data[SC_JOINTBEAT].timer != -1 && + t_sc_data[SC_JOINTBEAT].val2 == 6) // Always take crits with Neck broken by Joint Beat [DracoRPG] + cri = 1000; + } if(ac_flag) cri = 1000; if(skill_num == KN_AUTOCOUNTER) { diff --git a/src/map/skill.c b/src/map/skill.c index 674412332..f06cafba4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1238,7 +1238,7 @@ int skill_additional_effect( struct block_list* src, struct block_list *bl,int s break; case LK_JOINTBEAT: /* ジョイントビ?ト */ //?件が良く分からないので適?に - if( rand()%100 < (2*skilllv+10)*sc_def_vit/100 ) + if( rand()%100 < (5*skilllv+5)*sc_def_vit/100 ) status_change_start(bl,SC_JOINTBEAT,skilllv,0,0,0,skill_get_time2(skillid,skilllv),0); break; case PF_SPIDERWEB: /* スパイダ?ウェッブ */ diff --git a/src/map/status.c b/src/map/status.c index 35b2baaff..13542e5a6 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1007,6 +1007,28 @@ int status_calc_pc(struct map_session_data* sd,int first) if(sd->sc_data[SC_BARRIER].timer!=-1)
sd->mdef = 100;
+ if(sd->sc_data[SC_JOINTBEAT].timer!=-1) { // Random break [DracoRPG]
+ switch(sd->sc_data[SC_JOINTBEAT].val2) {
+ case 1: //Ankle break
+ sd->speed_rate += 50;
+ break;
+ case 2: //Wrist break
+ sd->aspd_rate += 25;
+ break;
+ case 3: //Knee break
+ sd->speed_rate += 30;
+ sd->aspd_rate += 10;
+ break;
+ case 4: //Shoulder break
+ sd->def2 -= sd->def2*50/100;
+ break;
+ case 5: //Waist break
+ sd->def2 -= sd->def2*50/100;
+ sd->base_atk -= sd->base_atk*25/100;
+ break;
+ }
+ }
+
if(sd->sc_data[SC_GOSPEL].timer!=-1) {
if (sd->sc_data[SC_GOSPEL].val4 == BCT_PARTY){
switch (sd->sc_data[SC_GOSPEL].val3)
@@ -2023,6 +2045,12 @@ int status_get_def(struct block_list *bl) sc_data[SC_GOSPEL].val3 == 5)
def = 0;
}
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 4)
+ def -= def*50/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 5)
+ def -= def*25/100;
+ }
}
}
//詠唱中は詠唱時減算率に基づいて減算
@@ -2194,6 +2222,12 @@ int status_get_speed(struct block_list *bl) sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
sc_data[SC_GOSPEL].val3 == 8)
speed = speed*125/100;
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 1)
+ speed = speed*150/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 3)
+ speed = speed*130/100;
+ }
}
if(speed < 1) speed = 1;
return speed;
@@ -2258,6 +2292,12 @@ int status_get_adelay(struct block_list *bl) sc_data[SC_GOSPEL].val4 == BCT_ENEMY &&
sc_data[SC_GOSPEL].val3 == 8)
aspd_rate = aspd_rate*125/100;
+ if(sc_data[SC_JOINTBEAT].timer!=-1) {
+ if (sc_data[SC_JOINTBEAT].val2 == 2)
+ aspd_rate = aspd_rate*125/100;
+ else if (sc_data[SC_JOINTBEAT].val2 == 3)
+ aspd_rate = aspd_rate*110/100;
+ }
}
if(aspd_rate != 100)
adelay = adelay*aspd_rate/100;
@@ -3295,7 +3335,7 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val case SC_PARRYING: /* パリイング */
// case SC_ASSUMPTIO: /* */
case SC_HEADCRUSH: /* ヘッドクラッシュ */
- case SC_JOINTBEAT: /* ジョイントビ?ト */
+// case SC_JOINTBEAT: /* ジョイントビ?ト */
// case SC_MARIONETTE: /* マリオネットコントロ?ル */
//とりあえず手?き
@@ -3330,6 +3370,12 @@ int status_change_start(struct block_list *bl,int type,int val1,int val2,int val calc_flag = 1;
val2 = (val1 / 2); //Flee上昇率
break;
+
+ case SC_JOINTBEAT: // Random break [DracoRPG]
+ calc_flag = 1;
+ val2 = rand()%6 + 1;
+ if (val2 == 6) status_change_start(bl,SC_BLEEDING,val1,0,0,0,skill_get_time2(type,val1),0);
+ break;
case SC_BERSERK: /* バ?サ?ク */
if(sd){
@@ -4549,15 +4595,14 @@ int status_change_timer_sub(struct block_list *bl, va_list ap ) break;
case SC_RUWACH: /* ルアフ */
if( (*status_get_option(bl))&6 ){
- if(battle_check_target( src,bl, BCT_ENEMY ) > 0) {
- struct status_change *sc_data = status_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)) {
- status_change_end( bl, SC_HIDING, -1);
- status_change_end( bl, SC_CLOAKING, -1);
- skill_attack(BF_MAGIC,src,src,bl,AL_RUWACH,sc_data[type].val1,tick,0);
- }
+ struct status_change *sc_data = status_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)) {
+ status_change_end( bl, SC_HIDING, -1);
+ status_change_end( bl, SC_CLOAKING, -1);
}
+ if(battle_check_target( src,bl, BCT_ENEMY ) > 0)
+ skill_attack(BF_MAGIC,src,src,bl,AL_RUWACH,sc_data[type].val1,tick,0);
}
break;
}
|