diff options
author | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-02 11:52:46 +0000 |
---|---|---|
committer | rud0lp20 <rud0lp20@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2012-11-02 11:52:46 +0000 |
commit | afa1863b80369377674c1f9b83b5151e51e070f3 (patch) | |
tree | 67ff4192c50fb932415033ee97806a1dbbcf5aa5 /src | |
parent | 783ff0464941dbd3172b77afba62f3e493733480 (diff) | |
download | hercules-afa1863b80369377674c1f9b83b5151e51e070f3.tar.gz hercules-afa1863b80369377674c1f9b83b5151e51e070f3.tar.bz2 hercules-afa1863b80369377674c1f9b83b5151e51e070f3.tar.xz hercules-afa1863b80369377674c1f9b83b5151e51e070f3.zip |
Fixed bugreport:6839 where SC_CAMOUFLAGE is not ending properly.
Fixed bugreport:6710 where SR_EARTHSHAKER ATK bonus is not applied properly.
Implemented KO_MAKIBISHI and updated some Kagerou/Oboro skills.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16857 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/skill.c | 29 | ||||
-rw-r--r-- | src/map/status.c | 32 |
3 files changed, 48 insertions, 14 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index b9c865099..47f18e881 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3320,6 +3320,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src,struct blo ATK_ADD( ( sc->data[SC_ENCHANTBLADE]->val1*20+100 ) * status_get_lv(src) / 150 + status_get_int(src) ); } } + status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER); } if( skill_num == LG_RAYOFGENESIS ) { struct Damage md = battle_calc_magic_attack(src, target, skill_num, skill_lv, wflag); diff --git a/src/map/skill.c b/src/map/skill.c index ef1089f26..d3c60591b 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -819,8 +819,6 @@ int skill_additional_effect (struct block_list* src, struct block_list *bl, int if((sce=sc->data[SC_EDP])) sc_start4(bl,SC_DPOISON,sce->val2, sce->val1,src->id,0,0, skill_get_time2(ASC_EDP,sce->val1)); - // Cancels on normal attack but benefits with the bonuses - status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER); } } break; @@ -4422,9 +4420,9 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int case SR_EARTHSHAKER: if( flag&1 ) { //by default cloaking skills are remove by aoe skills so no more checking/removing except hiding and cloaking exceed. + skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag); status_change_end(bl, SC_HIDING, INVALID_TIMER); status_change_end(bl, SC_CLOAKINGEXCEED, INVALID_TIMER); - skill_attack(BF_WEAPON, src, src, bl, skillid, skilllv, tick, flag); } else{ map_foreachinrange(skill_area_sub, bl, skill_get_splash(skillid, skilllv), splash_target(src), src, skillid, skilllv, tick, flag|BCT_ENEMY|SD_SPLASH|1, skill_castend_damage_id); clif_skill_damage(src, src, tick, status_get_amotion(src), 0, -30000, 1, skillid, skilllv, 6); @@ -4543,7 +4541,6 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int skill_castend_damage_id); flag|=1; //Set flag to 1 so ammo is not double-consumed. [Skotlex] } - status_change_end(src,SC_CAMOUFLAGE, INVALID_TIMER); } break; @@ -8747,7 +8744,8 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in break; case KO_JYUSATSU: - if( dstsd && tsc && !tsc->data[type] && rand()%100 < tstatus->int_/2 ){ + if( dstsd && tsc && !tsc->data[type] && + rand()%100 < ((45+5*skilllv) + skilllv*5 - status_get_int(bl)/2) ){//[(Base chance of success) + (Skill Level x 5) - (int / 2)]%. clif_skill_nodamage(src,bl,skillid,skilllv, status_change_start(bl,type,10000,skilllv,0,0,0,skill_get_time(skillid,skilllv),1)); status_zap(bl, tstatus->max_hp*skilllv*5/100 , 0); @@ -8760,6 +8758,12 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, in case KO_GENWAKU: if ( !map_flag_gvg(src->m) && ( dstsd || dstmd ) && battle_check_target(src,bl,BCT_ENEMY) > 0 ) { int x = src->x, y = src->y; + + if( sd && rnd()%100 > ((45+5*skilllv) - status_get_int(bl)/10) ){//[(Base chance of success) - (Intelligence Objectives / 10)]%. + clif_skill_fail(sd,skillid,USESKILL_FAIL_LEVEL,0); + break; + } + if (unit_movepos(src,bl->x,bl->y,0,0)) { clif_skill_nodamage(src,src,skillid,skilllv,1); clif_slide(src,bl->x,bl->y) ; @@ -9539,7 +9543,6 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk case KO_MUCHANAGE: case KO_BAKURETSU: case KO_ZENKAI: - //case KO_MAKIBISHI: flag|=1;//Set flag to 1 to prevent deleting ammo (it will be deleted on group-delete). case GS_GROUNDDRIFT: //Ammo should be deleted right away. skill_unitsetting(src,skillid,skilllv,x,y,0); @@ -10000,6 +10003,14 @@ int skill_castend_pos2(struct block_list* src, int x, int y, int skillid, int sk flag |= 33; skill_unitsetting(src, skillid, skilllv, x, y, 0); break; + + case KO_MAKIBISHI: + for( i = 0; i < (skilllv+2); i++ ) { + x = src->x - 1 + rnd()%3; + y = src->y - 1 + rnd()%3; + skill_unitsetting(src,skillid,skilllv,x,y,0); + } + break; default: if( skillid >= HM_SKILLBASE && skillid <= HM_SKILLBASE + MAX_HOMUNSKILL ) { if( src->type == BL_HOM && ((TBL_HOM*)src)->master->fd ) @@ -11252,7 +11263,6 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns case UNT_FLASHER: case UNT_FREEZINGTRAP: case UNT_FIREPILLAR_ACTIVE: - case UNT_MAKIBISHI: map_foreachinrange(skill_trap_splash,&src->bl, skill_get_splash(sg->skill_id, sg->skill_lv), sg->bl_flag, &src->bl,tick); if (sg->unit_id != UNT_FIREPILLAR_ACTIVE) clif_changetraplook(&src->bl, sg->unit_id==UNT_LANDMINE?UNT_FIREPILLAR_ACTIVE:UNT_USED_TRAPS); @@ -11677,6 +11687,11 @@ int skill_unit_onplace_timer (struct skill_unit *src, struct block_list *bl, uns sc_start2(bl,type,100,sg->val1,sg->val2,skill_get_time2(sg->skill_id, sg->skill_lv)); break; + case UNT_MAKIBISHI: + skill_attack(BF_MISC, ss, &src->bl, bl, sg->skill_id, sg->skill_lv, tick, 0); + sg->limit = DIFF_TICK(tick, sg->tick); + sg->unit_id = UNT_USED_TRAPS; + break; } if (bl->type == BL_MOB && ss != bl) diff --git a/src/map/status.c b/src/map/status.c index e8bc3bc5e..b42e1b3a1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -714,7 +714,7 @@ void initChangeTables(void) { set_sc( EL_ROCK_CRUSHER_ATK, SC_ROCK_CRUSHER_ATK , SI_ROCK_CRUSHER_ATK , SCB_SPEED ); add_sc( KO_YAMIKUMO , SC_HIDING ); - set_sc( KO_JYUMONJIKIRI , SC_JYUMONJIKIRI , SI_KO_JYUMONJIKIRI , SCB_NONE ); + set_sc_with_vfx( KO_JYUMONJIKIRI , SC_JYUMONJIKIRI , SI_KO_JYUMONJIKIRI , SCB_NONE ); add_sc( KO_MAKIBISHI , SC_STUN ); set_sc( KO_MEIKYOUSISUI , SC_MEIKYOUSISUI , SI_MEIKYOUSISUI , SCB_NONE ); set_sc( KO_KYOUGAKU , SC_KYOUGAKU , SI_KYOUGAKU , SCB_STR|SCB_AGI|SCB_VIT|SCB_INT|SCB_DEX|SCB_LUK ); @@ -1004,6 +1004,7 @@ void initChangeTables(void) { StatusChangeStateTable[SC_CAMOUFLAGE] |= SCS_NOMOVE|SCS_NOMOVECOND; StatusChangeStateTable[SC_MEIKYOUSISUI] |= SCS_NOMOVE; StatusChangeStateTable[SC_KAGEHUMI] |= SCS_NOMOVE; + StatusChangeStateTable[SC_KYOUGAKU] |= SCS_NOMOVE; /* StatusChangeState (SCS_) NOPICKUPITEMS */ StatusChangeStateTable[SC_HIDING] |= SCS_NOPICKITEM; @@ -8317,7 +8318,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val break; case SC_KYOUGAKU: val2 = 2*val1 + rand()%val1; - clif_status_change(bl,SI_ACTIVE_MONSTER_TRANSFORM,1,0,1002,0,0); // Temporarily shows Poring need official [malufett] + clif_status_change(bl,SI_ACTIVE_MONSTER_TRANSFORM,1,0,1002,0,0); break; case SC_KAGEMUSYA: val3 = val1 * 2; @@ -8326,13 +8327,29 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val tick_time = 1000; break; case SC_ZANGETSU: - val2 = status_get_lv(bl) / 2 + 50; + if( (status_get_hp(bl)+status_get_sp(bl)) % 2 == 0) + val2 = status_get_lv(bl) / 2 + 50; + else + val2 -= 50; break; case SC_GENSOU: - if( rand()%100 < 50) // needs more info - status_zap(bl, 500, 500); - else - status_heal(bl, 500, 500, 0); + { + int hp = status_get_hp(bl), lv = 5; + short per = 100 / (status_get_max_hp(bl) / hp); + + if( per <= 15 ) + lv = 1; + else if( per <= 30 ) + lv = 2; + else if( per <= 50 ) + lv = 3; + else if( per <= 75 ) + lv = 4; + if( hp % 2 == 0) + status_heal(bl, hp * (6-lv) * 4 / 100, status_get_sp(bl) * (6-lv) * 3 / 100, 1); + else + status_zap(bl, hp * (lv*4) / 100, status_get_sp(bl) * (lv*3) / 100); + } break; default: if( calc_flag == SCB_NONE && StatusSkillChangeTable[type] == 0 && StatusIconChangeTable[type] == 0 ) @@ -8389,6 +8406,7 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val case SC_FEAR: case SC_NETHERWORLD: case SC_MEIKYOUSISUI: + case SC_KYOUGAKU: unit_stop_walking(bl,1); break; case SC_HIDING: |