From e78f81b1d1958dae20dafd5ae87e0523f0a5a992 Mon Sep 17 00:00:00 2001 From: Atemo Date: Sat, 28 Oct 2023 17:10:30 +0200 Subject: [PATCH] Implemented SH_COLORS_OF_HYUN_ROK (2nd rebalance) MAX Lv: 7 Skill Requirement: Mystical Creature Mastery 1 Skill Form: Active Type: Secondary Target: Instant Casting Description: With the mysterious magical power of Hyunrok, endows elemental property to Catnip Meteor, Hyunrok Breeze and Hyunrok Cannon for 300 seconds. If the user learned Commune with Hyunrok, using this skill also increases Catnip Meteor damage by 50%. When using skill level 7, the endowment is canceled. _ [Level 1]: Endows water property. [Level 2]: Endows wind property. [Level 3]: Endows earth property. [Level 4]: Endows fire property. [Level 5]: Endows shadow property. [Level 6]: Endows holy property. [Level 7]: Removes the endowment. 1st rebalance : (nothing) 2nd rebalance : (nothing) --- db/re/skill_db.yml | 15 ++++++++++++ db/re/status.yml | 57 ++++++++++++++++++++++++++++++++++++++++++++++ src/map/battle.cpp | 20 ++++++++++++++++ src/map/skill.cpp | 10 ++++++++ 4 files changed, 102 insertions(+) diff --git a/db/re/skill_db.yml b/db/re/skill_db.yml index 69554021d3..547ac02bfe 100644 --- a/db/re/skill_db.yml +++ b/db/re/skill_db.yml @@ -41726,6 +41726,21 @@ Body: Name: SH_COMMUNE_WITH_HYUN_ROK Description: Commune with Hyunrok MaxLevel: 1 + - Id: 5444 + Name: SH_COLORS_OF_HYUN_ROK + Description: Colors of Hyunrok + MaxLevel: 7 + Type: Magic + TargetType: Self + DamageFlags: + NoDamage: true + Duration1: 300000 + CastCancel: true + CastTime: 1700 + FixedCastTime: 1000 + Requires: + SpCost: 90 + Status: Colors_of_Hyun_Rok_Buff - Id: 5447 Name: SH_TEMPORARY_COMMUNION Description: Temporary Communion diff --git a/db/re/status.yml b/db/re/status.yml index 2b3c9b136d..50b3655104 100644 --- a/db/re/status.yml +++ b/db/re/status.yml @@ -8792,3 +8792,60 @@ Body: DurationLookup: SH_KI_SUL_RAMPAGE States: NoCast: true + - Status: Colors_of_Hyun_Rok_Buff + Icon: EFST_COLORS_OF_HYUN_ROK_BUFF + DurationLookup: SH_COLORS_OF_HYUN_ROK + - Status: Colors_of_Hyun_Rok_1 + Icon: EFST_COLORS_OF_HYUN_ROK_1 + DurationLookup: SH_COLORS_OF_HYUN_ROK + EndOnStart: + Colors_of_Hyun_Rok_2: true + Colors_of_Hyun_Rok_3: true + Colors_of_Hyun_Rok_4: true + Colors_of_Hyun_Rok_5: true + Colors_of_Hyun_Rok_6: true + - Status: Colors_of_Hyun_Rok_2 + Icon: EFST_COLORS_OF_HYUN_ROK_2 + DurationLookup: SH_COLORS_OF_HYUN_ROK + EndOnStart: + Colors_of_Hyun_Rok_1: true + Colors_of_Hyun_Rok_3: true + Colors_of_Hyun_Rok_4: true + Colors_of_Hyun_Rok_5: true + Colors_of_Hyun_Rok_6: true + - Status: Colors_of_Hyun_Rok_3 + Icon: EFST_COLORS_OF_HYUN_ROK_3 + DurationLookup: SH_COLORS_OF_HYUN_ROK + EndOnStart: + Colors_of_Hyun_Rok_1: true + Colors_of_Hyun_Rok_2: true + Colors_of_Hyun_Rok_4: true + Colors_of_Hyun_Rok_5: true + Colors_of_Hyun_Rok_6: true + - Status: Colors_of_Hyun_Rok_4 + Icon: EFST_COLORS_OF_HYUN_ROK_4 + DurationLookup: SH_COLORS_OF_HYUN_ROK + EndOnStart: + Colors_of_Hyun_Rok_1: true + Colors_of_Hyun_Rok_2: true + Colors_of_Hyun_Rok_3: true + Colors_of_Hyun_Rok_5: true + Colors_of_Hyun_Rok_6: true + - Status: Colors_of_Hyun_Rok_5 + Icon: EFST_COLORS_OF_HYUN_ROK_5 + DurationLookup: SH_COLORS_OF_HYUN_ROK + EndOnStart: + Colors_of_Hyun_Rok_1: true + Colors_of_Hyun_Rok_2: true + Colors_of_Hyun_Rok_3: true + Colors_of_Hyun_Rok_4: true + Colors_of_Hyun_Rok_6: true + - Status: Colors_of_Hyun_Rok_6 + Icon: EFST_COLORS_OF_HYUN_ROK_6 + DurationLookup: SH_COLORS_OF_HYUN_ROK + EndOnStart: + Colors_of_Hyun_Rok_1: true + Colors_of_Hyun_Rok_2: true + Colors_of_Hyun_Rok_3: true + Colors_of_Hyun_Rok_4: true + Colors_of_Hyun_Rok_5: true diff --git a/src/map/battle.cpp b/src/map/battle.cpp index ce9c5be7de..4d3ec9a975 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -3467,6 +3467,24 @@ int battle_get_magic_element(struct block_list* src, struct block_list* target, if (sd) element = sd->bonus.arrow_ele; break; + case SU_CN_METEOR: + case SH_HYUN_ROKS_BREEZE: + case SH_HYUN_ROK_CANNON: + if (sc && sc->count) { + if (sc->getSCE(SC_COLORS_OF_HYUN_ROK_1)) + element = ELE_WATER; + else if (sc->getSCE(SC_COLORS_OF_HYUN_ROK_2)) + element = ELE_WIND; + else if (sc->getSCE(SC_COLORS_OF_HYUN_ROK_3)) + element = ELE_EARTH; + else if (sc->getSCE(SC_COLORS_OF_HYUN_ROK_4)) + element = ELE_FIRE; + else if (sc->getSCE(SC_COLORS_OF_HYUN_ROK_5)) + element = ELE_DARK; + else if (sc->getSCE(SC_COLORS_OF_HYUN_ROK_6)) + element = ELE_HOLY; + } + break; } return element; @@ -7826,6 +7844,8 @@ struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list case SU_CN_METEOR: case SU_CN_METEOR2: skillratio += 100 + 100 * skill_lv + sstatus->int_ * 5; // !TODO: Confirm INT bonus + if (sc && sc->getSCE(SC_COLORS_OF_HYUN_ROK_BUFF)) + skillratio += skillratio * 50 / 100; RE_LVL_DMOD(100); break; case NPC_VENOMFOG: diff --git a/src/map/skill.cpp b/src/map/skill.cpp index 024f1a9a20..3185833266 100755 --- a/src/map/skill.cpp +++ b/src/map/skill.cpp @@ -12882,6 +12882,16 @@ int skill_castend_nodamage_id (struct block_list *src, struct block_list *bl, ui sc_start(src, bl, type, 100, skill_lv, skill_get_time(skill_id, skill_lv)); } break; + case SH_COLORS_OF_HYUN_ROK: + for(i = SC_COLORS_OF_HYUN_ROK_1; i < SC_COLORS_OF_HYUN_ROK_1+6; i++) + status_change_end(src, (sc_type)i); + if (skill_lv < 7) { + if ((sd && pc_checkskill(sd, SH_COMMUNE_WITH_HYUN_ROK)) || (sc && sc->getSCE(SC_TEMPORARY_COMMUNION))) + sc_start(src, bl, type, 100, skill_lv, skill_get_time(skill_id, skill_lv)); + sc_start(src, bl, (sc_type)(SC_COLORS_OF_HYUN_ROK_1+skill_lv-1), 100, skill_lv, skill_get_time(skill_id, skill_lv)); + } + clif_skill_nodamage(src, src, skill_id, skill_lv, 1); + break; default: { std::shared_ptr skill = skill_db.find(skill_id);