diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-03-16 16:34:48 +0100 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-03-16 16:34:48 +0100 |
commit | 48d29089a06bb207276ef53754e6a0d217cfcc77 (patch) | |
tree | 0cd0100bf73cf8a9cd4e29de780425267e0a014f /src | |
parent | 235ec5df3f3b19843523109228d86196f71c9798 (diff) | |
download | hercules-48d29089a06bb207276ef53754e6a0d217cfcc77.tar.gz hercules-48d29089a06bb207276ef53754e6a0d217cfcc77.tar.bz2 hercules-48d29089a06bb207276ef53754e6a0d217cfcc77.tar.xz hercules-48d29089a06bb207276ef53754e6a0d217cfcc77.zip |
Fix Bug 8041
http://hercules.ws/board/tracker/issue-8041-sura-cresent-elbow/
Special Thanks to Ind
Fix Bug 6826
http://hercules.ws/board/tracker/issue-6826-crescent-elbow/?gopid=15188#entry15188
Fix Bug 8075
http://hercules.ws/board/tracker/issue-8075-lightning-walk/
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 29 | ||||
-rw-r--r-- | src/map/status.c | 3 |
2 files changed, 18 insertions, 14 deletions
diff --git a/src/map/battle.c b/src/map/battle.c index 24f39a35d..91db3202c 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5317,20 +5317,21 @@ void battle_reflect_damage(struct block_list *target, struct block_list *src, st sc = NULL; if( sc ) { - - if( sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){ - //ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}] - int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status->get_lv(target) / 125; - if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK - rdamage = rdamage * ratio / 100 + (damage) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; - skill->blown(target, src, skill->get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1), unit->getdir(src), 0); - clif->skill_damage(target, src, tick, status_get_amotion(src), 0, rdamage, - 1, SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1, 6); // This is how official does - clif->delay_damage(tick + delay, src, target,status_get_amotion(src)+1000,0, rdamage/10, 1, 0); - status->damage(src, target, status->damage(target, src, rdamage, 0, 0, 1)/10, 0, 0, 1); - status_change_end(target, SC_CRESCENTELBOW, INVALID_TIMER); - /* shouldn't this trigger skill->additional_effect? */ - return; // Just put here to minimize redundancy + if (wd->flag & BF_SHORT && !(skill->get_inf(skill_id) & (INF_GROUND_SKILL | INF_SELF_SKILL))) { + if( sc->data[SC_CRESCENTELBOW] && !is_boss(src) && rnd()%100 < sc->data[SC_CRESCENTELBOW]->val2 ){ + //ATK [{(Target HP / 100) x Skill Level} x Caster Base Level / 125] % + [Received damage x {1 + (Skill Level x 0.2)}] + int ratio = (status_get_hp(src) / 100) * sc->data[SC_CRESCENTELBOW]->val1 * status->get_lv(target) / 125; + if (ratio > 5000) ratio = 5000; // Maximum of 5000% ATK + rdamage = rdamage * ratio / 100 + (damage) * (10 + sc->data[SC_CRESCENTELBOW]->val1 * 20 / 10) / 10; + skill->blown(target, src, skill->get_blewcount(SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1), unit->getdir(src), 0); + clif->skill_damage(target, src, tick, status_get_amotion(src), 0, rdamage, + 1, SR_CRESCENTELBOW_AUTOSPELL, sc->data[SC_CRESCENTELBOW]->val1, 6); // This is how official does + clif->delay_damage(tick + delay, src, target,status_get_amotion(src)+1000,0, rdamage/10, 1, 0); + status->damage(src, target, status->damage(target, src, rdamage, 0, 0, 1)/10, 0, 0, 1); + status_change_end(target, SC_CRESCENTELBOW, INVALID_TIMER); + /* shouldn't this trigger skill->additional_effect? */ + return; // Just put here to minimize redundancy + } } if( wd->flag & BF_SHORT ) { diff --git a/src/map/status.c b/src/map/status.c index 46f6d265d..c989b46b2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8736,6 +8736,9 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t tick_time = 5000; // [GodLesZ] tick time status->change_clear_buffs(bl,3); //Remove buffs/debuffs break; + case SC_CRESCENTELBOW: + val2 = (sd ? sd->status.job_level : 2) / 2 + 50 + 5 * val1; + break; case SC_LIGHTNINGWALK: // [(Job Level / 2) + (40 + 5 * Skill Level)] % val1 = (sd?sd->status.job_level:2)/2 + 40 + 5 * val1; break; |