diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-09-13 11:27:51 +0200 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-09-13 11:27:51 +0200 |
commit | 45d77eed7a16245b38fe46eb9d71074d33106946 (patch) | |
tree | 2d3612f73ccfb6ed38abdf4077385c16cb64f5af /src | |
parent | 3a5467ccd69878b3303d0de38d918bd25d232c76 (diff) | |
download | hercules-45d77eed7a16245b38fe46eb9d71074d33106946.tar.gz hercules-45d77eed7a16245b38fe46eb9d71074d33106946.tar.bz2 hercules-45d77eed7a16245b38fe46eb9d71074d33106946.tar.xz hercules-45d77eed7a16245b38fe46eb9d71074d33106946.zip |
Update formula of Vulcan Arm, Flame Laucher and Cold Slower.
Add Hesperuslit formula effect.
Banding now count the caster.
Fix a bug with Lex Aeterna that not double the damage of Acid Demo. (bug:8098)
Update to official formula Reproduce skill.
Fix Mind Breaker Matk. (bug:8328)
Fix a map crash with Gentle Touch change. (bug:8326)
Special Thanks to Ind
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 44 | ||||
-rw-r--r-- | src/map/pc.c | 3 | ||||
-rw-r--r-- | src/map/skill.c | 23 | ||||
-rw-r--r-- | src/map/status.c | 10 |
4 files changed, 59 insertions, 21 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 8930d3a7e..6cbd6379f 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2197,12 +2197,12 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block break; case NC_VULCANARM: skillratio = 70 * skill_lv + status_get_dex(src); - RE_LVL_DMOD(100); + RE_LVL_DMOD(120); break; case NC_FLAMELAUNCHER: case NC_COLDSLOWER: - skillratio += 200 + 100 * skill_lv + status_get_str(src); - RE_LVL_DMOD(100); + skillratio += 200 + 300 * skill_lv; + RE_LVL_DMOD(150); break; case NC_ARMSCANNON: switch( tst->size ) { @@ -2233,13 +2233,16 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block skillratio = skillratio * 75 / 100; break; case SC_FATALMENACE: - skillratio = 100 * (skill_lv+1) * status->get_lv(src) / 100; + skillratio = 100 * (skill_lv+1); + RE_LVL_DMOD(100); break; case SC_TRIANGLESHOT: - skillratio = ( 300 + (skill_lv-1) * status_get_agi(src)/2 ) * status->get_lv(src) / 120; + skillratio = ( 300 + (skill_lv-1) * status_get_agi(src)/2 ); + RE_LVL_DMOD(120); break; case SC_FEINTBOMB: - skillratio = (skill_lv+1) * (st->dex/2) * (sd?sd->status.job_level:50)/10 * status->get_lv(src) / 120; + skillratio = (skill_lv+1) * (st->dex/2) * (sd?sd->status.job_level:50)/10; + RE_LVL_DMOD(120); break; case LG_CANNONSPEAR: skillratio = (50 + st->str) * skill_lv; @@ -2307,7 +2310,14 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block RE_LVL_DMOD(100); break; case LG_HESPERUSLIT: - skillratio += 120 * skill_lv - 100; + skillratio = 120 * skill_lv; + if( sc && sc->data[SC_BANDING] ) + skillratio += 200 * sc->data[SC_BANDING]->val2; + if( sc && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 5 ) + skillratio = skillratio * 150 / 100; + if( sc && sc->data[SC_INSPIRATION] ) + skillratio += 600; + RE_LVL_DMOD(100); break; case SR_DRAGONCOMBO: skillratio += 40 * skill_lv; @@ -2797,7 +2807,11 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam } //Now damage increasing effects - if( sc->data[SC_LEXAETERNA] && skill_id != PF_SOULBURN ) + if( sc->data[SC_LEXAETERNA] && skill_id != PF_SOULBURN +#ifdef RENEWAL + && skill_id != CR_ACIDDEMONSTRATION +#endif + ) { if( src->type != BL_MER || skill_id == 0 ) damage <<= 1; // Lex Aeterna only doubles damage of regular attacks from mercenaries @@ -3762,6 +3776,10 @@ struct Damage battle_calc_misc_attack(struct block_list *src,struct block_list * md.damage >>= 1; } md.damage -= totaldef; + if( tsc && tsc->data[SC_LEXAETERNA] ) { + md.damage <<= 1; + status_change_end(target, SC_LEXAETERNA, INVALID_TIMER); + } } #else // updated the formula based on a Japanese formula found to be exact [Reddozen] @@ -4176,6 +4194,12 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list case LK_SPIRALPIERCE: if (!sd) wd.flag=(wd.flag&~(BF_RANGEMASK|BF_WEAPONMASK))|BF_LONG|BF_MISC; break; + + //When in banding, the number of hits is equal to the number of Royal Guards in banding. + case LG_HESPERUSLIT: + if( sc && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 3 ) + wd.div_ = sc->data[SC_BANDING]->val2; + break; case MO_INVESTIGATE: flag.pdef = flag.pdef2 = 2; @@ -4227,6 +4251,10 @@ struct Damage battle_calc_weapon_attack(struct block_list *src,struct block_list case LK_SPIRALPIERCE: if (!sd) n_ele = false; //forced neutral for monsters break; + case LG_HESPERUSLIT: + if ( sc && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 == 5 ) + s_ele = ELE_HOLY; // Banding with 5 RGs: change atk element to Holy. + break; } if (!(nk & NK_NO_ELEFIX) && !n_ele) diff --git a/src/map/pc.c b/src/map/pc.c index 2372d3105..25a15ce84 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -262,9 +262,6 @@ int pc_check_banding( struct block_list *bl, va_list ap ) { sc = status->get_sc(bl); - if( bl == src ) - return 0; - if( sc && sc->data[SC_BANDING] ) { b_sd[(*c)++] = tsd->bl.id; diff --git a/src/map/skill.c b/src/map/skill.c index 3b723e406..fc162d430 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -433,16 +433,12 @@ int can_copy (struct map_session_data *sd, uint16 skill_id, struct block_list* b return 0; // Couldn't preserve 3rd Class skills except only when using Reproduce skill. [Jobbie] - if( !(sd->sc.data[SC__REPRODUCE]) && ((skill_id >= RK_ENCHANTBLADE && skill_id <= SR_RIDEINLIGHTNING) || (skill_id >= KO_YAMIKUMO && skill_id <= OB_AKAITSUKI))) + if( !(sd->sc.data[SC__REPRODUCE]) && ((skill_id >= RK_ENCHANTBLADE && skill_id <= LG_OVERBRAND_PLUSATK) || (skill_id >= RL_GLITTERING_GREED && skill_id <= OB_AKAITSUKI) || (skill_id >= GC_DARKCROW && skill_id <= NC_MAGMA_ERUPTION_DOTDAMAGE))) return 0; // Reproduce will only copy skills according on the list. [Jobbie] else if( sd->sc.data[SC__REPRODUCE] && !skill->reproduce_db[skill->get_index(skill_id)] ) return 0; - //Never copy new 3rd class skills By OmegaRed - if(skill_id >= GC_DARKCROW && skill_id <= ALL_FULL_THROTTLE) - return 0; - return 1; } @@ -1210,6 +1206,14 @@ int skill_additional_effect(struct block_list* src, struct block_list *bl, uint1 rate = 30 + 8 * skill_lv + sstatus->dex / 10 + (sd? sd->status.job_level:0) / 4; sc_start(src, bl, SC_STUN, rate, skill_lv, skill->get_time(skill_id,skill_lv)); break; + case LG_HESPERUSLIT: + if ( sc && sc->data[SC_BANDING] ) { + if ( sc->data[SC_BANDING]->val2 == 4 ) // 4 banding RGs: Targets will be stunned at 100% chance for 4 ~ 8 seconds, irreducible by STAT. + status->change_start(src, bl, SC_STUN, 10000, skill_lv, 0, 0, 0, 1000*(4+rand()%4), 2); + else if ( sc->data[SC_BANDING]->val2 == 6 ) // 6 banding RGs: activate Pinpoint Attack Lv1-5 + skill->castend_damage_id(src,bl,LG_PINPOINTATTACK,1+rand()%5,tick,0); + } + break; case LG_PINPOINTATTACK: rate = 30 + 5 * (sd ? pc->checkskill(sd,LG_PINPOINTATTACK) : 1) + (sstatus->agi + status->get_lv(src)) / 10; switch( skill_lv ) { @@ -1667,6 +1671,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b int rate; struct map_session_data *sd=NULL; struct map_session_data *dstsd=NULL; + struct status_change *sc; nullpo_ret(src); nullpo_ret(bl); @@ -1675,6 +1680,7 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b sd = BL_CAST(BL_PC, src); dstsd = BL_CAST(BL_PC, bl); + sc = status->get_sc(src); if(dstsd && attack_type&BF_WEAPON) { //Counter effects. @@ -1723,6 +1729,13 @@ int skill_counter_additional_effect(struct block_list* src, struct block_list *b case NPC_GRANDDARKNESS: attack_type |= BF_WEAPON; break; + case LG_HESPERUSLIT: + if ( sc && sc->data[SC_FORCEOFVANGUARD] && sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 6 ) { + char i; + for( i = 0; i < sc->data[SC_FORCEOFVANGUARD]->val3; i++ && sc->fv_counter <= sc->data[SC_FORCEOFVANGUARD]->val3 ) + clif->millenniumshield(bl, sc->fv_counter++); + } + break; } if( sd && (sd->class_&MAPID_UPPERMASK) == MAPID_STAR_GLADIATOR diff --git a/src/map/status.c b/src/map/status.c index ac89f2a07..23184f46e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4584,7 +4584,7 @@ unsigned short status_calc_watk(struct block_list *bl, struct status_change *sc, watk += sc->data[SC_SHIELDSPELL_DEF]->val2; if(sc->data[SC_INSPIRATION]) watk += sc->data[SC_INSPIRATION]->val2; - if( sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 0 ) + if( sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 1 ) watk += (10 + 10 * sc->data[SC_BANDING]->val1) * (sc->data[SC_BANDING]->val2); if( sc->data[SC_TROPIC_OPTION] ) watk += sc->data[SC_TROPIC_OPTION]->val2; @@ -4677,8 +4677,6 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, if( !viewable ){ /* some statuses that are hidden in the status window */ - if (sc->data[SC_MINDBREAKER]) - matk += matk * sc->data[SC_MINDBREAKER]->val2/100; return (unsigned short)cap_value(matk,0,USHRT_MAX); } @@ -4703,6 +4701,8 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, if (sc->data[SC_IZAYOI]) matk += 25 * sc->data[SC_IZAYOI]->val1; #endif + if (sc->data[SC_MINDBREAKER]) + matk += matk * sc->data[SC_MINDBREAKER]->val2/100; if( sc->data[SC_ZANGETSU] ) matk += sc->data[SC_ZANGETSU]->val3; if (sc->data[SC_MAGICPOWER] && sc->data[SC_MAGICPOWER]->val4) @@ -5040,7 +5040,7 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i return 0; if(sc->data[SC_SUN_COMFORT]) def2 += sc->data[SC_SUN_COMFORT]->val2; - if( sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 0 ) + if( sc->data[SC_BANDING] && sc->data[SC_BANDING]->val2 > 1 ) def2 += (5 + sc->data[SC_BANDING]->val1) * (sc->data[SC_BANDING]->val2); if(sc->data[SC_ANGELUS]) #ifdef RENEWAL //in renewal only the VIT stat bonus is boosted by angelus @@ -8749,7 +8749,7 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t struct block_list * src2; val3 = st->agi * val1 / 60; // ASPD increase: [(Target AGI x Skill Level) / 60] % if( (src2 = map->id2bl(val2)) ){ - val4 = ( 200/status_get_int(src2) ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level] + val4 = ( 200/status_get_int(src2)?status_get_int(src2):1 ) * val1;// MDEF decrease: MDEF [(200 / Caster INT) x Skill Level] val2 = ( status_get_dex(src2)/4 + status_get_str(src2)/2 ) * val1 / 5; // ATK increase: ATK [{(Caster DEX / 4) + (Caster STR / 2)} x Skill Level / 5] } } |