diff options
author | Jedzkie <jedzkie13@rocketmail.com> | 2015-11-22 15:49:51 +0800 |
---|---|---|
committer | Jedzkie <jedzkie13@rocketmail.com> | 2015-11-22 15:49:51 +0800 |
commit | d8909d9b2cf29f45c025fb93fc1df94ec1a40854 (patch) | |
tree | babf98c9987ca13dc9afa412fcc9d3f2a7b3212c /src | |
parent | 14b14e16cf8d6cac2159d6c6425daaeda4a03f4b (diff) | |
download | hercules-d8909d9b2cf29f45c025fb93fc1df94ec1a40854.tar.gz hercules-d8909d9b2cf29f45c025fb93fc1df94ec1a40854.tar.bz2 hercules-d8909d9b2cf29f45c025fb93fc1df94ec1a40854.tar.xz hercules-d8909d9b2cf29f45c025fb93fc1df94ec1a40854.zip |
SC Update:
- Added 'Eden Crystal Synthesis' statuses.
- Added 'Geffen Magic Tournament' statuses.
Note: their sc_config.txt are not yet implemented, needs more information on official servers.
Diffstat (limited to 'src')
-rw-r--r-- | src/map/skill.c | 4 | ||||
-rw-r--r-- | src/map/status.c | 62 | ||||
-rw-r--r-- | src/map/status.h | 11 |
3 files changed, 75 insertions, 2 deletions
diff --git a/src/map/skill.c b/src/map/skill.c index 8a782fc9a..b20e25eb1 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -14743,6 +14743,7 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 } if (sc->data[SC_MYSTICSCROLL]) VARCAST_REDUCTION(sc->data[SC_MYSTICSCROLL]->val1); + // Fixed cast reduction bonuses if( sc->data[SC__LAZINESS] ) fixcast_r = max(fixcast_r, sc->data[SC__LAZINESS]->val2); @@ -14755,6 +14756,9 @@ int skill_vfcastfix(struct block_list *bl, double time, uint16 skill_id, uint16 if (radius_lv) fixcast_r = max(fixcast_r, (status_get_int(bl) + status->get_lv(bl)) / 15 + radius_lv * 5); // [{(Caster?s INT / 15) + (Caster?s Base Level / 15) + (Radius Skill Level x 5)}] % } + if (sc->data[SC_FENRIR_CARD]) + fixcast_r = max(fixcast_r, sc->data[SC_FENRIR_CARD]->val2); + // Fixed cast non percentage bonuses if( sc->data[SC_MANDRAGORA] ) fixed += sc->data[SC_MANDRAGORA]->val1 * 500; diff --git a/src/map/status.c b/src/map/status.c index 2e5eb5392..90a2531fc 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -827,6 +827,17 @@ void initChangeTables(void) { status->dbs->IconChangeTable[SC_ACARAJE] = SI_ACARAJE; status->dbs->IconChangeTable[SC_TARGET_ASPD] = SI_TARGET_ASPD; + // Eden Crystal Synthesis + status->dbs->IconChangeTable[SC_QUEST_BUFF1] = SI_QUEST_BUFF1; + status->dbs->IconChangeTable[SC_QUEST_BUFF2] = SI_QUEST_BUFF2; + status->dbs->IconChangeTable[SC_QUEST_BUFF3] = SI_QUEST_BUFF3; + + // Geffen Magic Tournament + status->dbs->IconChangeTable[SC_GEFFEN_MAGIC1] = SI_GEFFEN_MAGIC1; + status->dbs->IconChangeTable[SC_GEFFEN_MAGIC2] = SI_GEFFEN_MAGIC2; + status->dbs->IconChangeTable[SC_GEFFEN_MAGIC3] = SI_GEFFEN_MAGIC3; + status->dbs->IconChangeTable[SC_FENRIR_CARD] = SI_FENRIR_CARD; + // Mercenary Bonus Effects status->dbs->IconChangeTable[SC_MER_FLEE] = SI_MER_FLEE; status->dbs->IconChangeTable[SC_MER_ATK] = SI_MER_ATK; @@ -1043,10 +1054,22 @@ void initChangeTables(void) { status->dbs->ChangeFlagTable[SC_ALL_RIDING] = SCB_SPEED; status->dbs->ChangeFlagTable[SC_WEDDING] = SCB_SPEED; - status->dbs->ChangeFlagTable[SC_MTF_ASPD] = SCB_ASPD|SCB_HIT; + status->dbs->ChangeFlagTable[SC_MTF_ASPD] = SCB_ASPD | SCB_HIT; status->dbs->ChangeFlagTable[SC_MTF_MATK] = SCB_MATK; status->dbs->ChangeFlagTable[SC_MTF_MLEATKED] |= SCB_ALL; - + + // Eden Crystal Synthesis + status->dbs->ChangeFlagTable[SC_QUEST_BUFF1] |= SCB_BATK | SCB_MATK; + status->dbs->ChangeFlagTable[SC_QUEST_BUFF2] |= SCB_BATK | SCB_MATK; + status->dbs->ChangeFlagTable[SC_QUEST_BUFF3] |= SCB_BATK | SCB_MATK; + + // Geffen Magic Tournament + status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC1] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC2] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_GEFFEN_MAGIC3] |= SCB_ALL; + status->dbs->ChangeFlagTable[SC_FENRIR_CARD] |= SCB_MATK | SCB_ALL; + + // Costume status->dbs->ChangeFlagTable[SC_MOONSTAR] |= SCB_NONE; status->dbs->ChangeFlagTable[SC_SUPER_STAR] |= SCB_NONE; status->dbs->ChangeFlagTable[SC_STRANGELIGHTS] |= SCB_NONE; @@ -2996,6 +3019,21 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { } if (sc->data[SC_IMMUNITYSCROLL]) sd->subele[ELE_NEUTRAL] += sd->subele[ELE_NEUTRAL] * sc->data[SC_IMMUNITYSCROLL]->val1 / 100; + + // Geffen Magic Tournament + if (sc->data[SC_GEFFEN_MAGIC1]) { + sd->right_weapon.addrace[RC_DEMIHUMAN] += sc->data[SC_DISTRUCTIONSCROLL]->val1; + sd->left_weapon.addrace[RC_DEMIHUMAN] += sc->data[SC_DISTRUCTIONSCROLL]->val1; + } + if (sc->data[SC_GEFFEN_MAGIC2]) + sd->magic_addrace[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC2]->val1; + if (sc->data[SC_GEFFEN_MAGIC3]) { +#ifdef RENEWAL + sd->race_tolerance[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC3]->val1; +#else + sd->subrace[RC_DEMIHUMAN] += sc->data[SC_GEFFEN_MAGIC3]->val1; +#endif + } } status_cpy(&sd->battle_status, bstatus); @@ -4588,6 +4626,14 @@ unsigned short status_calc_batk(struct block_list *bl, struct status_change *sc, batk -= batk * sc->data[SC__ENERVATION]->val2 / 100; if(sc->data[SC_SATURDAY_NIGHT_FEVER]) batk += 100 * sc->data[SC_SATURDAY_NIGHT_FEVER]->val1; + + // Eden Crystal Synthesis + if (sc->data[SC_QUEST_BUFF1]) + batk += sc->data[SC_QUEST_BUFF1]->val1; + if (sc->data[SC_QUEST_BUFF2]) + batk += sc->data[SC_QUEST_BUFF2]->val1; + if (sc->data[SC_QUEST_BUFF3]) + batk += sc->data[SC_QUEST_BUFF3]->val1; return (unsigned short)cap_value(batk,0,USHRT_MAX); } @@ -4756,6 +4802,18 @@ unsigned short status_calc_matk(struct block_list *bl, struct status_change *sc, matk += matk * 25 / 100; if (sc->data[SC_MYSTICSCROLL]) matk += matk * sc->data[SC_MYSTICSCROLL]->val1 / 100; + + // Eden Crystal Synthesis + if (sc->data[SC_QUEST_BUFF1]) + matk += sc->data[SC_QUEST_BUFF1]->val1; + if (sc->data[SC_QUEST_BUFF2]) + matk += sc->data[SC_QUEST_BUFF2]->val1; + if (sc->data[SC_QUEST_BUFF3]) + matk += sc->data[SC_QUEST_BUFF3]->val1; + + // Geffen Magic Tournament + if (sc->data[SC_FENRIR_CARD]) + matk += sc->data[SC_FENRIR_CARD]->val1; return (unsigned short)cap_value(matk,0,USHRT_MAX); } diff --git a/src/map/status.h b/src/map/status.h index a0fcde988..723e95a53 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -759,6 +759,17 @@ typedef enum sc_type { SC_ARMORSCROLL, SC_FREYJASCROLL, SC_SOULSCROLL, // 600 + + // Eden Crystal Synthesis + SC_QUEST_BUFF1, + SC_QUEST_BUFF2, + SC_QUEST_BUFF3, + + // Geffen Magic Tournament + SC_GEFFEN_MAGIC1, + SC_GEFFEN_MAGIC2, + SC_GEFFEN_MAGIC3, + SC_FENRIR_CARD, SC_MAX, //Automatically updated max, used in for's to check we are within bounds. } sc_type; |