diff options
author | Michieru <Michieru@users.noreply.github.com> | 2014-08-06 15:07:26 +0100 |
---|---|---|
committer | Michieru <Michieru@users.noreply.github.com> | 2014-08-06 15:07:26 +0100 |
commit | 356a83b11ae56778992b27b0c9b358d7d79722cd (patch) | |
tree | f113b57f6276ff0ed4c26c9042b7e41c11382e51 /src/map/status.c | |
parent | 254f47e4f04141f6ceeb68d0dbbb4a0001d01a24 (diff) | |
download | hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.gz hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.bz2 hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.tar.xz hercules-356a83b11ae56778992b27b0c9b358d7d79722cd.zip |
- Fix 3rd class skills on pre-renewal.
- When under Mind Break Matk Effect and Mdef reduction should not show on ALT Q(bug:7915)
- Plagiarism should not copy New 3rd class skills. Thanks to OmegaRed (bug:8118)
- Update Runstone Lux Anima to official formula (bug:8285)
- Add official formula for Demonic Fire
- Update damage formula for Unlimit, apply Def and Mdef to 1 during the skill and adjust the cooldown to official. (bug:8227)
- Flash Combo should not consume hp-sp and the skill not ignore the distance.
- Fix a bug with Full Throttle that not consuming sp correctly and adjust the cooldown to official.
- All WoE items are inactive outside WoE or PVP
- Add bonus3 bSPVanishRate for Vellum Items.
- Script Vellum Items.
- Add 2 new bonus bSetDefRace and bSetMDefRace for the Vellum Items. (rAthena c046668034)
- Fixed Bowling Bash, Brandish Spear, Grand Darkness and Meteor Assault reducing def during cast; the only skill that does this officially is Grand Cross (rAthena 694719048e)
- Implemented official Bowling Bash with all its special behaviors including the gutter line
* As many servers probably want to remove the gutter line problem, it is configurable; just adjust the bowling_bash_area setting in skill.conf (Bug:4209)
- Sonic Blow now has a fixed range of 1, even for monsters; a monster can't use this skill if you tank it from farther away (rAthena a15cee063d)
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 50 |
1 files changed, 34 insertions, 16 deletions
diff --git a/src/map/status.c b/src/map/status.c index 30bedf565..df0f65fd7 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -586,7 +586,7 @@ void initChangeTables(void) { add_sc( RA_VERDURETRAP , SC_ARMOR_PROPERTY ); add_sc( RA_FIRINGTRAP , SC_BURNING ); add_sc( RA_ICEBOUNDTRAP , SC_FROSTMISTY ); - set_sc( RA_UNLIMIT , SC_UNLIMIT , SI_UNLIMIT , SCB_NONE ); + set_sc( RA_UNLIMIT , SC_UNLIMIT , SI_UNLIMIT , SCB_DEF|SCB_DEF2|SCB_MDEF|SCB_MDEF2 ); /** * Mechanic **/ @@ -1002,6 +1002,8 @@ void initChangeTables(void) { status->ChangeFlagTable[SC_VITATA_500] |= SCB_REGEN; status->ChangeFlagTable[SC_EXTRACT_SALAMINE_JUICE] |= SCB_ASPD; status->ChangeFlagTable[SC_REBOUND] |= SCB_SPEED|SCB_REGEN; + status->ChangeFlagTable[SC_DEFSET] |= SCB_DEF|SCB_DEF2;
+ status->ChangeFlagTable[SC_MDEFSET] |= SCB_MDEF|SCB_MDEF2; status->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED; status->ChangeFlagTable[SC_WEDDING] = SCB_SPEED; @@ -2514,6 +2516,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { + sizeof(sd->skillfixcast) + sizeof(sd->skillvarcast) + sizeof(sd->skillfixcastrate) + + sizeof(sd->def_set_race)
+ + sizeof(sd->mdef_set_race) ); memset (&sd->bonus, 0,sizeof(sd->bonus)); @@ -4686,6 +4690,8 @@ 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); } @@ -4716,8 +4722,6 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, matk += sc->data[SC_ZANGETSU]->val3; if (sc->data[SC_MAGICPOWER] && sc->data[SC_MAGICPOWER]->val4) matk += matk * sc->data[SC_MAGICPOWER]->val3/100; - if (sc->data[SC_MINDBREAKER]) - matk += matk * sc->data[SC_MINDBREAKER]->val2/100; if (sc->data[SC_INCMATKRATE]) matk += matk * sc->data[SC_INCMATKRATE]->val1/100; if (sc->data[SC_MOONLIT_SERENADE]) @@ -4933,6 +4937,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def def += 2 * sc->data[SC_GENTLETOUCH_REVITALIZE]->val4; if( sc->data[SC_FORCEOFVANGUARD] ) def += def * 2 * sc->data[SC_FORCEOFVANGUARD]->val1 / 100; + if(sc->data[SC_DEFSET])
+ return sc->data[SC_DEFSET]->val1; return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -5007,6 +5013,8 @@ defType status_calc_def(struct block_list *bl, struct status_change *sc, int def if(status_get_race(bl)==RC_PLANT) def /= 2; } + if(sc->data[SC_UNLIMIT])
+ return 1; return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -5028,6 +5036,8 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i #endif if( sc && sc->data[SC_CAMOUFLAGE] ) def2 -= def2 * 5 * (10-sc->data[SC_CAMOUFLAGE]->val4) / 100; + if(sc->data[SC_DEFSET])
+ return sc->data[SC_DEFSET]->val1; #ifdef RENEWAL return (short)cap_value(def2,SHRT_MIN,SHRT_MAX); #else @@ -5074,7 +5084,8 @@ signed short status_calc_def2(struct block_list *bl, struct status_change *sc, i } if (sc->data[SC_NEEDLE_OF_PARALYZE]) def2 -= def2 * sc->data[SC_NEEDLE_OF_PARALYZE]->val2 / 100; - + if (sc->data[SC_UNLIMIT])
+ return 1; #ifdef RENEWAL return (short)cap_value(def2,SHRT_MIN,SHRT_MAX); #else @@ -5090,6 +5101,8 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md if( !viewable ){ /* some statuses that are hidden in the status window */ + if(sc->data[SC_MDEFSET])
+ return sc->data[SC_MDEFSET]->val1; return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -5129,6 +5142,8 @@ defType status_calc_mdef(struct block_list *bl, struct status_change *sc, int md mdef -= 20; if(sc->data[SC_BURNING]) mdef -= mdef *25 / 100; + if (sc->data[SC_UNLIMIT]) + return 1; return (defType)cap_value(mdef,DEFTYPE_MIN,DEFTYPE_MAX); } @@ -5144,6 +5159,10 @@ signed short status_calc_mdef2(struct block_list *bl, struct status_change *sc, if( !viewable ){ /* some statuses that are hidden in the status window */ + if(sc->data[SC_MDEFSET])
+ return sc->data[SC_MDEFSET]->val1; + if(sc->data[SC_MINDBREAKER]) + mdef2 -= mdef2 * sc->data[SC_MINDBREAKER]->val3/100; #ifdef RENEWAL if(sc && sc->data[SC_ASSUMPTIO]) mdef2 <<= 1; @@ -5157,11 +5176,10 @@ signed short status_calc_mdef2(struct block_list *bl, struct status_change *sc, return 0; if(sc->data[SC_SKA]) return 90; - if(sc->data[SC_MINDBREAKER]) - mdef2 -= mdef2 * sc->data[SC_MINDBREAKER]->val3/100; if(sc->data[SC_ANALYZE]) mdef2 -= mdef2 * ( 14 * sc->data[SC_ANALYZE]->val1 ) / 100; - + if (sc->data[SC_UNLIMIT]) + return 1; #ifdef RENEWAL return (short)cap_value(mdef2,SHRT_MIN,SHRT_MAX); #else @@ -8983,11 +9001,11 @@ int status_change_start(struct block_list *src, struct block_list *bl, enum sc_t if(val2 == MH_MD_FIGHTING) val2 = MH_MD_GRAPPLING; else val2 = MH_MD_FIGHTING; break; - case SC_FULL_THROTTLE: + case SC_FULL_THROTTLE:
status_percent_heal(bl,100,0); val2 = 7 - val1; - tick_time = 1000; - val4 = tick / tick_time; + tick_time = 1000;
+ val4 = tick / tick_time;
break; case SC_KINGS_GRACE: val2 = 3 + val1; @@ -11235,12 +11253,12 @@ int status_change_timer(int tid, int64 tick, int id, intptr_t data) { return 0; } break; - case SC_FULL_THROTTLE: - if( --(sce->val4) > 0 ) { - status_percent_damage(bl, bl, sce->val2, 0, false); - sc_timer_next(1000 + tick, status->change_timer, bl->id, data); - return 0; - } + case SC_FULL_THROTTLE:
+ if( --(sce->val4) >= 0 ) {
+ status_percent_damage(bl, bl, 0, sce->val2, false);
+ sc_timer_next(1000 + tick, status->change_timer, bl->id, data);
+ return 0;
+ }
break; case SC_KINGS_GRACE: if( --(sce->val4) > 0 ) { |