diff options
author | malufett <malufett.eat.my.binaries@gmail.com> | 2013-12-30 17:56:48 +0800 |
---|---|---|
committer | malufett <malufett.eat.my.binaries@gmail.com> | 2013-12-30 17:56:48 +0800 |
commit | 08fa33bf08a9e2bb5ecee5ad53a5cd592f887837 (patch) | |
tree | f8731a1dafaf70d8f92c2e8bfdfcd1108522a2a6 /src/map | |
parent | 0a7c002990ba08a39156b966cbd8e8e7ad3a4ce4 (diff) | |
download | hercules-08fa33bf08a9e2bb5ecee5ad53a5cd592f887837.tar.gz hercules-08fa33bf08a9e2bb5ecee5ad53a5cd592f887837.tar.bz2 hercules-08fa33bf08a9e2bb5ecee5ad53a5cd592f887837.tar.xz hercules-08fa33bf08a9e2bb5ecee5ad53a5cd592f887837.zip |
Fixed Bug#7735
-http://hercules.ws/board/tracker/issue-7735-royal-guards-rage-burst/
Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/battle.c | 14 | ||||
-rw-r--r-- | src/map/skill.c | 9 | ||||
-rw-r--r-- | src/map/status.c | 18 | ||||
-rw-r--r-- | src/map/status.h | 1 |
4 files changed, 20 insertions, 22 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index b8143213a..915825572 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2251,10 +2251,10 @@ int battle_calc_skillratio(int attack_type, struct block_list *src, struct block RE_LVL_DMOD(100); break; case LG_RAGEBURST: - if( sd && sd->spiritball_old ) - skillratio += -100 + (sd->spiritball_old * 200); - else - skillratio += -100 + 15 * 200; + if( sc ){ + skillratio += -100 + (status_get_max_hp(src) - status_get_hp(src)) / 100 + sc->fv_counter * 200; + clif->millenniumshield(sd, (sc->fv_counter = 0)); + } RE_LVL_DMOD(100); break; case LG_SHIELDSPELL:// [(Casters Base Level x 4) + (Shield DEF x 10) + (Casters VIT x 2)] % @@ -2932,8 +2932,10 @@ int64 battle_calc_damage(struct block_list *src,struct block_list *bl,struct Dam rnd()%100 < sce->val3) status->heal(src, damage*sce->val4/100, 0, 3); - if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON && rnd()%100 < sce->val2 ) - pc->addspiritball(sd,skill->get_time(LG_FORCEOFVANGUARD,sce->val1),sce->val3); + if( sd && (sce = sc->data[SC_FORCEOFVANGUARD]) && flag&BF_WEAPON + && rnd()%100 < sce->val2 && sc->fv_counter <= sce->val3 ) + clif->millenniumshield(sd, sc->fv_counter++); + if (sc->data[SC_STYLE_CHANGE] && rnd()%2) { TBL_HOM *hd = BL_CAST(BL_HOM,bl); if (hd) homun->addspiritball(hd, 10); //add a sphere diff --git a/src/map/skill.c b/src/map/skill.c index 71e343db0..6499f9084 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6069,6 +6069,8 @@ int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uin clif->skill_nodamage(src,bl,skill_id,( skill_id == LG_FORCEOFVANGUARD ) ? skill_lv : -1,failure); else if( sd ) clif->skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); + if ( skill_id == LG_FORCEOFVANGUARD ) + break; map->freeblock_unlock(); return 0; } @@ -12950,13 +12952,6 @@ int skill_check_condition_castbegin(struct map_session_data* sd, uint16 skill_id return 0; } break; - case LG_RAGEBURST: - if( sd->spiritball == 0 ) { - clif->skill_fail(sd,skill_id,USESKILL_FAIL_SKILLINTERVAL,0); - return 0; - } - sd->spiritball_old = require.spiritball = sd->spiritball; - break; case LG_RAYOFGENESIS: if( sc && sc->data[SC_INSPIRATION] ) return 1; // Don't check for partner. diff --git a/src/map/status.c b/src/map/status.c index 7d354718d..afc00e348 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4832,6 +4832,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def def -= def * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100; if( sc && sc->data[SC_GENTLETOUCH_REVITALIZE] && sc->data[SC_GENTLETOUCH_REVITALIZE]->val4 ) def += 2 * sc->data[SC_GENTLETOUCH_REVITALIZE]->val4; + if( sc->data[SC_FORCEOFVANGUARD] ) + def += def * 2 * sc->data[SC_FORCEOFVANGUARD]->val1 / 100; return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -4882,8 +4884,6 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def def -= def * (sc->data[SC_FLING]->val2)/100; if( sc->data[SC_ANALYZE] ) def -= def * ( 14 * sc->data[SC_ANALYZE]->val1 ) / 100; - if( sc->data[SC_FORCEOFVANGUARD] ) - def += def * 2 * sc->data[SC_FORCEOFVANGUARD]->val1 / 100; if(sc->data[SC_SATURDAY_NIGHT_FEVER]) def -= def * (10 + 10 * sc->data[SC_SATURDAY_NIGHT_FEVER]->val1) / 100; if(sc->data[SC_EARTHDRIVE]) @@ -8406,11 +8406,10 @@ int status_change_start(struct block_list* bl,enum sc_type type,int rate,int val val4 = tick/10000; tick_time = 10000; // [GodLesZ] tick time break; - case SC_FORCEOFVANGUARD: // This is not the official way to handle it but I think we should use it. [pakpil] - val2 = 20 + 12 * (val1 - 1); // Chance - val3 = 5 + (2 * val1); // Max rage counters + case SC_FORCEOFVANGUARD: + val2 = 8 + 12 * val1; // Chance + val3 = 5 + 2 * val1; // Max rage counters tick = -1; //endless duration in the client - tick_time = 6000; // [GodLesZ] tick time break; case SC_EXEEDBREAK: val1 *= 150; // 150 * skill_lv @@ -9265,6 +9264,7 @@ int status_change_clear(struct block_list* bl, int type) { sc->opt2 = 0; sc->opt3 = 0; sc->bs_counter = 0; + sc->fv_counter = 0; #ifndef RENEWAL sc->sg_counter = 0; #endif @@ -10654,11 +10654,11 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { return 0; } break; - + case SC_FORCEOFVANGUARD: - if( !status->charge(bl,0,20) ) + if( !status->charge(bl, 0, (24 - 4 * sce->val1)) ) break; - sc_timer_next(6000 + tick, status->change_timer, bl->id, data); + sc_timer_next(10000 + tick, status->change_timer, bl->id, data); return 0; case SC_BANDING: diff --git a/src/map/status.h b/src/map/status.h index 1fd354c79..44cc3b0a1 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1777,6 +1777,7 @@ struct status_change { unsigned char sg_counter; //Storm gust counter (previous hits from storm gust) #endif unsigned char bs_counter; // Blood Sucker counter + unsigned char fv_counter; // Force of vanguard counter struct status_change_entry *data[SC_MAX]; }; |