summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/re/skill_cast_db.txt2
-rw-r--r--src/map/skill.c21
-rw-r--r--src/map/status.c35
-rw-r--r--src/map/unit.c1
4 files changed, 27 insertions, 32 deletions
diff --git a/db/re/skill_cast_db.txt b/db/re/skill_cast_db.txt
index 74a78e259..8f33acdcf 100644
--- a/db/re/skill_cast_db.txt
+++ b/db/re/skill_cast_db.txt
@@ -1690,7 +1690,7 @@
//-- KO_ZANZOU
3012,0,1000,0,30000:27000:24000:21000:18000,0,0,-1
//-- KO_KYOUGAKU
-3013,3000:2500:2000:1500:1000,1000,0,12000:14000:16000:18000:20000,0,0,-1
+3013,3000:2500:2000:1500:1000,1000,0,12000:14000:16000:18000:20000,0,10000,-1
//-- KO_JYUSATSU
3014,3000:2500:2000:1500:1000,1000,0,8000:10000:12000:14000:16000,0,10000,-1
//-- KO_KAHU_ENTEN
diff --git a/src/map/skill.c b/src/map/skill.c
index 9f447e2fa..6826e4c3e 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -9441,17 +9441,16 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin
break;
case KO_KYOUGAKU:
- {
- int rate = max(5, (45 + 5 * skill_lv - status_get_int(bl) / 10));
- if( sd && !map_flag_gvg2(src->m) ){
- clif->skill_fail(sd, skill_id, USESKILL_FAIL_SIZE, 0);
- break;
- }
- if( dstsd && tsc && !tsc->data[type] && rand()%100 < rate ){
- clif->skill_nodamage(src, bl, skill_id, skill_lv,
- sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv)));
- }else if( sd )
- clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0);
+ if (!map_flag_vs(src->m) || !dstsd) {
+ if (sd) clif->skill_fail(sd, skill_id, USESKILL_FAIL_SIZE, 0);
+ break;
+ } else {
+ int time;
+ int rate = 45+ 5*skill_lv - status_get_int(bl)/10;
+ if (rate < 5) rate = 5;
+
+ time = skill->get_time(skill_id, skill_lv) - 1000*status_get_int(bl)/20;
+ sc_start(src,bl, type, rate, skill_lv, time);
}
break;
diff --git a/src/map/status.c b/src/map/status.c
index 8c0e31221..8764438a6 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -4232,7 +4232,7 @@ unsigned short status_calc_str(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_STOMACHACHE])
str -= sc->data[SC_STOMACHACHE]->val1;
if(sc->data[SC_KYOUGAKU])
- str -= sc->data[SC_KYOUGAKU]->val2;
+ str -= sc->data[SC_KYOUGAKU]->val3;
if(sc->data[SC_FULL_THROTTLE])
str += str * 20 / 100;
@@ -4287,7 +4287,7 @@ unsigned short status_calc_agi(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_STOMACHACHE])
agi -= sc->data[SC_STOMACHACHE]->val1;
if(sc->data[SC_KYOUGAKU])
- agi -= sc->data[SC_KYOUGAKU]->val2;
+ agi -= sc->data[SC_KYOUGAKU]->val3;
if(sc->data[SC_MARSHOFABYSS])
agi -= agi * sc->data[SC_MARSHOFABYSS]->val2 / 100;
@@ -4335,7 +4335,7 @@ unsigned short status_calc_vit(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_STOMACHACHE])
vit -= sc->data[SC_STOMACHACHE]->val1;
if(sc->data[SC_KYOUGAKU])
- vit -= sc->data[SC_KYOUGAKU]->val2;
+ vit -= sc->data[SC_KYOUGAKU]->val3;
if(sc->data[SC_NOEQUIPARMOR])
vit -= vit * sc->data[SC_NOEQUIPARMOR]->val2/100;
@@ -4393,7 +4393,7 @@ unsigned short status_calc_int(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_STOMACHACHE])
int_ -= sc->data[SC_STOMACHACHE]->val1;
if(sc->data[SC_KYOUGAKU])
- int_ -= sc->data[SC_KYOUGAKU]->val2;
+ int_ -= sc->data[SC_KYOUGAKU]->val3;
if(bl->type != BL_PC){
if(sc->data[SC_NOEQUIPHELM])
@@ -4455,7 +4455,7 @@ unsigned short status_calc_dex(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_STOMACHACHE])
dex -= sc->data[SC_STOMACHACHE]->val1;
if(sc->data[SC_KYOUGAKU])
- dex -= sc->data[SC_KYOUGAKU]->val2;
+ dex -= sc->data[SC_KYOUGAKU]->val3;
if(sc->data[SC_MARSHOFABYSS])
dex -= dex * sc->data[SC_MARSHOFABYSS]->val2 / 100;
@@ -4503,7 +4503,7 @@ unsigned short status_calc_luk(struct block_list *bl, struct status_change *sc,
if(sc->data[SC_STOMACHACHE])
luk -= sc->data[SC_STOMACHACHE]->val1;
if(sc->data[SC_KYOUGAKU])
- luk -= sc->data[SC_KYOUGAKU]->val2;
+ luk -= sc->data[SC_KYOUGAKU]->val3;
if(sc->data[SC_LAUDARAMUS])
luk += 4 + sc->data[SC_LAUDARAMUS]->val1;
@@ -6559,9 +6559,6 @@ int status_get_sc_def(struct block_list *src, struct block_list *bl, enum sc_typ
case SC_SIREN:
tick_def2 = (status->get_lv(bl) * 100) + ((bl->type == BL_PC)?((TBL_PC*)bl)->status.job_level : 0);
break;
- case SC_KYOUGAKU:
- tick_def2 = st->int_ * 50;
- break;
case SC_NEEDLE_OF_PARALYZE:
tick_def2 = (st->vit + st->luk) * 50;
break;
@@ -8910,9 +8907,13 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
val4 = tick / 10000;
tick_time = 10000; // [GodLesZ] tick time
break;
- case SC_KYOUGAKU:
- val2 = 2*val1 + rand()%(3 * val1);
- clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
+ case SC_KYOUGAKU: {
+ int min = val1*2;
+ int max = val1*3;
+ val3 = rnd()%(max-min)+min;
+ val2 = val1;
+ val1 = 1002; // Monster ID
+ }
break;
case SC_KAGEMUSYA:
val3 = val1 * 2;
@@ -9059,9 +9060,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_KAAHI:
val4 = INVALID_TIMER;
break;
- case SC_KYOUGAKU:
- clif->status_change(bl, SI_ACTIVE_MONSTER_TRANSFORM, 1, 0, 1002, 0, 0); // Poring in disguise
- break;
}
}
@@ -9182,6 +9180,9 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_WATER_BARRIER:
val_flag |= 1|2|4;
break;
+ case SC_KYOUGAKU:
+ val_flag |= 1;
+ break;
case SC_CASH_PLUSEXP:
case SC_CASH_PLUSONLYJOBEXP:
case SC_MONSTER_TRANSFORM:
@@ -9240,7 +9241,6 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t
case SC_CURSEDCIRCLE_TARGET:
case SC_FEAR:
case SC_MEIKYOUSISUI:
- case SC_KYOUGAKU:
case SC_NEEDLE_OF_PARALYZE:
case SC_DEATHBOUND:
unit->stop_walking(bl,1);
@@ -10133,9 +10133,6 @@ int status_change_end_(struct block_list* bl, enum sc_type type, int tid, const
}
}
break;
- case SC_KYOUGAKU:
- clif->sc_end(&sd->bl,sd->bl.id,AREA,SI_ACTIVE_MONSTER_TRANSFORM);
- break;
case SC_CLAIRVOYANCE:
calc_flag = SCB_ALL;/* required for overlapping */
break;
diff --git a/src/map/unit.c b/src/map/unit.c
index 13465e166..12d125c49 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -939,7 +939,6 @@ int unit_can_move(struct block_list *bl) {
|| (sc->data[SC_CAMOUFLAGE] && sc->data[SC_CAMOUFLAGE]->val1 < 3 && !(sc->data[SC_CAMOUFLAGE]->val3&1))
|| sc->data[SC_MEIKYOUSISUI]
|| sc->data[SC_KG_KAGEHUMI]
- || sc->data[SC_KYOUGAKU]
|| sc->data[SC_NEEDLE_OF_PARALYZE]
|| sc->data[SC_VACUUM_EXTREME]
|| (sc->data[SC_FEAR] && sc->data[SC_FEAR]->val2 > 0)