From 9362328ff2bce2b09ad6779c3c61589a2a077b59 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 18 Nov 2023 22:27:12 -0300 Subject: [PATCH 01/30] Add song groups for Bard/Dancer songs (RE-only) Song effects are now grouped and songs of the same group doesn't overlap with each other. Activating a new effect of the same group ends other existing effects. There are 3 groups: 1. Bard songs -- song buffs exclusive to bards 2. Dancer songs -- song buffs exclusive to dancers 3. Ensemble songs -- song buffs exclusive to ensemble From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- src/map/status.c | 62 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) diff --git a/src/map/status.c b/src/map/status.c index 64c920f58d8..409b8bcebbb 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4571,12 +4571,12 @@ static int status_calc_batk(struct block_list *bl, struct status_change *sc, int /** * Calculates bl's Extra ATK gains from Buffs. - * + * * These are very specific bonus from SCs where: * - They show in status window ATK right side (after the + sign) * - They are given by SCs, but they work like equipment's ATK bonus * - They are not linked to the weapon attack value - * + * * @param bl unit whose status is being calculated * @param sc unit's SC list * @returns Value of Extra ATK conceded by buffs @@ -8395,7 +8395,7 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl } else { val2 = 0; //0 means that STR, DEX and INT should be halved } - + val1 += bonus; // Officially, val1 is incremented (for us, this doesn't make a difference) break; } @@ -10536,6 +10536,11 @@ static bool status_end_sc_before_start(struct block_list *bl, struct status_data status_change_end(bl, SC_ONEHANDQUICKEN, INVALID_TIMER); status_change_end(bl, SC_MER_QUICKEN, INVALID_TIMER); status_change_end(bl, SC_ACCELERATION, INVALID_TIMER); +#ifdef RENEWAL // Dancer performance buffs (don't overlap) + status_change_end(bl, SC_HUMMING, INVALID_TIMER); + status_change_end(bl, SC_FORTUNE, INVALID_TIMER); + status_change_end(bl, SC_SERVICEFORYOU, INVALID_TIMER); +#endif break; case SC_ONEHANDQUICKEN: // Removes the Aspd potion effect, as reported by Vicious. [Skotlex] @@ -10687,6 +10692,57 @@ static bool status_end_sc_before_start(struct block_list *bl, struct status_data status_change_end(bl, SC_ATTHASTE_POTION3, INVALID_TIMER); status_change_end(bl, SC_ATTHASTE_INFINITY, INVALID_TIMER); break; + +#ifdef RENEWAL + // Bard-only songs Group (doesn't overlap) + case SC_WHISTLE: + case SC_ASSNCROS: + case SC_POEMBRAGI: + case SC_APPLEIDUN: { + int group_scs[] = { SC_WHISTLE, SC_ASSNCROS, SC_POEMBRAGI, SC_APPLEIDUN }; + + for (int i = 0; i < ARRAYLENGTH(group_scs); ++i) { + if (type != group_scs[i]) + status_change_end(bl, group_scs[i], INVALID_TIMER); + } + break; + } + + // Dancer-only songs Group (doesn't overlap) + case SC_HUMMING: + case SC_FORTUNE: + // case SC_DONTFORGETME: // Independently checked above + case SC_SERVICEFORYOU: { + int group_scs[] = { SC_HUMMING, SC_FORTUNE, SC_SERVICEFORYOU, SC_DONTFORGETME }; + + for (int i = 0; i < ARRAYLENGTH(group_scs); ++i) { + if (type != group_scs[i]) + status_change_end(bl, group_scs[i], INVALID_TIMER); + } + break; + } + + // Ensemble songs Group (doesn't overlap) + case SC_ROKISWEIL: + case SC_ETERNALCHAOS: + case SC_SIEGFRIED: + case SC_DRUMBATTLE: + case SC_NIBELUNGEN: + case SC_RICHMANKIM: + case SC_INTOABYSS: { + int group_scs[] = { + SC_ROKISWEIL, SC_ETERNALCHAOS, SC_SIEGFRIED, SC_DRUMBATTLE, + SC_NIBELUNGEN, SC_RICHMANKIM, SC_INTOABYSS, + }; + + for (int i = 0; i < ARRAYLENGTH(group_scs); ++i) { + if (type != group_scs[i]) + status_change_end(bl, group_scs[i], INVALID_TIMER); + } + break; + } +#endif + // Group A Status (doesn't overlap) case SC_SWING: case SC_SYMPHONY_LOVE: From 5bcff7dfce73d244ec6699d3dd0e1561a5fb0649 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 30 Aug 2020 16:51:00 -0300 Subject: [PATCH 02/30] Rebalance of BA_MUSICALSTRIKE (Melody Strike) and DC_THROWARROW (Slinging Arrow) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Damage formula changed - New: [110 + (Skill Level x 40)]% x 2 hits - SP cost changed - Old: (Skill Level × 2) - 1 - New: 12 at all skill levels - Casting time reduced: 1.5s -> 0.5s (Based on DivinePride data see more below) - Fixed Cast Time of 0.3s remains untouched - Variable Cast Time reduced 1.2s -> 0.2s - Global skill delay added: 0.3s The Casting Time value is presented differently in each source I was looking at: - Official notes: Variable cast time reduce from 1.5s to 0.5s but we never had *Variable* Cast Time in 1.5s (only 1.2s Variable + 0.3 Fixed) - Divine Pride: 0.2s Variable + 0.3s Fixed (total 0.5s) - iRO Wiki: 0.5s Variable only From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/re/skill_db.conf | 38 ++++++++++---------------------------- src/map/battle.c | 4 ++++ 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 974e7a25929..757cf8b458b 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9722,27 +9722,18 @@ skill_db: ( Description: "Melody Strike" MaxLevel: 5 Range: 9 - Hit: "BDT_SKILL" + Hit: "BDT_MULTIHIT" SkillType: { Enemy: true } AttackType: "Weapon" Element: "Ele_Weapon" - CastTime: 1200 + NumberOfHits: 2 + CastTime: 200 FixedCastTime: 300 + AfterCastActDelay: 300 Requirements: { - SPCost: { - Lv1: 1 - Lv2: 3 - Lv3: 5 - Lv4: 7 - Lv5: 9 - Lv6: 11 - Lv7: 13 - Lv8: 15 - Lv9: 17 - Lv10: 19 - } + SPCost: 12 WeaponTypes: { Instruments: true } @@ -10063,27 +10054,18 @@ skill_db: ( Description: "Slinging Arrow" MaxLevel: 5 Range: 9 - Hit: "BDT_SKILL" + Hit: "BDT_MULTIHIT" SkillType: { Enemy: true } AttackType: "Weapon" Element: "Ele_Weapon" - CastTime: 1200 + NumberOfHits: 2 + CastTime: 200 FixedCastTime: 300 + AfterCastActDelay: 300 Requirements: { - SPCost: { - Lv1: 1 - Lv2: 3 - Lv3: 5 - Lv4: 7 - Lv5: 9 - Lv6: 11 - Lv7: 13 - Lv8: 15 - Lv9: 17 - Lv10: 19 - } + SPCost: 12 WeaponTypes: { Whips: true } diff --git a/src/map/battle.c b/src/map/battle.c index f8738271356..137f9b544d9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -2315,7 +2315,11 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc break; case BA_MUSICALSTRIKE: case DC_THROWARROW: +#ifndef RENEWAL skillratio += 25 + 25 * skill_lv; +#else + skillratio += 10 + 40 * skill_lv; +#endif break; case CH_TIGERFIST: skillratio += 100 * skill_lv - 60; From 23b2ab15e440e524270a0ee3e30c2c203887f97d Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 18 Nov 2023 23:57:44 -0300 Subject: [PATCH 03/30] Rebalance of BA_MUSICALLESSON (Music Lessons) - Add effect: Attack Speed +(Skill_Lv)% with Musical Instruments - Add effect: Max SP +(Skill_Lv)% - No longer gives bonuses to song effects From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- src/map/battle.c | 6 ++++-- src/map/skill.c | 40 ++++++++++++++++++++++++---------------- src/map/status.c | 7 +++++++ 3 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/map/battle.c b/src/map/battle.c index 137f9b544d9..206be62d9fd 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -4374,8 +4374,10 @@ static struct Damage battle_calc_misc_attack(struct block_list *src, struct bloc break; case BA_DISSONANCE: md.damage=30+skill_lv*10; - if (sd) - md.damage+= 3*pc->checkskill(sd,BA_MUSICALLESSON); +#ifndef RENEWAL + if (sd != NULL) + md.damage += 3 * pc->checkskill(sd, BA_MUSICALLESSON); +#endif break; case NPC_SELFDESTRUCTION: md.damage = sstatus->hp; diff --git a/src/map/skill.c b/src/map/skill.c index 21d52fad3e3..306c9eba460 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1163,9 +1163,9 @@ static int skill_calc_heal(struct block_list *src, struct block_list *target, ui hp = 100+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery #else // not RENEWAL hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery + if (sd != NULL) + hp += 5 * pc->checkskill(sd, BA_MUSICALLESSON); #endif // RENEWAL - if( sd ) - hp += 5*pc->checkskill(sd,BA_MUSICALLESSON); break; case PR_SANCTUARY: hp = (skill_lv>6)?777:skill_lv*100; @@ -13328,10 +13328,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 case BA_WHISTLE: val1 = skill_lv +st->agi/10; // Flee increase val2 = ((skill_lv+1)/2)+st->luk/10; // Perfect dodge increase - if(sd){ - val1 += pc->checkskill(sd,BA_MUSICALLESSON); - val2 += pc->checkskill(sd,BA_MUSICALLESSON); +#ifndef RENEWAL + if (sd != NULL) { + val1 += pc->checkskill(sd, BA_MUSICALLESSON); + val2 += pc->checkskill(sd, BA_MUSICALLESSON); } +#endif break; case DC_HUMMING: val1 = 2*skill_lv+st->dex/10; // Hit increase @@ -13342,13 +13344,15 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val1 += pc->checkskill(sd,DC_DANCINGLESSON); break; case BA_POEMBRAGI: - val1 = 3*skill_lv+st->dex/10; // Casting time reduction + val1 = 3 * skill_lv + st->dex / 10; // Casting time reduction //For some reason at level 10 the base delay reduction is 50%. - val2 = (skill_lv<10?3*skill_lv:50)+st->int_/5; // After-cast delay reduction - if(sd){ - val1 += 2*pc->checkskill(sd,BA_MUSICALLESSON); - val2 += 2*pc->checkskill(sd,BA_MUSICALLESSON); + val2 = (skill_lv < 10 ? 3 * skill_lv : 50) + st->int_ / 5; // After-cast delay reduction +#ifndef RENEWAL + if (sd != NULL) { + val1 += 2 * pc->checkskill(sd, BA_MUSICALLESSON); + val2 += 2 * pc->checkskill(sd, BA_MUSICALLESSON); } +#endif break; case DC_DONTFORGETME: #ifdef RENEWAL @@ -13364,9 +13368,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 } break; case BA_APPLEIDUN: - val1 = 5+2*skill_lv+st->vit/10; // MaxHP percent increase - if(sd) - val1 += pc->checkskill(sd,BA_MUSICALLESSON); + val1 = 5 + 2 * skill_lv + st->vit / 10; // MaxHP percent increase +#ifndef RENEWAL + if (sd != NULL) { + val1 += pc->checkskill(sd, BA_MUSICALLESSON); + } +#endif break; case DC_SERVICEFORYOU: val1 = 15+skill_lv+(st->int_/10); // MaxSP percent increase @@ -13377,14 +13384,15 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 } break; case BA_ASSASSINCROSS: - if(sd) - val1 = pc->checkskill(sd,BA_MUSICALLESSON) / 2; #ifdef RENEWAL // This formula was taken from a RE calculator // and the changes published on irowiki // Luckily, official tests show it's the right one - val1 += skill_lv + (st->agi/20); + val1 = skill_lv + (st->agi / 20); #else + if (sd != NULL) + val1 = pc->checkskill(sd, BA_MUSICALLESSON) / 2; + val1 += 10 + skill_lv + (st->agi/10); // ASPD increase val1 *= 10; // ASPD works with 1000 as 100% #endif diff --git a/src/map/status.c b/src/map/status.c index 409b8bcebbb..6f3a3447807 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1967,6 +1967,10 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o bstatus->max_sp += 30 * skill_lv; if ((pc->checkskill(sd,SU_SPRITEMABLE)) > 0) bstatus->max_sp += 100; +#ifdef RENEWAL + if((skill_lv = pc->checkskill(sd, BA_MUSICALLESSON)) > 0) + bstatus->max_sp += (int64) bstatus->max_sp * skill_lv / 100; +#endif // Apply relative modifiers from equipment if(sd->sprate < 0) @@ -3718,6 +3722,9 @@ static int status_base_amotion_pc(struct map_session_data *sd, struct status_dat val += ((skill_lv + 1) / 2); if ((skill_lv = pc->checkskill(sd, RG_PLAGIARISM)) > 0) val += skill_lv; + if (sd->weapontype == W_MUSICAL && (skill_lv = pc->checkskill(sd, BA_MUSICALLESSON)) > 0) + val += skill_lv; + amotion = ((int)(temp + ((float)(status->calc_aspd(&sd->bl, &sd->sc, 1) + val) * st->agi / 200)) - min(amotion, 200)); #else // base weapon delay From 785a3a1b41c0f31472790a0ce107fb1806c2592c Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 00:08:12 -0300 Subject: [PATCH 04/30] Rebalance of DC_DANCINGLESSON (Dance Lessons) - Add effect: Max SP +(Skill_Lv)% - Add effect: When using Whips, CRI +(Skill_Lv) - No longer gives bonuses to dance effects From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- src/map/skill.c | 49 ++++++++++++++++++++++++++++-------------------- src/map/status.c | 4 ++++ 2 files changed, 33 insertions(+), 20 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index 306c9eba460..54a4628eb80 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1868,8 +1868,10 @@ static int skill_additional_effect(struct block_list *src, struct block_list *bl case DC_UGLYDANCE: rate = 5+5*skill_lv; - if (sd && (temp=pc->checkskill(sd,DC_DANCINGLESSON)) > 0) - rate += 5+temp; +#ifndef RENEWAL + if (sd != NULL && (temp = pc->checkskill(sd, DC_DANCINGLESSON)) > 0) + rate += 5 + temp; +#endif status_zap(bl, 0, rate); break; case SL_STUN: @@ -13337,11 +13339,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 break; case DC_HUMMING: val1 = 2*skill_lv+st->dex/10; // Hit increase - #ifdef RENEWAL - val1 *= 2; - #endif - if(sd) - val1 += pc->checkskill(sd,DC_DANCINGLESSON); +#ifdef RENEWAL + val1 *= 2; +#else + if (sd != NULL) + val1 += pc->checkskill(sd, DC_DANCINGLESSON); +#endif break; case BA_POEMBRAGI: val1 = 3 * skill_lv + st->dex / 10; // Casting time reduction @@ -13361,11 +13364,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 #else val1 = st->dex/10 + 3*skill_lv + 5; // ASPD decrease val2 = st->agi/10 + 3*skill_lv + 5; // Movement speed adjustment. -#endif - if(sd){ - val1 += pc->checkskill(sd,DC_DANCINGLESSON); - val2 += pc->checkskill(sd,DC_DANCINGLESSON); + + if (sd != NULL) { + val1 += pc->checkskill(sd, DC_DANCINGLESSON); + val2 += pc->checkskill(sd, DC_DANCINGLESSON); } +#endif break; case BA_APPLEIDUN: val1 = 5 + 2 * skill_lv + st->vit / 10; // MaxHP percent increase @@ -13376,12 +13380,15 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 #endif break; case DC_SERVICEFORYOU: - val1 = 15+skill_lv+(st->int_/10); // MaxSP percent increase - val2 = 20+3*skill_lv+(st->int_/10); // SP cost reduction - if(sd){ - val1 += pc->checkskill(sd,DC_DANCINGLESSON) / 2; - val2 += pc->checkskill(sd,DC_DANCINGLESSON) / 2; + val1 = 15 + skill_lv + (st->int_ / 10); // MaxSP percent increase + val2 = 20 + 3 * skill_lv + (st->int_ / 10); // SP cost reduction + +#ifndef RENEWAL + if (sd != NULL) { + val1 += pc->checkskill(sd, DC_DANCINGLESSON) / 2; + val2 += pc->checkskill(sd, DC_DANCINGLESSON) / 2; } +#endif break; case BA_ASSASSINCROSS: #ifdef RENEWAL @@ -13398,10 +13405,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 #endif break; case DC_FORTUNEKISS: - val1 = 10+skill_lv+(st->luk/10); // Critical increase - if(sd) - val1 += pc->checkskill(sd,DC_DANCINGLESSON); - val1*=10; //Because every 10 crit is an actual cri point. + val1 = 10 + skill_lv + (st->luk / 10); // Critical increase +#ifndef RENEWAL + if (sd != NULL) + val1 += pc->checkskill(sd, DC_DANCINGLESSON); +#endif + val1 *= 10; //Because every 10 crit is an actual cri point. break; case BD_DRUMBATTLEFIELD: #ifdef RENEWAL diff --git a/src/map/status.c b/src/map/status.c index 6f3a3447807..62400c6a0b2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -1970,6 +1970,8 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o #ifdef RENEWAL if((skill_lv = pc->checkskill(sd, BA_MUSICALLESSON)) > 0) bstatus->max_sp += (int64) bstatus->max_sp * skill_lv / 100; + if((skill_lv = pc->checkskill(sd, DC_DANCINGLESSON)) > 0) + bstatus->max_sp += (int64) bstatus->max_sp * skill_lv / 100; #endif // Apply relative modifiers from equipment @@ -2033,6 +2035,8 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o #ifdef RENEWAL if ((skill_lv = pc->checkskill(sd, PR_MACEMASTERY)) > 0 && (sd->weapontype == W_MACE || sd->weapontype == W_2HMACE)) bstatus->cri += skill_lv * 10; + if ((skill_lv = pc->checkskill(sd, DC_DANCINGLESSON)) > 0 && sd->weapontype == W_WHIP) + bstatus->cri += skill_lv * 10; #endif if(sd->flee2_rate < 0) From 9b6bcf9f87da148bcad8bb8113a67bb56bf9aff9 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 00:47:01 -0300 Subject: [PATCH 05/30] Rebalance of BA_FROSTJOKE (Unbarring Octave) - Global skill delay reduced: 4s -> 0.3s - 4s Cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/re/skill_db.conf | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 757cf8b458b..8b95ccd692b 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9807,7 +9807,8 @@ skill_db: ( SplashArea: true } SplashRange: -1 - AfterCastActDelay: 4000 + AfterCastActDelay: 300 + CoolDown: 4_000 SkillData2: { Lv1: 10000 Lv2: 11000 From ef6b628c0df38543d0ac6229c29fc639c4c5b6ad Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 01:32:13 -0300 Subject: [PATCH 06/30] Rebalance of BD_ENCORE (Encore) - Added 0.3s of global skill delay - Added 10s of cooldown From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/re/skill_db.conf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 8b95ccd692b..ebf1da49dd1 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9381,6 +9381,8 @@ skill_db: ( DamageType: { NoDamage: true } + AfterCastActDelay: 300 + CoolDown: 10_000 Requirements: { SPCost: 1 WeaponTypes: { From 45e6b304db4b9c884d26137d10cc784ccb03f15f Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 11:24:11 -0300 Subject: [PATCH 07/30] Rebalance of BA_DISSONANCE (Unchained Serenade) Skill reworked. - Now causes Neutral Magical damage in a 9x9 area - Can only be used in PvP areas - 0.3s of global delay added - 5s of cooldown added - SP cost changed - Old: 15 + (SkillLv) x 3 - New: 32 + (SkillLv) x 3 From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/re/map_zone_db.conf | 2 ++ db/re/skill_db.conf | 41 +++++++++++++++++------------------------ src/map/battle.c | 20 +++++++++++++++++--- src/map/skill.c | 21 +++++++++++++++++++++ src/map/status.c | 2 ++ 5 files changed, 59 insertions(+), 27 deletions(-) diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index c5191de61aa..be09529117c 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -116,6 +116,7 @@ zones: ( WM_SATURDAY_NIGHT_FEVER: "PLAYER" SO_ARRULLO: "PLAYER" CG_HERMODE: "PLAYER" + BA_DISSONANCE: "PLAYER" } disabled_items: { @@ -514,6 +515,7 @@ zones: ( SC_MANHOLE: "PLAYER" WM_POEMOFNETHERWORLD: "PLAYER" GN_WALLOFTHORN: "PLAYER" + BA_DISSONANCE: "PLAYER" } disabled_items: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index ebf1da49dd1..f3916687f70 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9750,7 +9750,7 @@ skill_db: ( Name: "BA_DISSONANCE" Description: "Unchained Serenade" MaxLevel: 5 - Hit: "BDT_MULTIHIT" + Hit: "BDT_SKILL" SkillType: { Self: true } @@ -9758,40 +9758,33 @@ skill_db: ( Song: true BlockedByStasis: true } - AttackType: "Misc" + AttackType: "Magic" + Element: "Ele_Neutral" DamageType: { - NoDamage: true + SplashArea: true IgnoreFlee: true } - SkillData1: 30000 - SkillData2: 3000 + SplashRange: 4 + AfterCastActDelay: 300 + CoolDown: 5_000 FixedCastTime: 0 Requirements: { SPCost: { - Lv1: 18 - Lv2: 21 - Lv3: 24 - Lv4: 27 - Lv5: 30 - Lv6: 33 - Lv7: 36 - Lv8: 39 - Lv9: 42 - Lv10: 45 + Lv1: 35 + Lv2: 38 + Lv3: 41 + Lv4: 44 + Lv5: 47 + Lv6: 50 + Lv7: 53 + Lv8: 56 + Lv9: 59 + Lv10: 62 } WeaponTypes: { Instruments: true } } - Unit: { - Id: 0xa6 - Layout: 3 - Interval: 3000 - Target: "Enemy" - Flag: { - UF_SONG: true - } - } }, { Id: 318 diff --git a/src/map/battle.c b/src/map/battle.c index 206be62d9fd..7f0226d8b11 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1678,6 +1678,19 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc case AL_RUWACH: skillratio += 45; break; + /** + * Bard + */ +#ifdef RENEWAL + case BA_DISSONANCE: + // @TODO: Confirm this formula. I have made it by combining some info from bRO Wiki + // with the skill description and some tweaking from my head. + // It is quite close, but I have no source for it. + // Skill description says 100 + 10 * skill_lv (110 / 120 / 130 / 140 / 150) + // But to match the real damage, we have to add an extra 10 * skill_lv (thus, 20 * skill_lv) + skillratio = ((100 + 20 * skill_lv) * sd->status.job_level) / 10; + break; +#endif /** * Priest **/ @@ -4372,13 +4385,14 @@ static struct Damage battle_calc_misc_attack(struct block_list *src, struct bloc case TF_THROWSTONE: md.damage=50; break; - case BA_DISSONANCE: - md.damage=30+skill_lv*10; #ifndef RENEWAL + case BA_DISSONANCE: + md.damage = 30 + skill_lv * 10; + if (sd != NULL) md.damage += 3 * pc->checkskill(sd, BA_MUSICALLESSON); -#endif break; +#endif case NPC_SELFDESTRUCTION: md.damage = sstatus->hp; break; diff --git a/src/map/skill.c b/src/map/skill.c index 54a4628eb80..7f39b0364a7 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -4817,7 +4817,9 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl case AM_ACIDTERROR: case BA_MUSICALSTRIKE: case DC_THROWARROW: +#ifndef RENEWAL case BA_DISSONANCE: +#endif case CR_HOLYCROSS: case NPC_DARKCROSS: case CR_SHIELDCHARGE: @@ -4918,6 +4920,12 @@ static int skill_castend_damage_id(struct block_list *src, struct block_list *bl skill->attack(BF_WEAPON,src,src,bl,skill_id,skill_lv,tick,flag); break; +#ifdef RENEWAL + case BA_DISSONANCE: + skill->attack(BF_MAGIC, src, src, bl, skill_id, skill_lv, tick, flag); + break; +#endif + /** * Mechanic (MADO GEAR) **/ @@ -8017,6 +8025,19 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * } break; +#ifdef RENEWAL + case BA_DISSONANCE: + if (sd != NULL) { + sd->skill_id_dance = skill_id; + sd->skill_lv_dance = skill_lv; + } + + clif->skill_nodamage(src, src, skill_id, skill_lv, 1); + map->foreachinrange(skill->area_sub, src, skill->get_splash(skill_id, skill_lv), BL_CHAR, + src, skill_id, skill_lv, tick, flag | BCT_ENEMY | 1, skill->castend_damage_id); + break; +#endif + case BS_ADRENALINE: case BS_ADRENALINE2: case BS_WEAPONPERFECT: diff --git a/src/map/status.c b/src/map/status.c index 62400c6a0b2..537f194a2be 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -12361,7 +12361,9 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) case BD_DRUMBATTLEFIELD: case BD_RINGNIBELUNGEN: case BD_SIEGFRIED: +#ifndef RENEWAL case BA_DISSONANCE: +#endif case BA_ASSASSINCROSS: case DC_UGLYDANCE: s=3; From b3786a6968fe4b4f6a484bb27be82ff831bd026e Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 11:59:48 -0300 Subject: [PATCH 08/30] Rebalance of BA_POEMBRAGI (Magic Strings) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - Variable cast reduction: (SkillLv)% - Cast delay reduction: (SkillLv x 3)% - Caster stats and Music Lessons no longer affects the formula - Effect duration changed: 180s -> 60s - SP Cost changed: - Old: 35 + (SkillLv x 5) - New: 60 + (SkillLv x 5) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/pre-re/skill_db.conf | 4 +- db/re/sc_config.conf | 11 ++-- db/re/skill_db.conf | 39 +++++------- src/map/skill.c | 61 ++++++++++++++++++- src/map/skill.h | 1 + src/map/status.c | 11 ++++ src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 ++ .../HPMHooking_map.HPMHooksCore.inc | 8 +++ .../HPMHooking_map.HookingPoints.inc | 2 + .../HPMHooking/HPMHooking_map.Hooks.inc | 53 ++++++++++++++++ 11 files changed, 162 insertions(+), 33 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index c32678a6d7d..bea9cf62750 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4307,6 +4307,7 @@ constants_db: { SI_DEFENDER: 62 SI_AUTOSPELL: 65 SI_SPEARQUICKEN: 68 + SI_POEMBRAGI: 72 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index b5b820b654f..4f3d512049c 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -9753,8 +9753,8 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData1: 180000 - SkillData2: 20000 + SkillData1: 180_000 // Duration of the performance (in miliseconds) + SkillData2: 20_000 // Duration of SC_POEMBRAGI when unit leaves the performance area (in miliseconds) CoolDown: 0 Requirements: { SPCost: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index e94552d3fc1..280c754cd64 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4211,15 +4211,14 @@ SC_ASSNCROS: { Skill: "BA_ASSASSINCROSS" } SC_POEMBRAGI: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } Skill: "BA_POEMBRAGI" + Icon: "SI_POEMBRAGI" } SC_APPLEIDUN: { Flags: { @@ -5989,7 +5988,7 @@ SC_FALLEN_ANGEL: { SC_HEAT_BARREL: { Flags: { Buff: true - } + } CalcFlags: { Hit: true Aspd: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index f3916687f70..0a0c8b1334d 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9951,39 +9951,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 180000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_POEMBRAGI duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 40 - Lv2: 45 - Lv3: 50 - Lv4: 55 - Lv5: 60 - Lv6: 65 - Lv7: 70 - Lv8: 75 - Lv9: 80 - Lv10: 85 + Lv1: 65 + Lv2: 70 + Lv3: 75 + Lv4: 80 + Lv5: 85 + Lv6: 90 + Lv7: 95 + Lv8: 100 + Lv9: 105 + Lv10: 110 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa9 - Layout: 3 - Interval: 3000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_SONG: true - UF_DUALMODE: true - } - } }, { Id: 322 diff --git a/src/map/skill.c b/src/map/skill.c index 7f39b0364a7..ab5b65b2470 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7978,6 +7978,12 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * } break; +#ifdef RENEWAL + case BA_POEMBRAGI: + skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); + break; +#endif + #ifdef RENEWAL case MC_LOUD: case PR_IMPOSITIO: @@ -11843,6 +11849,53 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * return 0; } +/** + * Castend handler for Song/Dance skills that simply cause SCs (RE-only) + * @param src Unit who cast the skill + * @param bl Unit being targeted by the skill + * @param skill_id skill being cast + * @param skill_lv level of the skill being cast + * @param tick + * @param flag castend flags + * - flag & 1 : + * when not set: it is the initial skill cast, + * when set: it is in the reiteration over targets to get buffed. + * - enum e_battle_check_target flags: defines who will be affected by the reiteration. examples: + * flag | BCT_PARTY -- affects party members (e.g. apply SC to all party members) + * flag | BCT_ENEMY -- affects enemies (e.g. apply SC to all enemies) + * + * - @TODO: Document other possible flag values + */ +static void skill_castend_nodamage_id_sc_song(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) +{ +#ifdef RENEWAL + nullpo_retv(src); + nullpo_retv(bl); + + if ((flag & 1) == 0) { + struct map_session_data *sd = BL_CAST(BL_PC, src); + if (sd == NULL) + return; + + sd->skill_id_dance = skill_id; + sd->skill_lv_dance = skill_lv; + + clif->skill_nodamage(src, src, skill_id, skill_lv, 1); + + int splash_range = skill->get_splash(skill_id, skill_lv); + int flags = flag | 1; // &1 will tell when we are iterating over the "execution" phase + + if ((flags & BCT_PARTY) != 0) + party->foreachsamemap(skill->area_sub, sd, splash_range, src, skill_id, skill_lv, tick, flags, skill->castend_nodamage_id); + else + map->foreachinrange(skill->area_sub, src, splash_range, BL_CHAR, src, skill_id, skill_lv, tick, flags, skill->castend_nodamage_id); + } else { + enum sc_type sc = skill->get_sc_type(skill_id); + sc_start(src, bl, sc, 100, skill_lv, skill->get_time(skill_id, skill_lv), skill_id); + } +#endif +} + static bool skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { return true; @@ -12374,7 +12427,9 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_INTOABYSS: case BD_SIEGFRIED: case BA_DISSONANCE: +#ifndef RENEWAL case BA_POEMBRAGI: +#endif case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_APPLEIDUN: @@ -13367,17 +13422,18 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val1 += pc->checkskill(sd, DC_DANCINGLESSON); #endif break; +#ifndef RENEWAL case BA_POEMBRAGI: val1 = 3 * skill_lv + st->dex / 10; // Casting time reduction //For some reason at level 10 the base delay reduction is 50%. val2 = (skill_lv < 10 ? 3 * skill_lv : 50) + st->int_ / 5; // After-cast delay reduction -#ifndef RENEWAL + if (sd != NULL) { val1 += 2 * pc->checkskill(sd, BA_MUSICALLESSON); val2 += 2 * pc->checkskill(sd, BA_MUSICALLESSON); } -#endif break; +#endif case DC_DONTFORGETME: #ifdef RENEWAL val1 = st->dex/10 + 3*skill_lv; // ASPD decrease @@ -25508,6 +25564,7 @@ void skill_defaults(void) skill->produce_mix = skill_produce_mix; skill->arrow_create = skill_arrow_create; skill->castend_nodamage_id = skill_castend_nodamage_id; + skill->castend_nodamage_id_sc_song = skill_castend_nodamage_id_sc_song; skill->castend_damage_id = skill_castend_damage_id; skill->castend_pos2 = skill_castend_pos2; skill->blockpc_start = skill_blockpc_start_; diff --git a/src/map/skill.h b/src/map/skill.h index df88d518fa8..d0eb0ec2741 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2192,6 +2192,7 @@ struct skill_interface { int (*arrow_create) ( struct map_session_data *sd,int nameid); void (*castend_type) (enum cast_enum type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); int (*castend_nodamage_id) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); + void (*castend_nodamage_id_sc_song) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); int (*castend_damage_id) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick,int flag); int (*castend_pos2) (struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); int (*blockpc_start) (struct map_session_data *sd, uint16 skill_id, int tick); diff --git a/src/map/status.c b/src/map/status.c index 537f194a2be..f418564e6db 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7956,6 +7956,15 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val3 = total_tick/1000; //Tick duration tick_time = 1000; // [GodLesZ] tick time break; + +#ifdef RENEWAL + case SC_POEMBRAGI: + // val1 = skill lv + val2 = val1 * 2; // Cast time reduction + val3 = val1 * 3; // After-cast delay reduction + break; +#endif + case SC_LONGING: #ifdef RENEWAL val2 = 50 + 10 * val1; @@ -12378,7 +12387,9 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) case BD_INTOABYSS: case BA_WHISTLE: case DC_HUMMING: +#ifndef RENEWAL case BA_POEMBRAGI: +#endif case DC_SERVICEFORYOU: s=5; break; diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 9f05793b440..79404e12428 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -8524,6 +8524,8 @@ typedef void (*HPMHOOK_pre_skill_castend_type) (enum cast_enum *type, struct blo typedef void (*HPMHOOK_post_skill_castend_type) (enum cast_enum type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); typedef int (*HPMHOOK_pre_skill_castend_nodamage_id) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); typedef int (*HPMHOOK_post_skill_castend_nodamage_id) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef void (*HPMHOOK_pre_skill_castend_nodamage_id_sc_song) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_post_skill_castend_nodamage_id_sc_song) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); typedef int (*HPMHOOK_pre_skill_castend_damage_id) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); typedef int (*HPMHOOK_post_skill_castend_damage_id) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); typedef int (*HPMHOOK_pre_skill_castend_pos2) (struct block_list **src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); @@ -9198,6 +9200,8 @@ typedef short (*HPMHOOK_pre_status_calc_mdef2) (struct block_list **bl, struct s typedef short (*HPMHOOK_post_status_calc_mdef2) (short retVal___, struct block_list *bl, struct status_change *sc, int mdef2, bool viewable); typedef int (*HPMHOOK_pre_status_calc_batk) (struct block_list **bl, struct status_change **sc, int *batk, bool *viewable); typedef int (*HPMHOOK_post_status_calc_batk) (int retVal___, struct block_list *bl, struct status_change *sc, int batk, bool viewable); +typedef int (*HPMHOOK_pre_status_calc_buff_extra_batk) (struct block_list **bl, struct status_change **sc); +typedef int (*HPMHOOK_post_status_calc_buff_extra_batk) (int retVal___, struct block_list *bl, struct status_change *sc); typedef int (*HPMHOOK_pre_status_base_matk) (struct block_list **bl, const struct status_data **st, int *level); typedef int (*HPMHOOK_post_status_base_matk) (int retVal___, struct block_list *bl, const struct status_data *st, int level); typedef int (*HPMHOOK_pre_status_get_weapon_atk) (struct block_list **src, struct weapon_atk **watk, int *flag); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index eaba4419a28..29d406aac16 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -6446,6 +6446,8 @@ struct { struct HPMHookPoint *HP_skill_castend_type_post; struct HPMHookPoint *HP_skill_castend_nodamage_id_pre; struct HPMHookPoint *HP_skill_castend_nodamage_id_post; + struct HPMHookPoint *HP_skill_castend_nodamage_id_sc_song_pre; + struct HPMHookPoint *HP_skill_castend_nodamage_id_sc_song_post; struct HPMHookPoint *HP_skill_castend_damage_id_pre; struct HPMHookPoint *HP_skill_castend_damage_id_post; struct HPMHookPoint *HP_skill_castend_pos2_pre; @@ -7114,6 +7116,8 @@ struct { struct HPMHookPoint *HP_status_calc_mdef2_post; struct HPMHookPoint *HP_status_calc_batk_pre; struct HPMHookPoint *HP_status_calc_batk_post; + struct HPMHookPoint *HP_status_calc_buff_extra_batk_pre; + struct HPMHookPoint *HP_status_calc_buff_extra_batk_post; struct HPMHookPoint *HP_status_base_matk_pre; struct HPMHookPoint *HP_status_base_matk_post; struct HPMHookPoint *HP_status_get_weapon_atk_pre; @@ -14023,6 +14027,8 @@ struct { int HP_skill_castend_type_post; int HP_skill_castend_nodamage_id_pre; int HP_skill_castend_nodamage_id_post; + int HP_skill_castend_nodamage_id_sc_song_pre; + int HP_skill_castend_nodamage_id_sc_song_post; int HP_skill_castend_damage_id_pre; int HP_skill_castend_damage_id_post; int HP_skill_castend_pos2_pre; @@ -14691,6 +14697,8 @@ struct { int HP_status_calc_mdef2_post; int HP_status_calc_batk_pre; int HP_status_calc_batk_post; + int HP_status_calc_buff_extra_batk_pre; + int HP_status_calc_buff_extra_batk_post; int HP_status_base_matk_pre; int HP_status_base_matk_post; int HP_status_get_weapon_atk_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index b6b47879c22..edec79f423a 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -3299,6 +3299,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->arrow_create, HP_skill_arrow_create) }, { HP_POP(skill->castend_type, HP_skill_castend_type) }, { HP_POP(skill->castend_nodamage_id, HP_skill_castend_nodamage_id) }, + { HP_POP(skill->castend_nodamage_id_sc_song, HP_skill_castend_nodamage_id_sc_song) }, { HP_POP(skill->castend_damage_id, HP_skill_castend_damage_id) }, { HP_POP(skill->castend_pos2, HP_skill_castend_pos2) }, { HP_POP(skill->blockpc_start, HP_skill_blockpc_start) }, @@ -3636,6 +3637,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(status->calc_mdef, HP_status_calc_mdef) }, { HP_POP(status->calc_mdef2, HP_status_calc_mdef2) }, { HP_POP(status->calc_batk, HP_status_calc_batk) }, + { HP_POP(status->calc_buff_extra_batk, HP_status_calc_buff_extra_batk) }, { HP_POP(status->base_matk, HP_status_base_matk) }, { HP_POP(status->get_weapon_atk, HP_status_get_weapon_atk) }, { HP_POP(status->get_total_mdef, HP_status_get_total_mdef) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 9861cbe91e5..276687ff43f 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -86019,6 +86019,32 @@ int HP_skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, } return retVal___; } +void HP_skill_castend_nodamage_id_sc_song(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_castend_nodamage_id_sc_song_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_sc_song_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_sc_song_pre[hIndex].func; + preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag); + } + if (HPMHooks.count.HP_skill_castend_nodamage_id_sc_song_post > 0) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_sc_song_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_sc_song_post[hIndex].func; + postHookFunc(src, bl, skill_id, skill_lv, tick, flag); + } + } + return; +} int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; @@ -95082,6 +95108,33 @@ int HP_status_calc_batk(struct block_list *bl, struct status_change *sc, int bat } return retVal___; } +int HP_status_calc_buff_extra_batk(struct block_list *bl, struct status_change *sc) { + int hIndex = 0; + int retVal___ = 0; + if (HPMHooks.count.HP_status_calc_buff_extra_batk_pre > 0) { + int (*preHookFunc) (struct block_list **bl, struct status_change **sc); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_buff_extra_batk_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_status_calc_buff_extra_batk_pre[hIndex].func; + retVal___ = preHookFunc(&bl, &sc); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return retVal___; + } + } + { + retVal___ = HPMHooks.source.status.calc_buff_extra_batk(bl, sc); + } + if (HPMHooks.count.HP_status_calc_buff_extra_batk_post > 0) { + int (*postHookFunc) (int retVal___, struct block_list *bl, struct status_change *sc); + for (hIndex = 0; hIndex < HPMHooks.count.HP_status_calc_buff_extra_batk_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_status_calc_buff_extra_batk_post[hIndex].func; + retVal___ = postHookFunc(retVal___, bl, sc); + } + } + return retVal___; +} int HP_status_base_matk(struct block_list *bl, const struct status_data *st, int level) { int hIndex = 0; int retVal___ = 0; From 332f40f769560193b9771198593aa73369b99b99 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 12:14:41 -0300 Subject: [PATCH 09/30] Rebalance of BA_ASSASSINCROSS (Impressive Riff) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - ASPD: - when SkillLv < 10: +(1 + ((SkillLv - 1) x 2))% - when SkillLv = 10: +20% - Caster stats and Music Lessons no longer affects the formula - Effect duration changed: 180s -> 60s - SP Cost changed: - Old: 35 + (SkillLv x 5) - New: 60 + (SkillLv x 5) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/pre-re/skill_db.conf | 4 ++-- db/re/sc_config.conf | 9 ++++----- db/re/skill_db.conf | 39 ++++++++++++++++----------------------- src/map/skill.c | 12 ++++-------- src/map/status.c | 10 +++++++++- 6 files changed, 36 insertions(+), 39 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index bea9cf62750..f417882a607 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4307,6 +4307,7 @@ constants_db: { SI_DEFENDER: 62 SI_AUTOSPELL: 65 SI_SPEARQUICKEN: 68 + SI_ASSASSINCROSS: 71 SI_POEMBRAGI: 72 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index 4f3d512049c..f9d5883323a 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -9702,8 +9702,8 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData1: 120000 - SkillData2: 20000 + SkillData1: 120_000 // Duration of the performance (in miliseconds) + SkillData2: 20_000 // Duration of SC_ASSNCROS when unit leaves the performance area (in miliseconds) CoolDown: 0 Requirements: { SPCost: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 280c754cd64..6439b41dc17 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4197,18 +4197,17 @@ SC_WHISTLE: { Skill: "BA_WHISTLE" } SC_ASSNCROS: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { Aspd: true } Skill: "BA_ASSASSINCROSS" + Icon: "SI_ASSASSINCROSS" } SC_POEMBRAGI: { Visible: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 0a0c8b1334d..8264c2a2bc3 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9900,39 +9900,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 120000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_ASSNCROS duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 38 - Lv2: 41 - Lv3: 44 - Lv4: 47 - Lv5: 50 - Lv6: 53 - Lv7: 56 - Lv8: 59 - Lv9: 62 - Lv10: 65 + Lv1: 40 + Lv2: 45 + Lv3: 50 + Lv4: 55 + Lv5: 60 + Lv6: 65 + Lv7: 70 + Lv8: 75 + Lv9: 80 + Lv10: 85 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa8 - Layout: 3 - Interval: 3000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_SONG: true - UF_DUALMODE: true - } - } }, { Id: 321 diff --git a/src/map/skill.c b/src/map/skill.c index ab5b65b2470..babb62517a4 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7979,6 +7979,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * break; #ifdef RENEWAL + case BA_ASSASSINCROSS: case BA_POEMBRAGI: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; @@ -12428,10 +12429,10 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_SIEGFRIED: case BA_DISSONANCE: #ifndef RENEWAL + case BA_ASSASSINCROSS: case BA_POEMBRAGI: #endif case BA_WHISTLE: - case BA_ASSASSINCROSS: case BA_APPLEIDUN: case DC_UGLYDANCE: case DC_HUMMING: @@ -13467,20 +13468,15 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 } #endif break; +#ifndef RENEWAL case BA_ASSASSINCROSS: -#ifdef RENEWAL - // This formula was taken from a RE calculator - // and the changes published on irowiki - // Luckily, official tests show it's the right one - val1 = skill_lv + (st->agi / 20); -#else if (sd != NULL) val1 = pc->checkskill(sd, BA_MUSICALLESSON) / 2; val1 += 10 + skill_lv + (st->agi/10); // ASPD increase val1 *= 10; // ASPD works with 1000 as 100% -#endif break; +#endif case DC_FORTUNEKISS: val1 = 10 + skill_lv + (st->luk / 10); // Critical increase #ifndef RENEWAL diff --git a/src/map/status.c b/src/map/status.c index f418564e6db..2a3080d57cd 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7958,6 +7958,14 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl break; #ifdef RENEWAL + case SC_ASSNCROS: + // val1 = skill lv + if (val1 < 10) + val2 = 1 + (val1 - 1) * 2; // ASPD increase + else + val2 = 20; // ASPD increase + break; + case SC_POEMBRAGI: // val1 = skill lv val2 = val1 * 2; // Cast time reduction @@ -12372,8 +12380,8 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) case BD_SIEGFRIED: #ifndef RENEWAL case BA_DISSONANCE: -#endif case BA_ASSASSINCROSS: +#endif case DC_UGLYDANCE: s=3; break; From 252c90cd39677d45de6a5d323c7958fd81200a4d Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 13:47:49 -0300 Subject: [PATCH 10/30] Rebalance of BA_APPLEIDUN (Song of Lutie) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect changes: - MaxHP increase formula changed: - SkillLv < 10: (SkillLv + 9)% - SkillLv = 10: 20% - Removed HP Recovery effect - Added effect: HP Regen Rate increase by (SkillLv x 2)% - Caster stats and Music Lessons no longer affects the formula - Effect duration changed: 180s -> 60s - SP Cost changed: - Old: 35 + (SkillLv x 5) - New: 60 + (SkillLv x 5) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/pre-re/skill_db.conf | 4 ++-- db/re/sc_config.conf | 10 +++++----- db/re/skill_db.conf | 19 ++++++------------- src/map/pc.c | 5 +++++ src/map/skill.c | 20 ++++++++++++-------- src/map/status.c | 20 +++++++++++++++----- 7 files changed, 46 insertions(+), 33 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index f417882a607..831301d930b 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4309,6 +4309,7 @@ constants_db: { SI_SPEARQUICKEN: 68 SI_ASSASSINCROSS: 71 SI_POEMBRAGI: 72 + SI_APPLEIDUN: 73 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index f9d5883323a..ec38954d05e 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -9804,8 +9804,8 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData1: 180000 - SkillData2: 20000 + SkillData1: 180_000 // Duration of the performance (in miliseconds) + SkillData2: 20_000 // Duration of SC_APPLEIDUN when unit leaves the performance area (in miliseconds) CoolDown: 0 Requirements: { SPCost: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 6439b41dc17..43b21691e28 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4220,18 +4220,18 @@ SC_POEMBRAGI: { Icon: "SI_POEMBRAGI" } SC_APPLEIDUN: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { Maxhp: true + Regen: true } Skill: "BA_APPLEIDUN" + Icon: "SI_APPLEIDUN" } SC_HUMMING: { Flags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 8264c2a2bc3..4544284436c 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9988,10 +9988,14 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 180000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_APPLEIDUN duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { Lv1: 40 @@ -10010,17 +10014,6 @@ skill_db: ( Whips: true } } - Unit: { - Id: 0xaa - Layout: 3 - Interval: 6000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_SONG: true - UF_DUALMODE: true - } - } }, { Id: 323 diff --git a/src/map/pc.c b/src/map/pc.c index 48e8a3927c6..3ca6820e358 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -8716,6 +8716,11 @@ static int pc_itemheal(struct map_session_data *sd, int itemid, int hp, int sp) // Activation Potion if (sd->sc.data[SC_VITALIZE_POTION] != NULL) hp += hp * sd->sc.data[SC_VITALIZE_POTION]->val3 / 100; + +#ifdef RENEWAL + if (sd->sc.data[SC_APPLEIDUN] != NULL) + hp += hp * sd->sc.data[SC_APPLEIDUN]->val3 / 100; +#endif } if(sp) { bonus = 100 + (sd->battle_status.int_<<1) diff --git a/src/map/skill.c b/src/map/skill.c index babb62517a4..a7e3b77f59e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1158,15 +1158,13 @@ static int skill_calc_heal(struct block_list *src, struct block_list *target, ui case SU_TUNABELLY: hp = status_get_max_hp(target) * ((20 * skill_lv) - 10) / 100; break; +#ifndef RENEWAL case BA_APPLEIDUN: -#ifdef RENEWAL - hp = 100+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery -#else // not RENEWAL - hp = 30+5*skill_lv+5*(status_get_vit(src)/10); // HP recovery + hp = 30 + 5 * skill_lv + 5 * (status_get_vit(src) / 10); // HP recovery if (sd != NULL) hp += 5 * pc->checkskill(sd, BA_MUSICALLESSON); -#endif // RENEWAL break; +#endif // not RENEWAL case PR_SANCTUARY: hp = (skill_lv>6)?777:skill_lv*100; break; @@ -1240,6 +1238,10 @@ static int skill_calc_heal(struct block_list *src, struct block_list *target, ui default: hp += status->get_matk(src, 3); } + + // In-game tests suggests that this effect applies AFTER the MATK bonus is calculated + if (sc->data[SC_APPLEIDUN] != NULL) + hp += hp * sc->data[SC_APPLEIDUN]->val3 / 100; #endif // RENEWAL return hp; } @@ -7981,6 +7983,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * #ifdef RENEWAL case BA_ASSASSINCROSS: case BA_POEMBRAGI: + case BA_APPLEIDUN: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; #endif @@ -12431,9 +12434,9 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill #ifndef RENEWAL case BA_ASSASSINCROSS: case BA_POEMBRAGI: + case BA_APPLEIDUN: #endif case BA_WHISTLE: - case BA_APPLEIDUN: case DC_UGLYDANCE: case DC_HUMMING: case DC_DONTFORGETME: @@ -13449,14 +13452,15 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 } #endif break; +#ifndef RENEWAL case BA_APPLEIDUN: val1 = 5 + 2 * skill_lv + st->vit / 10; // MaxHP percent increase -#ifndef RENEWAL + if (sd != NULL) { val1 += pc->checkskill(sd, BA_MUSICALLESSON); } -#endif break; +#endif case DC_SERVICEFORYOU: val1 = 15 + skill_lv + (st->int_ / 10); // MaxSP percent increase val2 = 20 + 3 * skill_lv + (st->int_ / 10); // SP cost reduction diff --git a/src/map/status.c b/src/map/status.c index 2a3080d57cd..8b6afad13dd 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2889,6 +2889,11 @@ static void status_calc_regen_rate_pc(struct map_session_data *sd, struct regen_ } } +#ifdef RENEWAL + if (sc->data[SC_APPLEIDUN] != NULL) + regen->hp += regen->hp * sc->data[SC_APPLEIDUN]->val3 / 100; +#endif + if (sc->data[SC_CATNIPPOWDER] != NULL) { regen->rate.hp *= 2; regen->rate.sp *= 2; @@ -7971,6 +7976,13 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val2 = val1 * 2; // Cast time reduction val3 = val1 * 3; // After-cast delay reduction break; + + case SC_APPLEIDUN: + // - val1: Skill Lv + val2 = (val1 < 10 ? (9 + val1) : 20); // MaxHP % + val3 = 2 * val1; // Recovery Boost % + break; + #endif case SC_LONGING: @@ -12401,13 +12413,11 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) case DC_SERVICEFORYOU: s=5; break; +#ifndef RENEWAL case BA_APPLEIDUN: - #ifdef RENEWAL - s=5; - #else - s=6; - #endif + s = 6; break; +#endif case CG_MOONLIT: //Moonlit's cost is 4sp*skill_lv [Skotlex] sp= 4*(sce->val1>>16); From c1f448ce9dfa9dc58c20f2198576213628438a80 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 13:59:40 -0300 Subject: [PATCH 11/30] Rebalance of BA_WHISTLE (Perfect Tablature) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - Flee increase: - when SkillLv < 10: +(18 + SkillLv x 2) - when SkillLv = 10: +40 - Perfect Dodge increase: (SkillLv + 1) / 2 - Caster stats and Music Lessons no longer affects the formula - Effect duration changed: 180s -> 60s - SP Cost changed: - Old: 20 + (SkillLv x 4) - New: 20 + (SkillLv x 2) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/pre-re/skill_db.conf | 4 ++-- db/re/sc_config.conf | 9 ++++----- db/re/skill_db.conf | 39 ++++++++++++++++----------------------- src/map/skill.c | 14 +++++++++----- src/map/status.c | 8 +++++++- 6 files changed, 39 insertions(+), 36 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 831301d930b..c694db8d4cb 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4307,6 +4307,7 @@ constants_db: { SI_DEFENDER: 62 SI_AUTOSPELL: 65 SI_SPEARQUICKEN: 68 + SI_WHISTLE: 70 SI_ASSASSINCROSS: 71 SI_POEMBRAGI: 72 SI_APPLEIDUN: 73 diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index ec38954d05e..8ccae7a1557 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -9651,8 +9651,8 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData1: 60000 - SkillData2: 20000 + SkillData1: 60_000 // Duration of the performance (in miliseconds) + SkillData2: 20_000 // Duration of SC_WHISTLE when unit leaves the performance area (in miliseconds) CoolDown: 0 Requirements: { SPCost: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 43b21691e28..96e863c80a5 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4182,19 +4182,18 @@ SC_DANCING: { Skill: "BD_ENCORE" } SC_WHISTLE: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { Flee: true Flee2: true } Skill: "BA_WHISTLE" + Icon: "SI_WHISTLE" } SC_ASSNCROS: { Visible: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 4544284436c..629dea6a5b7 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9849,39 +9849,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_WHISTLE duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 24 - Lv2: 28 - Lv3: 32 - Lv4: 36 - Lv5: 40 - Lv6: 44 - Lv7: 48 - Lv8: 52 - Lv9: 56 - Lv10: 60 + Lv1: 22 + Lv2: 24 + Lv3: 26 + Lv4: 28 + Lv5: 30 + Lv6: 32 + Lv7: 34 + Lv8: 36 + Lv9: 38 + Lv10: 40 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa7 - Layout: 3 - Interval: 3000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_SONG: true - UF_DUALMODE: true - } - } }, { Id: 320 diff --git a/src/map/skill.c b/src/map/skill.c index a7e3b77f59e..e3bada2c0bd 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7981,6 +7981,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * break; #ifdef RENEWAL + case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: case BA_APPLEIDUN: @@ -12432,11 +12433,11 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_SIEGFRIED: case BA_DISSONANCE: #ifndef RENEWAL + case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: case BA_APPLEIDUN: #endif - case BA_WHISTLE: case DC_UGLYDANCE: case DC_HUMMING: case DC_DONTFORGETME: @@ -13407,16 +13408,19 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 case DC_UGLYDANCE: val1 = 10; //FIXME: This value is not used anywhere, what is it for? [Skotlex] break; - case BA_WHISTLE: - val1 = skill_lv +st->agi/10; // Flee increase - val2 = ((skill_lv+1)/2)+st->luk/10; // Perfect dodge increase + #ifndef RENEWAL + case BA_WHISTLE: + val1 = skill_lv + st->agi / 10; // Flee increase + val2 = ((skill_lv + 1) / 2) + st->luk / 10; // Perfect dodge increase + if (sd != NULL) { val1 += pc->checkskill(sd, BA_MUSICALLESSON); val2 += pc->checkskill(sd, BA_MUSICALLESSON); } -#endif break; +#endif + case DC_HUMMING: val1 = 2*skill_lv+st->dex/10; // Hit increase #ifdef RENEWAL diff --git a/src/map/status.c b/src/map/status.c index 8b6afad13dd..0c5f3d4ea4e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7963,6 +7963,12 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl break; #ifdef RENEWAL + case SC_WHISTLE: + // val1: Skill Lv + val2 = (val1 < 10 ? (18 + val1 * 2) : 40); // Flee Increase + val3 = (val1 + 1) / 2; // Perfect Dodge increase + break; + case SC_ASSNCROS: // val1 = skill lv if (val1 < 10) @@ -12405,9 +12411,9 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) break; case CG_HERMODE: case BD_INTOABYSS: - case BA_WHISTLE: case DC_HUMMING: #ifndef RENEWAL + case BA_WHISTLE: case BA_POEMBRAGI: #endif case DC_SERVICEFORYOU: From 4af02557e1c6d14594afb5f316eb4b07a49773a6 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 14:15:21 -0300 Subject: [PATCH 12/30] Rebalance of DC_UGLYDANCE (Hip Shaker) Skill reworked: - It is now a single AoE effect - It no longer keeps the "performance running" - SP drain amount changed: (10 + 2 * (SkillLv))% - SP Cost changed: - Old: 20 + (SkillLv x 3) - New: 32 + (SkillLv x 3) - 0.3s global delay added - 5s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/re/map_zone_db.conf | 2 + db/re/skill_db.conf | 59 ++++++++++++------- src/map/skill.c | 56 +++++++++++++++++- src/map/skill.h | 1 + src/map/status.c | 4 +- src/plugins/HPMHooking/HPMHooking.Defs.inc | 2 + .../HPMHooking_map.HPMHooksCore.inc | 4 ++ .../HPMHooking_map.HookingPoints.inc | 1 + .../HPMHooking/HPMHooking_map.Hooks.inc | 26 ++++++++ 9 files changed, 129 insertions(+), 26 deletions(-) diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index be09529117c..f75a240d095 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -117,6 +117,7 @@ zones: ( SO_ARRULLO: "PLAYER" CG_HERMODE: "PLAYER" BA_DISSONANCE: "PLAYER" + DC_UGLYDANCE: "PLAYER" } disabled_items: { @@ -516,6 +517,7 @@ zones: ( WM_POEMOFNETHERWORLD: "PLAYER" GN_WALLOFTHORN: "PLAYER" BA_DISSONANCE: "PLAYER" + DC_UGLYDANCE: "PLAYER" } disabled_items: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 629dea6a5b7..93429631aea 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -10059,36 +10059,53 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true + } + SplashRange: 4 + SkillData1: { // % of SP drained (100 = 100%) + Lv1: 12 + Lv2: 14 + Lv3: 16 + Lv4: 18 + Lv5: 20 + Lv6: 22 + Lv7: 24 + Lv8: 26 + Lv9: 28 + Lv10: 30 + } + SkillData2: { // Chance of draining SP (100 = 100%) + Lv1: 25 + Lv2: 30 + Lv3: 35 + Lv4: 40 + Lv5: 45 + Lv6: 50 + Lv7: 55 + Lv8: 60 + Lv9: 65 + Lv10: 70 } - SkillData1: 30000 - SkillData2: 3000 FixedCastTime: 0 + AfterCastActDelay: 300 + CoolDown: 5_000 Requirements: { SPCost: { - Lv1: 23 - Lv2: 26 - Lv3: 29 - Lv4: 32 - Lv5: 35 - Lv6: 38 - Lv7: 41 - Lv8: 44 - Lv9: 47 - Lv10: 50 + Lv1: 35 + Lv2: 38 + Lv3: 41 + Lv4: 44 + Lv5: 47 + Lv6: 50 + Lv7: 53 + Lv8: 56 + Lv9: 59 + Lv10: 62 } WeaponTypes: { Whips: true } } - Unit: { - Id: 0xab - Layout: 3 - Interval: 3000 - Target: "Enemy" - Flag: { - UF_DANCE: true - } - } }, { Id: 326 diff --git a/src/map/skill.c b/src/map/skill.c index e3bada2c0bd..6bd26bc5e21 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1868,14 +1868,16 @@ static int skill_additional_effect(struct block_list *src, struct block_list *bl sc_start(src, bl, SC_SLEEP, 15, skill_lv, skill->get_time2(skill_id, skill_lv), skill_id); break; +#ifndef RENEWAL case DC_UGLYDANCE: rate = 5+5*skill_lv; -#ifndef RENEWAL + if (sd != NULL && (temp = pc->checkskill(sd, DC_DANCINGLESSON)) > 0) rate += 5 + temp; -#endif status_zap(bl, 0, rate); break; +#endif + case SL_STUN: if (tstatus->size==SZ_MEDIUM) //Only stuns mid-sized mobs. sc_start(src, bl, SC_STUN, (30 + 10 * skill_lv), skill_lv, skill->get_time(skill_id, skill_lv), skill_id); @@ -7987,6 +7989,10 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case BA_APPLEIDUN: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; + + case DC_UGLYDANCE: + skill->castend_nodamage_id_ugly_dance(src, bl, skill_id, skill_lv, tick, flag); + break; #endif #ifdef RENEWAL @@ -11901,6 +11907,49 @@ static void skill_castend_nodamage_id_sc_song(struct block_list *src, struct blo #endif } +/** + * Castend handler for Ugly Dance (RE-only) + * @param src Unit who cast the skill + * @param bl Unit being targeted by the skill + * @param skill_id skill being cast + * @param skill_lv level of the skill being cast + * @param tick + * @param flag castend flags + * - flag & 1 : + * when not set: it is the initial skill cast, + * when set: it is in the reiteration over targets to get affected + */ +static void skill_castend_nodamage_id_ugly_dance(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) +{ +#ifdef RENEWAL + nullpo_retv(src); + nullpo_retv(bl); + + if ((flag & 1) == 0) { + struct map_session_data *sd = BL_CAST(BL_PC, src); + if (sd != NULL) { + sd->skill_id_dance = skill_id; + sd->skill_lv_dance = skill_lv; + + clif->skill_nodamage(src, src, skill_id, skill_lv, 1); + } + + int splash_range = skill->get_splash(skill_id, skill_lv); + int flags = flag | 1; // &1 will tell when we are iterating over the "execution" phase + map->foreachinrange(skill->area_sub, src, splash_range, BL_CHAR, src, skill_id, skill_lv, tick, flags | BCT_ENEMY, skill->castend_nodamage_id); + } else { + int chance = skill->get_time2(skill_id, skill_lv); + + if (rnd() % 100 < chance) { + int drain_rate = skill->get_time(skill_id, skill_lv); + int drain_amount = status_get_max_sp(bl) * drain_rate / 100; + + status_zap(bl, 0, drain_amount); + } + } +#endif +} + static bool skill_castend_nodamage_id_dead_unknown(struct block_list *src, struct block_list *bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag) { return true; @@ -12437,8 +12486,8 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BA_ASSASSINCROSS: case BA_POEMBRAGI: case BA_APPLEIDUN: -#endif case DC_UGLYDANCE: +#endif case DC_HUMMING: case DC_DONTFORGETME: case DC_FORTUNEKISS: @@ -25569,6 +25618,7 @@ void skill_defaults(void) skill->arrow_create = skill_arrow_create; skill->castend_nodamage_id = skill_castend_nodamage_id; skill->castend_nodamage_id_sc_song = skill_castend_nodamage_id_sc_song; + skill->castend_nodamage_id_ugly_dance = skill_castend_nodamage_id_ugly_dance; skill->castend_damage_id = skill_castend_damage_id; skill->castend_pos2 = skill_castend_pos2; skill->blockpc_start = skill_blockpc_start_; diff --git a/src/map/skill.h b/src/map/skill.h index d0eb0ec2741..2af3e3fd4e5 100644 --- a/src/map/skill.h +++ b/src/map/skill.h @@ -2193,6 +2193,7 @@ struct skill_interface { void (*castend_type) (enum cast_enum type, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); int (*castend_nodamage_id) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); void (*castend_nodamage_id_sc_song) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); + void (*castend_nodamage_id_ugly_dance) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); int (*castend_damage_id) (struct block_list* src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick,int flag); int (*castend_pos2) (struct block_list *src, int x, int y, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); int (*blockpc_start) (struct map_session_data *sd, uint16 skill_id, int tick); diff --git a/src/map/status.c b/src/map/status.c index 0c5f3d4ea4e..2f663c658f1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -12399,9 +12399,9 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) #ifndef RENEWAL case BA_DISSONANCE: case BA_ASSASSINCROSS: -#endif case DC_UGLYDANCE: - s=3; +#endif + s = 3; break; case BD_LULLABY: case BD_ETERNALCHAOS: diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 79404e12428..5a2f5669cd3 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -8526,6 +8526,8 @@ typedef int (*HPMHOOK_pre_skill_castend_nodamage_id) (struct block_list **src, s typedef int (*HPMHOOK_post_skill_castend_nodamage_id) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); typedef void (*HPMHOOK_pre_skill_castend_nodamage_id_sc_song) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); typedef void (*HPMHOOK_post_skill_castend_nodamage_id_sc_song) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); +typedef void (*HPMHOOK_pre_skill_castend_nodamage_id_ugly_dance) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); +typedef void (*HPMHOOK_post_skill_castend_nodamage_id_ugly_dance) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); typedef int (*HPMHOOK_pre_skill_castend_damage_id) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); typedef int (*HPMHOOK_post_skill_castend_damage_id) (int retVal___, struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); typedef int (*HPMHOOK_pre_skill_castend_pos2) (struct block_list **src, int *x, int *y, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); diff --git a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc index 29d406aac16..3aa47798f61 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HPMHooksCore.inc @@ -6448,6 +6448,8 @@ struct { struct HPMHookPoint *HP_skill_castend_nodamage_id_post; struct HPMHookPoint *HP_skill_castend_nodamage_id_sc_song_pre; struct HPMHookPoint *HP_skill_castend_nodamage_id_sc_song_post; + struct HPMHookPoint *HP_skill_castend_nodamage_id_ugly_dance_pre; + struct HPMHookPoint *HP_skill_castend_nodamage_id_ugly_dance_post; struct HPMHookPoint *HP_skill_castend_damage_id_pre; struct HPMHookPoint *HP_skill_castend_damage_id_post; struct HPMHookPoint *HP_skill_castend_pos2_pre; @@ -14029,6 +14031,8 @@ struct { int HP_skill_castend_nodamage_id_post; int HP_skill_castend_nodamage_id_sc_song_pre; int HP_skill_castend_nodamage_id_sc_song_post; + int HP_skill_castend_nodamage_id_ugly_dance_pre; + int HP_skill_castend_nodamage_id_ugly_dance_post; int HP_skill_castend_damage_id_pre; int HP_skill_castend_damage_id_post; int HP_skill_castend_pos2_pre; diff --git a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc index edec79f423a..3e990f9d023 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.HookingPoints.inc @@ -3300,6 +3300,7 @@ struct HookingPointData HookingPoints[] = { { HP_POP(skill->castend_type, HP_skill_castend_type) }, { HP_POP(skill->castend_nodamage_id, HP_skill_castend_nodamage_id) }, { HP_POP(skill->castend_nodamage_id_sc_song, HP_skill_castend_nodamage_id_sc_song) }, + { HP_POP(skill->castend_nodamage_id_ugly_dance, HP_skill_castend_nodamage_id_ugly_dance) }, { HP_POP(skill->castend_damage_id, HP_skill_castend_damage_id) }, { HP_POP(skill->castend_pos2, HP_skill_castend_pos2) }, { HP_POP(skill->blockpc_start, HP_skill_blockpc_start) }, diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 276687ff43f..71a9d2c195c 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -86045,6 +86045,32 @@ void HP_skill_castend_nodamage_id_sc_song(struct block_list *src, struct block_l } return; } +void HP_skill_castend_nodamage_id_ugly_dance(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { + int hIndex = 0; + if (HPMHooks.count.HP_skill_castend_nodamage_id_ugly_dance_pre > 0) { + void (*preHookFunc) (struct block_list **src, struct block_list **bl, uint16 *skill_id, uint16 *skill_lv, int64 *tick, int *flag); + *HPMforce_return = false; + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_ugly_dance_pre; hIndex++) { + preHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_ugly_dance_pre[hIndex].func; + preHookFunc(&src, &bl, &skill_id, &skill_lv, &tick, &flag); + } + if (*HPMforce_return) { + *HPMforce_return = false; + return; + } + } + { + HPMHooks.source.skill.castend_nodamage_id_ugly_dance(src, bl, skill_id, skill_lv, tick, flag); + } + if (HPMHooks.count.HP_skill_castend_nodamage_id_ugly_dance_post > 0) { + void (*postHookFunc) (struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag); + for (hIndex = 0; hIndex < HPMHooks.count.HP_skill_castend_nodamage_id_ugly_dance_post; hIndex++) { + postHookFunc = HPMHooks.list.HP_skill_castend_nodamage_id_ugly_dance_post[hIndex].func; + postHookFunc(src, bl, skill_id, skill_lv, tick, flag); + } + } + return; +} int HP_skill_castend_damage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag) { int hIndex = 0; int retVal___ = 0; From 91bf1e325041fbdcc7fe48d6cb6e0d1f4faa5c56 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 14:30:33 -0300 Subject: [PATCH 13/30] Rebalance of DC_DONTFORGETME (Slow Grace) Skill reworked: - It is now a single AoE effect which causes a SC on enemies - It no longer keeps the "performance running" - Effect formula changed: - Attack Speed reduction: ((SkillLv x 3) + DEX / 15)% - Move Speed reduction: ((SkillLv x 2) + AGI / 20)% - Note: According to rA, dividing by 15 and 20 was already the right values for RE. And this does seem to match the rebalance formula (at least, is close enough) - Can only be used in PvP areas - 0.5s of global delay added - 1s casting time added - 20s of cooldown added - SP cost changed - Old: 25 + (SkillLv) x 3 - New: 35 + (SkillLv) x 3 - Area of Effect increased: 7x7 -> 9x9 From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/map_zone_db.conf | 2 ++ db/re/sc_config.conf | 9 ++++----- db/re/skill_db.conf | 38 ++++++++++++++++---------------------- src/map/skill.c | 15 ++++++++------- src/map/status.c | 25 +++++++++++++++++++------ 6 files changed, 50 insertions(+), 40 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index c694db8d4cb..d2bfb4a512b 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4311,6 +4311,7 @@ constants_db: { SI_ASSASSINCROSS: 71 SI_POEMBRAGI: 72 SI_APPLEIDUN: 73 + SI_DONTFORGETME: 75 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index f75a240d095..a91b4590def 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -118,6 +118,7 @@ zones: ( CG_HERMODE: "PLAYER" BA_DISSONANCE: "PLAYER" DC_UGLYDANCE: "PLAYER" + DC_DONTFORGETME: "PLAYER" } disabled_items: { @@ -518,6 +519,7 @@ zones: ( GN_WALLOFTHORN: "PLAYER" BA_DISSONANCE: "PLAYER" DC_UGLYDANCE: "PLAYER" + DC_DONTFORGETME: "PLAYER" } disabled_items: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 96e863c80a5..c7fa30225fe 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4247,19 +4247,18 @@ SC_HUMMING: { Skill: "DC_HUMMING" } SC_DONTFORGETME: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Debuff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { Speed: true Aspd: true } Skill: "DC_DONTFORGETME" + Icon: "SI_DONTFORGETME" } SC_FORTUNE: { Flags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 93429631aea..baf26572c4a 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -10209,38 +10209,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 180000 - SkillData2: 20000 + SplashRange: 4 + SkillData1: 60_000 // SC_DONTFORGETME duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 28 - Lv2: 31 - Lv3: 34 - Lv4: 37 - Lv5: 40 - Lv6: 43 - Lv7: 46 - Lv8: 49 - Lv9: 52 - Lv10: 55 + Lv1: 38 + Lv2: 41 + Lv3: 44 + Lv4: 47 + Lv5: 50 + Lv6: 53 + Lv7: 56 + Lv8: 59 + Lv9: 62 + Lv10: 65 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xad - Layout: 3 - Interval: 3000 - Target: "Enemy" - Flag: { - UF_DANCE: true - UF_DUALMODE: true - } - } }, { Id: 329 diff --git a/src/map/skill.c b/src/map/skill.c index 6bd26bc5e21..91db12505d5 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7990,6 +7990,10 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; + case DC_DONTFORGETME: + skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_ENEMY); + break; + case DC_UGLYDANCE: skill->castend_nodamage_id_ugly_dance(src, bl, skill_id, skill_lv, tick, flag); break; @@ -12489,7 +12493,9 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case DC_UGLYDANCE: #endif case DC_HUMMING: +#ifndef RENEWAL case DC_DONTFORGETME: +#endif case DC_FORTUNEKISS: case DC_SERVICEFORYOU: case CG_MOONLIT: @@ -13490,12 +13496,8 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val2 += 2 * pc->checkskill(sd, BA_MUSICALLESSON); } break; -#endif + case DC_DONTFORGETME: -#ifdef RENEWAL - val1 = st->dex/10 + 3*skill_lv; // ASPD decrease - val2 = st->agi/10 + 2*skill_lv; // Movement speed adjustment. -#else val1 = st->dex/10 + 3*skill_lv + 5; // ASPD decrease val2 = st->agi/10 + 3*skill_lv + 5; // Movement speed adjustment. @@ -13503,9 +13505,8 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val1 += pc->checkskill(sd, DC_DANCINGLESSON); val2 += pc->checkskill(sd, DC_DANCINGLESSON); } -#endif break; -#ifndef RENEWAL + case BA_APPLEIDUN: val1 = 5 + 2 * skill_lv + st->vit / 10; // MaxHP percent increase diff --git a/src/map/status.c b/src/map/status.c index 2f663c658f1..7707171d61a 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7989,6 +7989,18 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val3 = 2 * val1; // Recovery Boost % break; + case SC_DONTFORGETME: { + // - val1: Skill Lv + val2 = 3 * val1; // Base ASPD decrease + val3 = 2 * val1; // Base Movement speed adjustment. + + struct status_data *srcst; + if (src != NULL && (srcst = status->get_status_data(src)) != NULL) { + val2 += srcst->dex / 15; // Stats-based ASPD decrease + val3 += srcst->agi / 20; // Stats-based Movement speed adjustment. + } + break; + } #endif case SC_LONGING: @@ -12423,14 +12435,15 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) case BA_APPLEIDUN: s = 6; break; + + case DC_DONTFORGETME: + s = 10; + break; #endif case CG_MOONLIT: - //Moonlit's cost is 4sp*skill_lv [Skotlex] - sp= 4*(sce->val1>>16); - //Upkeep is also every 10 secs. - FALLTHROUGH - case DC_DONTFORGETME: - s=10; + // Moonlit's cost is 4sp * skill_lv [Skotlex] + sp = 4*(sce->val1>>16); + s = 10; break; } if( s != 0 && sce->val3 % s == 0 ) { From 7cb88f87c2a606b120d8c07565bf1edbdda0269d Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 14:52:47 -0300 Subject: [PATCH 14/30] Rebalance of DC_SERVICEFORYOU (Gypsy's Kiss) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - Max SP Boost: - SkillLv < 10: (9 + SkillLv)% - SkillLv = 10: 20% - SP Cost reduction: (SkillLv + 5)% - Caster stats and Dance Lessons no longer boosts the effects - SP Cost changed: - Old: 35 + (SkillLv x 5) - New: 57 + (SkillLv x 3) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 9 ++++----- db/re/skill_db.conf | 39 ++++++++++++++++----------------------- src/map/skill.c | 9 ++++----- src/map/status.c | 10 ++++++++-- 5 files changed, 33 insertions(+), 35 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index d2bfb4a512b..ca8e84b6dfa 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4312,6 +4312,7 @@ constants_db: { SI_POEMBRAGI: 72 SI_APPLEIDUN: 73 SI_DONTFORGETME: 75 + SI_SERVICEFORYOU: 77 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index c7fa30225fe..8307a0d4791 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4275,18 +4275,17 @@ SC_FORTUNE: { Skill: "DC_FORTUNEKISS" } SC_SERVICEFORYOU: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { All: true } Skill: "DC_SERVICEFORYOU" + Icon: "SI_SERVICEFORYOU" } SC_INCHIT: { Flags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index baf26572c4a..d83f8c23391 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -10304,39 +10304,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 180000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_SERVICEFORYOU duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 40 - Lv2: 45 - Lv3: 50 - Lv4: 55 - Lv5: 60 - Lv6: 65 - Lv7: 70 - Lv8: 75 - Lv9: 80 - Lv10: 85 + Lv1: 60 + Lv2: 63 + Lv3: 66 + Lv4: 69 + Lv5: 72 + Lv6: 75 + Lv7: 78 + Lv8: 81 + Lv9: 84 + Lv10: 87 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xaf - Layout: 3 - Interval: 3000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_DANCE: true - UF_DUALMODE: true - } - } }, { Id: 331 diff --git a/src/map/skill.c b/src/map/skill.c index 91db12505d5..0dcbe6c2313 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7987,6 +7987,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case BA_ASSASSINCROSS: case BA_POEMBRAGI: case BA_APPLEIDUN: + case DC_SERVICEFORYOU: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; @@ -12491,13 +12492,13 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BA_POEMBRAGI: case BA_APPLEIDUN: case DC_UGLYDANCE: + case DC_SERVICEFORYOU: #endif case DC_HUMMING: #ifndef RENEWAL case DC_DONTFORGETME: #endif case DC_FORTUNEKISS: - case DC_SERVICEFORYOU: case CG_MOONLIT: case GS_DESPERADO: case NJ_KAENSIN: @@ -13514,19 +13515,17 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val1 += pc->checkskill(sd, BA_MUSICALLESSON); } break; -#endif + case DC_SERVICEFORYOU: val1 = 15 + skill_lv + (st->int_ / 10); // MaxSP percent increase val2 = 20 + 3 * skill_lv + (st->int_ / 10); // SP cost reduction -#ifndef RENEWAL if (sd != NULL) { val1 += pc->checkskill(sd, DC_DANCINGLESSON) / 2; val2 += pc->checkskill(sd, DC_DANCINGLESSON) / 2; } -#endif break; -#ifndef RENEWAL + case BA_ASSASSINCROSS: if (sd != NULL) val1 = pc->checkskill(sd, BA_MUSICALLESSON) / 2; diff --git a/src/map/status.c b/src/map/status.c index 7707171d61a..be31ed39ea0 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8001,6 +8001,12 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl } break; } + + case SC_SERVICEFORYOU: + // - val1: Skill Lv + val2 = (val1 < 10 ? (9 + val1) : 20); // MaxSP percent increase + val3 = val1 + 5; // SP cost reduction + break; #endif case SC_LONGING: @@ -12427,9 +12433,9 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) #ifndef RENEWAL case BA_WHISTLE: case BA_POEMBRAGI: -#endif case DC_SERVICEFORYOU: - s=5; +#endif + s = 5; break; #ifndef RENEWAL case BA_APPLEIDUN: From 01dacf346fd85a3bc4ea3a56e08e19fdebfeb040 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 15:13:57 -0300 Subject: [PATCH 15/30] Rebalance of DC_FORTUNEKISS (Lady Luck) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect changed: - Crit boost formula changed: +(SkillLv)% - Added effect: Crit damage +(SkillLv x 2)% - Caster stats and Dance Lessons no longer boosts the effects - SP Cost changed: - Old: 40 + (SkillLv x 3) - New: 35 + (SkillLv x 5) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 9 ++++----- db/re/skill_db.conf | 39 ++++++++++++++++----------------------- src/map/battle.c | 4 ++++ src/map/skill.c | 9 +++++---- src/map/status.c | 12 ++++++++++-- 6 files changed, 40 insertions(+), 34 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index ca8e84b6dfa..1ba4fa33c51 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4312,6 +4312,7 @@ constants_db: { SI_POEMBRAGI: 72 SI_APPLEIDUN: 73 SI_DONTFORGETME: 75 + SI_FORTUNEKISS: 76 SI_SERVICEFORYOU: 77 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 8307a0d4791..325d82f49ea 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4261,18 +4261,17 @@ SC_DONTFORGETME: { Icon: "SI_DONTFORGETME" } SC_FORTUNE: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { Cri: true } Skill: "DC_FORTUNEKISS" + Icon: "SI_FORTUNEKISS" } SC_SERVICEFORYOU: { Visible: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index d83f8c23391..4d59c038daa 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -10253,39 +10253,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 120000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_FORTUNE duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 43 - Lv2: 46 - Lv3: 49 - Lv4: 52 - Lv5: 55 - Lv6: 58 - Lv7: 61 - Lv8: 64 - Lv9: 67 - Lv10: 70 + Lv1: 40 + Lv2: 45 + Lv3: 50 + Lv4: 55 + Lv5: 60 + Lv6: 65 + Lv7: 70 + Lv8: 75 + Lv9: 80 + Lv10: 85 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xae - Layout: 3 - Interval: 3000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_DANCE: true - UF_DUALMODE: true - } - } }, { Id: 330 diff --git a/src/map/battle.c b/src/map/battle.c index 7f0226d8b11..b4f6082ee7d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -5508,6 +5508,10 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl ATK_ADDRATE(sd->bonus.crit_atk_rate); if(flag.cri && sc && sc->data[SC_MTF_CRIDAMAGE]) ATK_ADDRATE(sc->data[SC_MTF_CRIDAMAGE]->val1);// temporary it should be 'bonus.crit_atk_rate' +#ifdef RENEWAL + if (flag.cri && sc != NULL && sc->data[SC_FORTUNE] != NULL) + ATK_ADDRATE(sc->data[SC_FORTUNE]->val3); +#endif #ifndef RENEWAL if(sd->status.party_id && (temp=pc->checkskill(sd,TK_POWER)) > 0){ if ((i = party->foreachsamemap(party->sub_count, sd, 0, sd->status.char_id)) > 0) diff --git a/src/map/skill.c b/src/map/skill.c index 0dcbe6c2313..f55ee62a8aa 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7987,6 +7987,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case BA_ASSASSINCROSS: case BA_POEMBRAGI: case BA_APPLEIDUN: + case DC_FORTUNEKISS: case DC_SERVICEFORYOU: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; @@ -12492,13 +12493,13 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BA_POEMBRAGI: case BA_APPLEIDUN: case DC_UGLYDANCE: + case DC_FORTUNEKISS: case DC_SERVICEFORYOU: #endif case DC_HUMMING: #ifndef RENEWAL case DC_DONTFORGETME: #endif - case DC_FORTUNEKISS: case CG_MOONLIT: case GS_DESPERADO: case NJ_KAENSIN: @@ -13533,15 +13534,15 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val1 += 10 + skill_lv + (st->agi/10); // ASPD increase val1 *= 10; // ASPD works with 1000 as 100% break; -#endif + case DC_FORTUNEKISS: val1 = 10 + skill_lv + (st->luk / 10); // Critical increase -#ifndef RENEWAL if (sd != NULL) val1 += pc->checkskill(sd, DC_DANCINGLESSON); -#endif + val1 *= 10; //Because every 10 crit is an actual cri point. break; +#endif case BD_DRUMBATTLEFIELD: #ifdef RENEWAL val1 = (skill_lv+5)*25; //Watk increase diff --git a/src/map/status.c b/src/map/status.c index be31ed39ea0..697582f6e17 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4831,7 +4831,7 @@ static int status_calc_critical(struct block_list *bl, struct status_change *sc, critical += sc->data[SC_FOOD_CRITICALSUCCESSVALUE]->val1; if (sc->data[SC_EXPLOSIONSPIRITS]) critical += sc->data[SC_EXPLOSIONSPIRITS]->val2; - if (sc->data[SC_FORTUNE]) + if (sc->data[SC_FORTUNE] != NULL) critical += sc->data[SC_FORTUNE]->val2; if (sc->data[SC_TRUESIGHT]) critical += sc->data[SC_TRUESIGHT]->val2; @@ -8002,6 +8002,12 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl break; } + case SC_FORTUNE: + // - val1: Skill Lv + val2 = val1 * 10; // Critical increase (10 = +1) + val3 = val1 * 2; // Critical Damage Increase + break; + case SC_SERVICEFORYOU: // - val1: Skill Lv val2 = (val1 < 10 ? (9 + val1) : 20); // MaxSP percent increase @@ -12424,8 +12430,10 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) case BD_LULLABY: case BD_ETERNALCHAOS: case BD_ROKISWEIL: +#ifndef RENEWAL case DC_FORTUNEKISS: - s=4; +#endif + s = 4; break; case CG_HERMODE: case BD_INTOABYSS: From 29ec6053e5db51063bc33242693b8869fd4ba4b1 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 15:24:38 -0300 Subject: [PATCH 16/30] Rebalance of DC_HUMMING (Focus Ballet) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - HIT boost: +(SkillLv x 4) - Caster stats and Dance Lessons no longer boosts the effects - SP Cost changed: - Old: 20 + (SkillLv x 2) - New: 30 + (SkillLv x 3) - 1s casting time added - 0.5s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/pre-re/skill_db.conf | 4 ++-- db/re/sc_config.conf | 9 ++++----- db/re/skill_db.conf | 39 ++++++++++++++++----------------------- src/map/skill.c | 13 ++++--------- src/map/status.c | 8 +++++++- 6 files changed, 34 insertions(+), 40 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 1ba4fa33c51..2bcb802cafe 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4311,6 +4311,7 @@ constants_db: { SI_ASSASSINCROSS: 71 SI_POEMBRAGI: 72 SI_APPLEIDUN: 73 + SI_HUMMING: 74 SI_DONTFORGETME: 75 SI_FORTUNEKISS: 76 SI_SERVICEFORYOU: 77 diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index 8ccae7a1557..cdda43d5a83 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -9980,8 +9980,8 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData1: 60000 - SkillData2: 20000 + SkillData1: 60_000 // Duration of the performance (in miliseconds) + SkillData2: 20_000 // Duration of SC_HUMMING when unit leaves the performance area (in miliseconds) CoolDown: 0 Requirements: { SPCost: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 325d82f49ea..1c93c1e6cc7 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -4233,18 +4233,17 @@ SC_APPLEIDUN: { Icon: "SI_APPLEIDUN" } SC_HUMMING: { + Visible: true Flags: { - NoDeathReset: true - NoSave: true - NoDispelReset: true - NoBBReset: true - NoClearanceReset: true + Buff: true NoMadoReset: true + NoMagicBlocked: true } CalcFlags: { Hit: true } Skill: "DC_HUMMING" + Icon: "SI_HUMMING" } SC_DONTFORGETME: { Visible: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 4d59c038daa..48906619279 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -10158,39 +10158,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 20000 + SplashRange: -1 + SkillData1: 60_000 // SC_HUMMING duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 500 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 22 - Lv2: 24 - Lv3: 26 - Lv4: 28 - Lv5: 30 - Lv6: 32 - Lv7: 34 - Lv8: 36 - Lv9: 38 - Lv10: 40 + Lv1: 33 + Lv2: 36 + Lv3: 39 + Lv4: 42 + Lv5: 45 + Lv6: 48 + Lv7: 51 + Lv8: 54 + Lv9: 57 + Lv10: 60 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xac - Layout: 3 - Interval: 3000 - Target: "All" - Flag: { - UF_NOMOB: true - UF_DANCE: true - UF_DUALMODE: true - } - } }, { Id: 328 diff --git a/src/map/skill.c b/src/map/skill.c index f55ee62a8aa..ea44ac9d1c8 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7987,6 +7987,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case BA_ASSASSINCROSS: case BA_POEMBRAGI: case BA_APPLEIDUN: + case DC_HUMMING: case DC_FORTUNEKISS: case DC_SERVICEFORYOU: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); @@ -12495,9 +12496,7 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case DC_UGLYDANCE: case DC_FORTUNEKISS: case DC_SERVICEFORYOU: -#endif case DC_HUMMING: -#ifndef RENEWAL case DC_DONTFORGETME: #endif case CG_MOONLIT: @@ -13476,18 +13475,14 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val2 += pc->checkskill(sd, BA_MUSICALLESSON); } break; -#endif case DC_HUMMING: - val1 = 2*skill_lv+st->dex/10; // Hit increase -#ifdef RENEWAL - val1 *= 2; -#else + val1 = 2 * skill_lv + st->dex / 10; // Hit increase + if (sd != NULL) val1 += pc->checkskill(sd, DC_DANCINGLESSON); -#endif break; -#ifndef RENEWAL + case BA_POEMBRAGI: val1 = 3 * skill_lv + st->dex / 10; // Casting time reduction //For some reason at level 10 the base delay reduction is 50%. diff --git a/src/map/status.c b/src/map/status.c index 697582f6e17..13594f6e035 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7989,6 +7989,12 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val3 = 2 * val1; // Recovery Boost % break; + case SC_HUMMING: + // Official servers uses "val1" for the bonus, but using val2 aligns with pre-re buff + // - val1: Skill Lv + val2 = 4 * val1; // Hit increase + break; + case SC_DONTFORGETME: { // - val1: Skill Lv val2 = 3 * val1; // Base ASPD decrease @@ -12437,8 +12443,8 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) break; case CG_HERMODE: case BD_INTOABYSS: - case DC_HUMMING: #ifndef RENEWAL + case DC_HUMMING: case BA_WHISTLE: case BA_POEMBRAGI: case DC_SERVICEFORYOU: From 2fd9dd0adb0291cc9ec3f0b1cbf5ed396bf31bc5 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 18 Nov 2023 23:09:21 -0300 Subject: [PATCH 17/30] Change general effect of performing ensembles (RE-only) - Add SC_ENSEMBLEFATIGUE effect after ensemble skills (RE-only) After using an ensemble skill, ensemble fatigue starts on both performers - Ensemble skills now consumes requirements from partner too From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 9 ++++++--- db/pre-re/sc_config.conf | 16 ++++++++++++++++ db/re/sc_config.conf | 16 ++++++++++++++++ src/map/skill.c | 25 ++++++++++++++++++++++--- src/map/status.c | 6 ++++++ src/map/status.h | 3 +++ 6 files changed, 69 insertions(+), 6 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 2bcb802cafe..d3d6855650b 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -1271,7 +1271,7 @@ constants_db: { SC_QD_SHOT_READY: 684 SC_HOWLING_MINE: 685 SC_BIND_TRAP: 686 - + // Star Emperor SC_SUNSTANCE: 687 SC_STARSTANCE: 688 @@ -1307,7 +1307,7 @@ constants_db: { SC_SOULDIVISION: 716 SC_ACTIVE_MONSTER_TRANSFORM: 717 - + SC_FIRE_EXPANSION_TEAR_GAS_SOB: 718 SC_TAROTCARD_ATK_PERC: 719 @@ -1316,7 +1316,9 @@ constants_db: { SC_GOSPEL_ATK_PERC: 722 SC_NO_SWITCH_WEAPON: 723 - + + SC_ENSEMBLEFATIGUE: 724 + comment__: "Emotes" e_gasp: 0 e_what: 1 @@ -4934,6 +4936,7 @@ constants_db: { SI_USE_SKILL_SP_SPA: 1062 SI_USE_SKILL_SP_SHA: 1063 SI_SP_SHA: 1064 + SI_ENSEMBLEFATIGUE: 1088 SI_SOULCURSE: 1125 SI_MADOGEAR: 1149 } diff --git a/db/pre-re/sc_config.conf b/db/pre-re/sc_config.conf index 0c074d88854..16958045d4d 100644 --- a/db/pre-re/sc_config.conf +++ b/db/pre-re/sc_config.conf @@ -6450,3 +6450,19 @@ SC_NO_SWITCH_WEAPON: { } Icon: "SI_NOEQUIPWEAPON" } + +SC_ENSEMBLEFATIGUE: { + Visible: true + Flags: { + NoSave: true + NoDispelReset: true + NoBBReset: true + NoClearanceReset: true + Debuff: true + } + CalcFlags: { + Speed: true + Aspd: true + } + Icon: "SI_ENSEMBLEFATIGUE" +} diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 1c93c1e6cc7..7add22dc95e 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -6460,3 +6460,19 @@ SC_NO_SWITCH_WEAPON: { } Icon: "SI_NOEQUIPWEAPON" } + +SC_ENSEMBLEFATIGUE: { + Visible: true + Flags: { + NoSave: true + NoDispelReset: true + NoBBReset: true + NoClearanceReset: true + Debuff: true + } + CalcFlags: { + Speed: true + Aspd: true + } + Icon: "SI_ENSEMBLEFATIGUE" +} diff --git a/src/map/skill.c b/src/map/skill.c index ea44ac9d1c8..a6ca6609f6e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -12198,6 +12198,7 @@ static int skill_castend_map(struct map_session_data *sd, uint16 skill_id, const return 0; } if(sd->sc.count && ( + sd->sc.data[SC_ENSEMBLEFATIGUE] || sd->sc.data[SC_SILENCE] || sd->sc.data[SC_ROKISWEIL] || sd->sc.data[SC_AUTOCOUNTER] || @@ -15267,7 +15268,7 @@ static int skill_check_condition_char_sub(struct block_list *bl, va_list ap) if(pc_isdead(tsd)) return 0; - if (tsd->sc.data[SC_SILENCE] || ( tsd->sc.opt1 && tsd->sc.opt1 != OPT1_BURNING )) + if (tsd->sc.data[SC_SILENCE] || tsd->sc.data[SC_ENSEMBLEFATIGUE] || ( tsd->sc.opt1 && tsd->sc.opt1 != OPT1_BURNING )) return 0; if( skill->get_inf2(skill_id)&INF2_CHORUS_SKILL ) { @@ -15303,12 +15304,18 @@ static int skill_check_condition_char_sub(struct block_list *bl, va_list ap) return 1; default: //Warning: Assuming Ensemble Dance/Songs for code speed. [Skotlex] { - uint16 skill_lv; if(pc_issit(tsd) || !unit->can_move(&tsd->bl)) return 0; + + uint16 skill_lv = pc->checkskill(tsd, skill_id); +#ifdef RENEWAL // In Renewal, partner also gets the requirements consumed, so we must check it + if (skill->check_condition_castbegin(tsd, skill_id, skill_lv) == 0) + return 0; +#endif + if (sd->status.sex != tsd->status.sex && (tsd->job & MAPID_UPPERMASK) == MAPID_BARDDANCER && - (skill_lv = pc->checkskill(tsd, skill_id)) > 0 && + skill_lv > 0 && (tsd->weapontype1==W_MUSICAL || tsd->weapontype1==W_WHIP) && sd->status.party_id && tsd->status.party_id && sd->status.party_id == tsd->status.party_id && @@ -15362,6 +15369,7 @@ static int skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, default: //Warning: Assuming Ensemble skills here (for speed) if( is_chorus ) break;//Chorus skills are not to be parsed as ensambles +#ifndef RENEWAL if (c > 0 && sd->sc.data[SC_DANCING] && (tsd = map->id2sd(p_sd[0])) != NULL) { sd->sc.data[SC_DANCING]->val4 = tsd->bl.id; sc_start4(&tsd->bl, &tsd->bl, SC_DANCING, 100, skill_id, sd->sc.data[SC_DANCING]->val2, *skill_lv, sd->bl.id, skill->get_time(skill_id, *skill_lv) + 1000, skill_id); @@ -15369,6 +15377,17 @@ static int skill_check_pc_partner(struct map_session_data *sd, uint16 skill_id, tsd->skill_id_dance = skill_id; tsd->skill_lv_dance = *skill_lv; } +#else + if (c > 0 && (tsd = map->id2sd(p_sd[0])) != NULL) { + skill->consume_requirement(tsd, skill_id, *skill_lv, 1); + clif->skill_nodamage(&tsd->bl, &sd->bl, skill_id, *skill_lv, 1); + sc_start(&sd->bl, &sd->bl, SC_ENSEMBLEFATIGUE, 100, skill_id, 10000, skill_id); + sc_start(&tsd->bl, &tsd->bl, SC_ENSEMBLEFATIGUE, 100, skill_id, 10000, skill_id); + + tsd->skill_id_dance = skill_id; + tsd->skill_lv_dance = *skill_lv; + } +#endif return c; } } diff --git a/src/map/status.c b/src/map/status.c index 13594f6e035..d9793704ef7 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -928,6 +928,7 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ if (skill_id != 0 /* Do not block item-casted skills.*/ && (src->type != BL_PC || sd->auto_cast_current.type != AUTOCAST_ITEM)) { //Skills blocked through status changes... if (!flag && ( //Blocked only from using the skill (stuff like autospell may still go through + sc->data[SC_ENSEMBLEFATIGUE] || sc->data[SC_SILENCE] || sc->data[SC_STEELBODY] || sc->data[SC_BERSERK] || @@ -5427,6 +5428,8 @@ static unsigned short status_calc_speed(struct block_list *bl, struct status_cha } if (sc->data[SC_CATNIPPOWDER]) val = max(val, sc->data[SC_CATNIPPOWDER]->val3); + if (sc->data[SC_ENSEMBLEFATIGUE] != NULL) + val = max(val, 30); // 30% MoveSpeed reduction if (sc->data[SC_BIND_TRAP]) val = max(val, sc->data[SC_BIND_TRAP]->val3); if (sc->data[SC_CREATINGSTAR] != NULL) @@ -5580,6 +5583,8 @@ static short status_calc_aspd(struct block_list *bl, struct status_change *sc, s // ASPD percentage values if (sc->data[SC_DONTFORGETME]) bonus -= sc->data[SC_DONTFORGETME]->val2; + if (sc->data[SC_ENSEMBLEFATIGUE] != NULL) + bonus -= 30; // 30% Attack Speed reduction if (sc->data[SC_LONGING]) bonus -= sc->data[SC_LONGING]->val2; if (sc->data[SC_STEELBODY]) @@ -7667,6 +7672,7 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl case SC_FLASHKICK: case SC_SOULUNITY: case SC__AUTOSHADOWSPELL: // otherwise you can't change your shadow spell to a lower skill_id + case SC_ENSEMBLEFATIGUE: break; case SC_GOSPEL: //Must not override a casting gospel char. diff --git a/src/map/status.h b/src/map/status.h index c1a30ed817c..bcaa1bd8447 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -921,6 +921,9 @@ typedef enum sc_type { SC_NO_SWITCH_WEAPON, + // More SCs for bard/dancer + SC_ENSEMBLEFATIGUE, + #ifndef SC_MAX SC_MAX, //Automatically updated max, used in for's to check we are within bounds. #endif From 0dc17bbfd8564c982124de9883256afaf32dee32 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Tue, 6 Feb 2024 23:23:52 -0300 Subject: [PATCH 18/30] Change pc_gainexp "is_quest" to a bitmask enum this allows us to easily expand it with new flags --- src/map/mob.c | 4 ++-- src/map/npc.c | 4 ++-- src/map/party.c | 2 +- src/map/pc.c | 5 +++-- src/map/pc.h | 7 ++++++- src/map/script.c | 2 +- src/map/skill.c | 7 ++++--- src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 ++-- src/plugins/HPMHooking/HPMHooking_map.Hooks.inc | 12 ++++++------ 9 files changed, 27 insertions(+), 20 deletions(-) diff --git a/src/map/mob.c b/src/map/mob.c index 8c53a5bee65..01ea197d55c 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2684,7 +2684,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) if(flag) { if(base_exp || job_exp) { if( md->dmglog[i].flag != MDLF_PET || battle_config.pet_attack_exp_to_master ) { - pc->gainexp(tmpsd[i], &md->bl, base_exp, job_exp, false); + pc->gainexp(tmpsd[i], &md->bl, base_exp, job_exp, EXP_FLAG_NONE); } } if(zeny) // zeny from mobs [Valaris] @@ -2903,7 +2903,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) clif->mvp_effect(mvp_sd); clif->mvp_exp(mvp_sd,mexp); - pc->gainexp(mvp_sd, &md->bl, mexp,0, false); + pc->gainexp(mvp_sd, &md->bl, mexp, 0, EXP_FLAG_NONE); log_mvp[1] = mexp; if (!(map->list[m].flag.nomvploot || type&1)) { diff --git a/src/map/npc.c b/src/map/npc.c index 0ea39b855f8..6c2281e60fa 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2406,7 +2406,7 @@ static int npc_buylist(struct map_session_data *sd, struct itemlist *item_list) if (z < 1) z = 1; - pc->gainexp(sd, NULL, 0, (int)z, false); + pc->gainexp(sd, NULL, 0, (int) z, EXP_FLAG_NONE); } } @@ -2987,7 +2987,7 @@ static int npc_selllist(struct map_session_data *sd, struct itemlist *item_list) if (z < 1) z = 1; - pc->gainexp(sd, NULL, 0, (int)z, false); + pc->gainexp(sd, NULL, 0, (int) z, EXP_FLAG_NONE); } } diff --git a/src/map/party.c b/src/map/party.c index 90cdd90b683..f562345fb37 100644 --- a/src/map/party.c +++ b/src/map/party.c @@ -1073,7 +1073,7 @@ static int party_exp_share(struct party_data *p, struct block_list *src, unsigne } for (i = 0; i < c; i++) { - pc->gainexp(sd[i], src, base_exp, job_exp, false); + pc->gainexp(sd[i], src, base_exp, job_exp, EXP_FLAG_NONE); if (zeny) // zeny from mobs [Valaris] pc->getzeny(sd[i],zeny,LOG_TYPE_PICKDROP_MONSTER,NULL); diff --git a/src/map/pc.c b/src/map/pc.c index 3ca6820e358..467ab927052 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6879,10 +6879,10 @@ static void pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *jo /** * Gives a determined EXP amount to sd and calculates remaining EXP for next level * @param src if is NULL no bonuses are taken into account - * @param is_quest Used to let client know that the EXP was from a quest (clif->displayexp) PACKETVER >= 20091027 + * @param flags Used to give more info about where the exp is coming from * @retval true success **/ -static bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) +static bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, enum gainexp_flags flags) { float nextbp = 0, nextjp = 0; uint64 nextb = 0, nextj = 0; @@ -6951,6 +6951,7 @@ static bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint } #if PACKETVER >= 20091027 + bool is_quest = ((flags & EXP_FLAG_QUEST) != 0); if(base_exp) clif->displayexp(sd, base_exp, SP_BASEEXP, is_quest); if(job_exp) diff --git a/src/map/pc.h b/src/map/pc.h index c0bcc2a758d..d305a63ae23 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -179,6 +179,11 @@ enum npc_timeout_type { NPCT_WAIT = 2, }; +enum gainexp_flags { + EXP_FLAG_NONE = 0, //< Normal EXP, no special flags + EXP_FLAG_QUEST = 0x01, //< EXP given by quests/NPCs (e.g. scripts getexp) +}; + struct pc_combos { struct script_code *bonus;/* the script of the combo */ int id; /* this combo id */ @@ -1067,7 +1072,7 @@ END_ZEROED_BLOCK; /* End */ int (*checkbaselevelup) (struct map_session_data *sd); void (*checkbaselevelup_sc) (struct map_session_data *sd); int (*checkjoblevelup) (struct map_session_data *sd); - bool (*gainexp) (struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); + bool (*gainexp) (struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, enum gainexp_flags flags); uint64 (*nextbaseexp) (const struct map_session_data *sd); uint64 (*thisbaseexp) (const struct map_session_data *sd); uint64 (*nextjobexp) (const struct map_session_data *sd); diff --git a/src/map/script.c b/src/map/script.c index d72268764c1..ddb34db1b9a 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -12093,7 +12093,7 @@ static BUILDIN(getexp) base = cap_value(apply_percentrate(base, battle_config.quest_exp_rate, 100), 0, INT_MAX); job = cap_value(apply_percentrate(job, battle_config.quest_exp_rate, 100), 0, INT_MAX); - pc->gainexp(sd, &sd->bl, base, job, true); + pc->gainexp(sd, &sd->bl, base, job, EXP_FLAG_QUEST); return true; } diff --git a/src/map/skill.c b/src/map/skill.c index a6ca6609f6e..ec40c201827 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6972,7 +6972,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * heal_get_jobexp = heal_get_jobexp * battle_config.heal_exp / 100; if (heal_get_jobexp <= 0) heal_get_jobexp = 1; - pc->gainexp(sd, bl, 0, heal_get_jobexp, false); + pc->gainexp(sd, bl, 0, heal_get_jobexp, EXP_FLAG_NONE); } } break; @@ -7048,7 +7048,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * if (jexp < 1) jexp = 1; } if(exp > 0 || jexp > 0) - pc->gainexp(sd, bl, exp, jexp, false); + pc->gainexp(sd, bl, exp, jexp, EXP_FLAG_NONE); } } } @@ -7191,7 +7191,8 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * break; case SA_LEVELUP: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); - if (sd && pc->nextbaseexp(sd)) pc->gainexp(sd, NULL, pc->nextbaseexp(sd) * 10 / 100, 0, false); + if (sd != NULL && pc->nextbaseexp(sd)) + pc->gainexp(sd, NULL, pc->nextbaseexp(sd) * 10 / 100, 0, EXP_FLAG_NONE); break; case SA_INSTANTDEATH: clif->skill_nodamage(src,bl,skill_id,skill_lv,1); diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 5a2f5669cd3..82bd2accf37 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -7180,8 +7180,8 @@ typedef void (*HPMHOOK_pre_pc_checkbaselevelup_sc) (struct map_session_data **sd typedef void (*HPMHOOK_post_pc_checkbaselevelup_sc) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_checkjoblevelup) (struct map_session_data **sd); typedef int (*HPMHOOK_post_pc_checkjoblevelup) (int retVal___, struct map_session_data *sd); -typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); -typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); +typedef bool (*HPMHOOK_pre_pc_gainexp) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, enum gainexp_flags *flags); +typedef bool (*HPMHOOK_post_pc_gainexp) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, enum gainexp_flags flags); typedef uint64 (*HPMHOOK_pre_pc_nextbaseexp) (const struct map_session_data **sd); typedef uint64 (*HPMHOOK_post_pc_nextbaseexp) (uint64 retVal___, const struct map_session_data *sd); typedef uint64 (*HPMHOOK_pre_pc_thisbaseexp) (const struct map_session_data **sd); diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 71a9d2c195c..e1abd82996b 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -68572,15 +68572,15 @@ int HP_pc_checkjoblevelup(struct map_session_data *sd) { } return retVal___; } -bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest) { +bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, enum gainexp_flags flags) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_pc_gainexp_pre > 0) { - bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, bool *is_quest); + bool (*preHookFunc) (struct map_session_data **sd, struct block_list **src, uint64 *base_exp, uint64 *job_exp, enum gainexp_flags *flags); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_gainexp_pre[hIndex].func; - retVal___ = preHookFunc(&sd, &src, &base_exp, &job_exp, &is_quest); + retVal___ = preHookFunc(&sd, &src, &base_exp, &job_exp, &flags); } if (*HPMforce_return) { *HPMforce_return = false; @@ -68588,13 +68588,13 @@ bool HP_pc_gainexp(struct map_session_data *sd, struct block_list *src, uint64 b } } { - retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, is_quest); + retVal___ = HPMHooks.source.pc.gainexp(sd, src, base_exp, job_exp, flags); } if (HPMHooks.count.HP_pc_gainexp_post > 0) { - bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); + bool (*postHookFunc) (bool retVal___, struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, enum gainexp_flags flags); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_gainexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_gainexp_post[hIndex].func; - retVal___ = postHookFunc(retVal___, sd, src, base_exp, job_exp, is_quest); + retVal___ = postHookFunc(retVal___, sd, src, base_exp, job_exp, flags); } } return retVal___; From ff2a231cfbdcf97e12586a101b72249918e34b78 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 15:38:22 -0300 Subject: [PATCH 19/30] Rebalance of BD_RICHMANKIM (Mental Sensing) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - EXP Boost formula changed: - Old: +(25 + SkillLv x 11)% - New: +(10 + SkillLv x 10)% - 1s casting time added - 0.3s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 6 +++++- db/re/skill_db.conf | 18 ++++++------------ src/map/mob.c | 8 ++++++-- src/map/pc.c | 14 ++++++++++++-- src/map/pc.h | 5 +++-- src/map/skill.c | 10 ++++++++-- src/map/status.c | 6 +++++- src/plugins/HPMHooking/HPMHooking.Defs.inc | 4 ++-- .../HPMHooking/HPMHooking_map.Hooks.inc | 12 ++++++------ 10 files changed, 54 insertions(+), 30 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index d3d6855650b..82dfa0481cd 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4317,6 +4317,7 @@ constants_db: { SI_DONTFORGETME: 75 SI_FORTUNEKISS: 76 SI_SERVICEFORYOU: 77 + SI_RICHMANKIM: 78 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 7add22dc95e..92f559d357a 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5426,10 +5426,14 @@ SC_COMA: { Skill: "NPC_DARKBLESSING" } SC_RICHMANKIM: { + Visible: true Flags: { - NoBoss: true + Buff: true + NoMadoReset: true + NoMagicBlocked: true } Skill: "BD_RICHMANKIM" + Icon: "SI_RICHMANKIM" } SC_ROKISWEIL: { Flags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 48906619279..291d87bb5d9 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9443,10 +9443,14 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: -1 + SkillData1: 60_000 // SC_RICHMANKIM duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 300 + CoolDown: 20_000 Requirements: { SPCost: 20 WeaponTypes: { @@ -9454,16 +9458,6 @@ skill_db: ( Whips: true } } - Unit: { - Id: 0x9f - Layout: 4 - Interval: -1 - Target: "Enemy" - Flag: { - UF_NOPC: true - UF_ENSEMBLE: true - } - } }, { Id: 308 diff --git a/src/map/mob.c b/src/map/mob.c index 01ea197d55c..052d2281b5d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2580,8 +2580,12 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) ) { //Experience calculation. int bonus = 100; //Bonus on top of your share (common to all attackers). int pnum = 0; - if (md->sc.data[SC_RICHMANKIM]) + +#ifndef RENEWAL + if (md->sc.data[SC_RICHMANKIM] != NULL) bonus += md->sc.data[SC_RICHMANKIM]->val2; +#endif + if(sd) { temp = status->get_class(&md->bl); if(sd->sc.data[SC_MIRACLE]) i = 2; //All mobs are Star Targets @@ -2903,7 +2907,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) clif->mvp_effect(mvp_sd); clif->mvp_exp(mvp_sd,mexp); - pc->gainexp(mvp_sd, &md->bl, mexp, 0, EXP_FLAG_NONE); + pc->gainexp(mvp_sd, &md->bl, mexp, 0, EXP_FLAG_MVP); log_mvp[1] = mexp; if (!(map->list[m].flag.nomvploot || type&1)) { diff --git a/src/map/pc.c b/src/map/pc.c index 467ab927052..7ed772bd304 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6806,7 +6806,7 @@ static int pc_checkjoblevelup(struct map_session_data *sd) /** * Alters EXP based on self bonuses that do not get shared with the party **/ -static void pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src) +static void pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src, enum gainexp_flags flags) { int buff_ratio = 0, buff_job_ratio = 0, race_ratio = 0, pk_ratio = 0; int64 jexp, bexp; @@ -6831,6 +6831,16 @@ static void pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *jo } #endif +#ifdef RENEWAL + // after rebalance, boss monsters does give more EXP, but "MVP" exp is not increased + if (sd->sc.data[SC_RICHMANKIM] != NULL && src->type == BL_MOB && (flags & EXP_FLAG_MVP) == 0) { + buff_ratio += sd->sc.data[SC_RICHMANKIM]->val1; + // jexp is boosted by both buff_ration AND buff_job_ratio, so we should not use buff_job_ratio here + // or we will give the bonus twice for jexp + // buff_job_ratio += sd->sc.data[SC_RICHMANKIM]->val1; + } +#endif + //Race modifier if (sd->expaddrace[st->race]) race_ratio += sd->expaddrace[st->race]; @@ -6898,7 +6908,7 @@ static bool pc_gainexp(struct map_session_data *sd, struct block_list *src, uint return false; if (src) - pc->calcexp(sd, &base_exp, &job_exp, src); + pc->calcexp(sd, &base_exp, &job_exp, src, flags); if (sd->status.guild_id > 0) base_exp -= guild->payexp(sd, base_exp); diff --git a/src/map/pc.h b/src/map/pc.h index d305a63ae23..cb9fbcc5ff7 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -180,8 +180,9 @@ enum npc_timeout_type { }; enum gainexp_flags { - EXP_FLAG_NONE = 0, //< Normal EXP, no special flags + EXP_FLAG_NONE = 0, //< Normal EXP, no special flags EXP_FLAG_QUEST = 0x01, //< EXP given by quests/NPCs (e.g. scripts getexp) + EXP_FLAG_MVP = 0x02, //< EXP given to the "MVP" player (when killing bosses) }; struct pc_combos { @@ -1221,7 +1222,7 @@ END_ZEROED_BLOCK; /* End */ int (*bonus_addeff) (struct s_addeffect* effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); int (*bonus_addeff_onskill) (struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); int (*bonus_item_drop) (struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate); - void (*calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); + void (*calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src, enum gainexp_flags flags); int (*respawn_timer) (int tid, int64 tick, int id, intptr_t data); int (*jobchange_killclone) (struct block_list *bl, va_list ap); int (*getstat) (struct map_session_data* sd, int type); diff --git a/src/map/skill.c b/src/map/skill.c index ec40c201827..122d5ff5e00 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7984,6 +7984,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * break; #ifdef RENEWAL + case BD_RICHMANKIM: case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: @@ -11899,6 +11900,9 @@ static void skill_castend_nodamage_id_sc_song(struct block_list *src, struct blo sd->skill_id_dance = skill_id; sd->skill_lv_dance = skill_lv; + if ((skill->get_inf2(skill_id) & INF2_ENSEMBLE_SKILL) != 0) + skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 1); + clif->skill_nodamage(src, src, skill_id, skill_lv, 1); int splash_range = skill->get_splash(skill_id, skill_lv); @@ -12482,7 +12486,6 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case MA_SHOWER: case SA_LANDPROTECTOR: case BD_LULLABY: - case BD_RICHMANKIM: case BD_ETERNALCHAOS: case BD_DRUMBATTLEFIELD: case BD_RINGNIBELUNGEN: @@ -12491,6 +12494,7 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_SIEGFRIED: case BA_DISSONANCE: #ifndef RENEWAL + case BD_RICHMANKIM: case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: @@ -13552,9 +13556,11 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 case BD_RINGNIBELUNGEN: val1 = (skill_lv+2)*25; //Watk increase break; +#ifndef RENEWAL case BD_RICHMANKIM: - val1 = 25 + 11*skill_lv; //Exp increase bonus. + val1 = 25 + 11 * skill_lv; //Exp increase bonus. break; +#endif case BD_SIEGFRIED: val1 = 55 + skill_lv*5; //Elemental Resistance val2 = skill_lv*10; //Status ailment resistance diff --git a/src/map/status.c b/src/map/status.c index d9793704ef7..1138938a6b2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -7969,6 +7969,10 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl break; #ifdef RENEWAL + case SC_RICHMANKIM: + val1 = 10 + 10 * val1; // EXP increase (%) + break; + case SC_WHISTLE: // val1: Skill Lv val2 = (val1 < 10 ? (18 + val1 * 2) : 40); // Flee Increase @@ -12428,11 +12432,11 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) if (--sce->val3 <= 0) break; switch(sce->val1&0xFFFF){ - case BD_RICHMANKIM: case BD_DRUMBATTLEFIELD: case BD_RINGNIBELUNGEN: case BD_SIEGFRIED: #ifndef RENEWAL + case BD_RICHMANKIM: case BA_DISSONANCE: case BA_ASSASSINCROSS: case DC_UGLYDANCE: diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 82bd2accf37..5a24f3d6c95 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -7434,8 +7434,8 @@ typedef int (*HPMHOOK_pre_pc_bonus_addeff_onskill) (struct s_addeffectonskill ** typedef int (*HPMHOOK_post_pc_bonus_addeff_onskill) (int retVal___, struct s_addeffectonskill *effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); typedef int (*HPMHOOK_pre_pc_bonus_item_drop) (struct s_add_drop **drop, const short *max, int *id, bool *is_group, int *race, int *rate); typedef int (*HPMHOOK_post_pc_bonus_item_drop) (int retVal___, struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate); -typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); -typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); +typedef void (*HPMHOOK_pre_pc_calcexp) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src, enum gainexp_flags *flags); +typedef void (*HPMHOOK_post_pc_calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src, enum gainexp_flags flags); typedef int (*HPMHOOK_pre_pc_respawn_timer) (int *tid, int64 *tick, int *id, intptr_t *data); typedef int (*HPMHOOK_post_pc_respawn_timer) (int retVal___, int tid, int64 tick, int id, intptr_t data); typedef int (*HPMHOOK_pre_pc_jobchange_killclone) (struct block_list **bl, va_list ap); diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index e1abd82996b..0c2890d0939 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -71979,14 +71979,14 @@ int HP_pc_bonus_item_drop(struct s_add_drop *drop, const short max, int id, bool } return retVal___; } -void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src) { +void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src, enum gainexp_flags flags) { int hIndex = 0; if (HPMHooks.count.HP_pc_calcexp_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src); + void (*preHookFunc) (struct map_session_data **sd, uint64 **base_exp, uint64 **job_exp, struct block_list **src, enum gainexp_flags *flags); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_calcexp_pre[hIndex].func; - preHookFunc(&sd, &base_exp, &job_exp, &src); + preHookFunc(&sd, &base_exp, &job_exp, &src, &flags); } if (*HPMforce_return) { *HPMforce_return = false; @@ -71994,13 +71994,13 @@ void HP_pc_calcexp(struct map_session_data *sd, uint64 *base_exp, uint64 *job_ex } } { - HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src); + HPMHooks.source.pc.calcexp(sd, base_exp, job_exp, src, flags); } if (HPMHooks.count.HP_pc_calcexp_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); + void (*postHookFunc) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src, enum gainexp_flags flags); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_calcexp_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_calcexp_post[hIndex].func; - postHookFunc(sd, base_exp, job_exp, src); + postHookFunc(sd, base_exp, job_exp, src, flags); } } return; From 46f4576d42fdaa0bcfe68c72f3a5708d6e47c2b0 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 15:47:19 -0300 Subject: [PATCH 20/30] Rebalance of BD_RINGNIBELUNGEN (Harmonic Lick) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect changed. Now gives a random buff to user and party members: - ASPD +20% - ATK +20% - MATK +20% - MaxHP +30% - MaxSP +30% - All Stats +15 - Hit +50 - Flee +50 - Reduce SP consumption of skills by 30% - Increase HP Recovery by 100% - Increase SP Recovery by 100% - SP Cost changed: - Old: 35 + (SkillLv x 3) - New: 68 - (SkillLv x 4) - 1s casting time added - 0.3s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 9 +++++- db/re/skill_db.conf | 37 ++++++++++----------- src/map/battle.c | 2 -- src/map/skill.c | 8 +++-- src/map/status.c | 76 ++++++++++++++++++++++++++++++++++++++++++-- src/map/status.h | 20 ++++++++++++ 7 files changed, 124 insertions(+), 29 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 82dfa0481cd..24899678690 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4318,6 +4318,7 @@ constants_db: { SI_FORTUNEKISS: 76 SI_SERVICEFORYOU: 77 SI_RICHMANKIM: 78 + SI_RINGNIBELUNGEN: 81 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 92f559d357a..6d522909a37 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5669,10 +5669,17 @@ SC_DRUMBATTLE: { Skill: "BD_DRUMBATTLEFIELD" } SC_NIBELUNGEN: { + Visible: true + Flags: { + Buff: true + NoMadoReset: true + NoMagicBlocked: true + } CalcFlags: { - Watk: true + All: true } Skill: "BD_RINGNIBELUNGEN" + Icon: "SI_RINGNIBELUNGEN" } SC_INTOABYSS: { Skill: "BD_INTOABYSS" diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 291d87bb5d9..e47b9d75c2d 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9560,37 +9560,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: -1 + SkillData1: 60_000 // SC_NIBELUNGEN duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 300 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 38 - Lv2: 41 - Lv3: 44 - Lv4: 47 - Lv5: 50 - Lv6: 53 - Lv7: 56 - Lv8: 59 - Lv9: 62 - Lv10: 65 + Lv1: 64 + Lv2: 60 + Lv3: 56 + Lv4: 52 + Lv5: 48 + Lv6: 44 + Lv7: 40 + Lv8: 36 + Lv9: 32 + Lv10: 28 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa2 - Layout: 4 - Interval: -1 - Target: "Party" - Flag: { - UF_ENSEMBLE: true - } - } }, { Id: 311 diff --git a/src/map/battle.c b/src/map/battle.c index b4f6082ee7d..a0e7198b17d 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -885,8 +885,6 @@ static int64 battle_calc_masteryfix(struct block_list *src, struct block_list *t if(sc->data[SC_CAMOUFLAGE]) damage += 30 * ( 10 - sc->data[SC_CAMOUFLAGE]->val4 ); #ifdef RENEWAL - if(sc->data[SC_NIBELUNGEN] && weapon) - damage += sc->data[SC_NIBELUNGEN]->val2; if(sc->data[SC_DRUMBATTLE]){ if(tstatus->size == SZ_SMALL) damage += sc->data[SC_DRUMBATTLE]->val2; diff --git a/src/map/skill.c b/src/map/skill.c index 122d5ff5e00..be7817c9ef2 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7985,6 +7985,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * #ifdef RENEWAL case BD_RICHMANKIM: + case BD_RINGNIBELUNGEN: case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: @@ -12488,13 +12489,13 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_LULLABY: case BD_ETERNALCHAOS: case BD_DRUMBATTLEFIELD: - case BD_RINGNIBELUNGEN: case BD_ROKISWEIL: case BD_INTOABYSS: case BD_SIEGFRIED: case BA_DISSONANCE: #ifndef RENEWAL case BD_RICHMANKIM: + case BD_RINGNIBELUNGEN: case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: @@ -13553,10 +13554,11 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val2 = (skill_lv+1)*2; //Def increase #endif break; +#ifndef RENEWAL case BD_RINGNIBELUNGEN: - val1 = (skill_lv+2)*25; //Watk increase + val1 = (skill_lv + 2) * 25; // Watk increase break; -#ifndef RENEWAL + case BD_RICHMANKIM: val1 = 25 + 11 * skill_lv; //Exp increase bonus. break; diff --git a/src/map/status.c b/src/map/status.c index 1138938a6b2..e832b557264 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2187,6 +2187,11 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o if(sc->data[SC_ATKER_BLOOD]) sd->dsprate -= sc->data[SC_ATKER_BLOOD]->val1; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_SP_CONSUMPTION) + sd->dsprate -= 30; +#endif + //Underflow protections. if(sd->dsprate < 0) sd->dsprate = 0; @@ -2908,6 +2913,13 @@ static void status_calc_regen_rate_pc(struct map_session_data *sd, struct regen_ regen->rate.hp *= 3; regen->skill->rate.hp *= 3; } + +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_HP_RECOVERY) + regen->rate.hp += 100; + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_SP_RECOVERY) + regen->rate.sp += 100; +#endif } static void status_calc_regen_rate_elemental(struct elemental_data *md, struct regen_data *regen) @@ -4032,6 +4044,11 @@ static unsigned short status_calc_str(struct block_list *bl, struct status_chang if (sc->data[SC_UNIVERSESTANCE] != NULL) str += sc->data[SC_UNIVERSESTANCE]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ALLSTATS) + str += 15; +#endif + return (unsigned short)cap_value(str,0,USHRT_MAX); } @@ -4097,6 +4114,11 @@ static unsigned short status_calc_agi(struct block_list *bl, struct status_chang if (sc->data[SC_UNIVERSESTANCE] != NULL) agi += sc->data[SC_UNIVERSESTANCE]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ALLSTATS) + agi += 15; +#endif + return (unsigned short)cap_value(agi,0,USHRT_MAX); } @@ -4150,6 +4172,11 @@ static unsigned short status_calc_vit(struct block_list *bl, struct status_chang if (sc->data[SC_UNIVERSESTANCE] != NULL) vit += sc->data[SC_UNIVERSESTANCE]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ALLSTATS) + vit += 15; +#endif + return (unsigned short)cap_value(vit,0,USHRT_MAX); } @@ -4219,6 +4246,11 @@ static unsigned short status_calc_int(struct block_list *bl, struct status_chang if (sc->data[SC_UNIVERSESTANCE] != NULL) int_ += sc->data[SC_UNIVERSESTANCE]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ALLSTATS) + int_ += 15; +#endif + return (unsigned short)cap_value(int_,0,USHRT_MAX); } @@ -4284,6 +4316,11 @@ static unsigned short status_calc_dex(struct block_list *bl, struct status_chang if (sc->data[SC_UNIVERSESTANCE] != NULL) dex += sc->data[SC_UNIVERSESTANCE]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ALLSTATS) + dex += 15; +#endif + return (unsigned short)cap_value(dex,0,USHRT_MAX); } @@ -4341,6 +4378,11 @@ static unsigned short status_calc_luk(struct block_list *bl, struct status_chang if (sc->data[SC_UNIVERSESTANCE] != NULL) luk += sc->data[SC_UNIVERSESTANCE]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ALLSTATS) + luk += 15; +#endif + return (unsigned short)cap_value(luk, 0, USHRT_MAX); } @@ -4583,6 +4625,11 @@ static int status_calc_batk(struct block_list *bl, struct status_change *sc, int if (sc->data[SC_SUNSTANCE] != NULL) batk += batk * sc->data[SC_SUNSTANCE]->val2 / 100; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ATK) + batk += batk * 20/100; +#endif + return cap_value(batk, battle_config.batk_min, battle_config.batk_max); } @@ -4698,6 +4745,11 @@ static int status_calc_watk(struct block_list *bl, struct status_change *sc, int if (sc->data[SC_SOULFALCON] != NULL) watk += sc->data[SC_SOULFALCON]->val2; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == SC_INCATKRATE) + watk += watk * 20/100; +#endif + return cap_value(watk, battle_config.watk_min, battle_config.watk_max); } @@ -4774,6 +4826,8 @@ static int status_calc_matk(struct block_list *bl, struct status_change *sc, int // FIXME: This (and SC_IMPOSITIO) should have their effects shown in status window. if (sc->data[SC_VOLCANO] != NULL) matk += sc->data[SC_VOLCANO]->val2; + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_MATK) + matk += matk * 20/100; #endif if (sc->data[SC_ZANGETSU]) matk += sc->data[SC_ZANGETSU]->val3; @@ -4923,6 +4977,8 @@ static int status_calc_hit(struct block_list *bl, struct status_change *sc, int hit += 2 * sc->data[SC_TWOHANDQUICKEN]->val1; if (sc->data[SC_ADRENALINE] != NULL) hit += sc->data[SC_ADRENALINE]->val4; + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_HIT) + hit += 50; #endif return cap_value(hit, battle_config.hit_min, battle_config.hit_max); @@ -4982,6 +5038,8 @@ static int status_calc_flee(struct block_list *bl, struct status_change *sc, int #ifdef RENEWAL if (sc->data[SC_SPEARQUICKEN]) flee += sc->data[SC_SPEARQUICKEN]->val1 * 2; + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_FLEE) + flee += 50; #endif if (sc->data[SC_INCFLEERATE]) flee += flee * sc->data[SC_INCFLEERATE]->val1 / 100; @@ -5657,6 +5715,8 @@ static short status_calc_aspd(struct block_list *bl, struct status_change *sc, s bonus += 10; if (sc->data[SC_SPEARQUICKEN] != NULL) bonus += 10; + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_ASPD) + bonus += 20; #endif } @@ -5936,6 +5996,8 @@ static unsigned int status_calc_maxhp(struct block_list *bl, struct status_chang #ifdef RENEWAL if (sc->data[SC_ANGELUS] != NULL) maxhp += sc->data[SC_ANGELUS]->val3; + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_MAXHP) + maxhp += maxhp * 30 / 100; #endif return (unsigned int)cap_value(maxhp, 1, UINT_MAX); @@ -5977,6 +6039,11 @@ static unsigned int status_calc_maxsp(struct block_list *bl, struct status_chang if (sc->data[SC_GM_BATTLE2]) maxsp -= maxsp * sc->data[SC_GM_BATTLE2]->val1 / 100; +#ifdef RENEWAL + if (sc->data[SC_NIBELUNGEN] != NULL && sc->data[SC_NIBELUNGEN]->val2 == RINGNBL_EFF_MAXSP) + maxsp += maxsp * 30 / 100; +#endif + return cap_value(maxsp, 1, UINT_MAX); } @@ -7910,7 +7977,7 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl case SC_VOLCANO: #ifndef RENEWAL val2 = val1 * 10; // Watk increase - + if (st->def_ele != ELE_FIRE) val2 = 0; #else @@ -7973,6 +8040,11 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val1 = 10 + 10 * val1; // EXP increase (%) break; + case SC_NIBELUNGEN: + // val1 = skill lv + val2 = rnd() % RINGNBL_EFF_MAX; + break; + case SC_WHISTLE: // val1: Skill Lv val2 = (val1 < 10 ? (18 + val1 * 2) : 40); // Flee Increase @@ -12433,10 +12505,10 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) break; switch(sce->val1&0xFFFF){ case BD_DRUMBATTLEFIELD: - case BD_RINGNIBELUNGEN: case BD_SIEGFRIED: #ifndef RENEWAL case BD_RICHMANKIM: + case BD_RINGNIBELUNGEN: case BA_DISSONANCE: case BA_ASSASSINCROSS: case DC_UGLYDANCE: diff --git a/src/map/status.h b/src/map/status.h index bcaa1bd8447..a946568d03a 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -1124,6 +1124,26 @@ enum e_status_calc_opt { SCO_FORCE = 0x2, /* only relevant to BL_PC types, ensures call bypasses the queue caused by delayed damage */ }; +/** + * Possible bonuses given by Ring Nimbelung (Harmonic Lick) in RE + * (SC_NIBELUNGEN val2) + */ +enum e_ringnibelungen_effect { + RINGNBL_EFF_ASPD = 0, //< Increases attack speed (reduces delay after attack by 20%) + RINGNBL_EFF_ATK, //< Atk + 20% + RINGNBL_EFF_MATK, //< Matk + 20% + RINGNBL_EFF_MAXHP, //< MaxHP + 30% + RINGNBL_EFF_MAXSP, //< MaxSP + 30% + RINGNBL_EFF_ALLSTATS, //< All Stat + 15 + RINGNBL_EFF_HIT, //< Hit + 50 + RINGNBL_EFF_FLEE, //< Flee + 50 + RINGNBL_EFF_SP_CONSUMPTION, //< Reduces SP consumption of skills by 30% + RINGNBL_EFF_HP_RECOVERY, //< Increases HP recovery by 100% + RINGNBL_EFF_SP_RECOVERY, //< Increases SP recovery by 100% + // Must always be the last one + RINGNBL_EFF_MAX, +}; + //Define to determine who gets HP/SP consumed on doing skills/etc. [Skotlex] #define BL_CONSUME (BL_PC|BL_HOM|BL_MER|BL_ELEM) //Define to determine who has regen From 83c98c716b00da6316af2745a2ab96ab75923975 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 16:02:55 -0300 Subject: [PATCH 21/30] Rebalance of BD_SIEGFRIED (Acoustic Rhythm) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - Old: - Elemental Resistance: (30 + SkillLv x 10)% - Status Effect Resistance: (SkillLv x 10)% - New: - Elemental Resistance: (SkillLv x 3)% - Status Effect Resistance: (SkillLv x 5)% - SP Cost changed: - Old: 20 on all skill levels - New: 36 + (SkillLv x 4) - 1s casting time added - 0.3s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 7 +++++++ db/re/skill_db.conf | 27 +++++++++++++++------------ src/map/skill.c | 10 ++++++---- src/map/status.c | 8 +++++++- 5 files changed, 36 insertions(+), 17 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 24899678690..8da4e2b74a8 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4319,6 +4319,7 @@ constants_db: { SI_SERVICEFORYOU: 77 SI_RICHMANKIM: 78 SI_RINGNIBELUNGEN: 81 + SI_SIEGFRIED: 84 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 SI_EXTREMITYFIST: 88 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 6d522909a37..515fb49de92 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5685,10 +5685,17 @@ SC_INTOABYSS: { Skill: "BD_INTOABYSS" } SC_SIEGFRIED: { + Visible: true + Flags: { + Buff: true + NoMadoReset: true + NoMagicBlocked: true + } CalcFlags: { All: true } Skill: "BD_SIEGFRIED" + Icon: "SI_SIEGFRIED" } SC_MODECHANGE: { CalcFlags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index e47b9d75c2d..ee748d8268f 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9678,26 +9678,29 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: -1 + SkillData1: 60_000 // SC_SIEGFRIED duration (in miliseconds) FixedCastTime: 0 Requirements: { - SPCost: 20 + SPCost: { + Lv1: 40 + Lv2: 44 + Lv3: 48 + Lv4: 52 + Lv5: 56 + Lv6: 60 + Lv7: 64 + Lv8: 68 + Lv9: 72 + Lv10: 76 + } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa5 - Layout: 4 - Interval: -1 - Target: "Party" - Flag: { - UF_ENSEMBLE: true - } - } }, { Id: 315 diff --git a/src/map/skill.c b/src/map/skill.c index be7817c9ef2..4143508f9fc 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7986,6 +7986,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * #ifdef RENEWAL case BD_RICHMANKIM: case BD_RINGNIBELUNGEN: + case BD_SIEGFRIED: case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: @@ -12491,11 +12492,11 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_DRUMBATTLEFIELD: case BD_ROKISWEIL: case BD_INTOABYSS: - case BD_SIEGFRIED: case BA_DISSONANCE: #ifndef RENEWAL case BD_RICHMANKIM: case BD_RINGNIBELUNGEN: + case BD_SIEGFRIED: case BA_WHISTLE: case BA_ASSASSINCROSS: case BA_POEMBRAGI: @@ -13562,11 +13563,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 case BD_RICHMANKIM: val1 = 25 + 11 * skill_lv; //Exp increase bonus. break; -#endif + case BD_SIEGFRIED: - val1 = 55 + skill_lv*5; //Elemental Resistance - val2 = skill_lv*10; //Status ailment resistance + val1 = 55 + skill_lv * 5; // Elemental Resistance + val2 = skill_lv * 10; // Status ailment resistance break; +#endif case WE_CALLPARTNER: if (sd) val1 = sd->status.partner_id; break; diff --git a/src/map/status.c b/src/map/status.c index e832b557264..a7a1fffc00e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8045,6 +8045,12 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val2 = rnd() % RINGNBL_EFF_MAX; break; + case SC_SIEGFRIED: + // - val1: Skill Lv + val2 = val1 * 3; // Elemental Resistance + val3 = val1 * 5; // Status ailment resistance + break; + case SC_WHISTLE: // val1: Skill Lv val2 = (val1 < 10 ? (18 + val1 * 2) : 40); // Flee Increase @@ -12505,8 +12511,8 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) break; switch(sce->val1&0xFFFF){ case BD_DRUMBATTLEFIELD: - case BD_SIEGFRIED: #ifndef RENEWAL + case BD_SIEGFRIED: case BD_RICHMANKIM: case BD_RINGNIBELUNGEN: case BA_DISSONANCE: From 1b1b837bc1330278083633b43a1d0a5c985e48fc Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 16:09:06 -0300 Subject: [PATCH 22/30] Rebalance of BD_INTOABYSS (Power Chord) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - SP Cost increased: 10 -> 70 - 1s casting time added - 0.3s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 7 +++++++ db/re/skill_db.conf | 20 +++++++------------- src/map/skill.c | 3 ++- src/map/status.c | 2 +- 5 files changed, 18 insertions(+), 15 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 8da4e2b74a8..270b58433a6 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4319,6 +4319,7 @@ constants_db: { SI_SERVICEFORYOU: 77 SI_RICHMANKIM: 78 SI_RINGNIBELUNGEN: 81 + SI_INTOABYSS: 83 SI_SIEGFRIED: 84 SI_EXPLOSIONSPIRITS: 86 SI_STEELBODY: 87 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 515fb49de92..8736bb4caf8 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5682,7 +5682,14 @@ SC_NIBELUNGEN: { Icon: "SI_RINGNIBELUNGEN" } SC_INTOABYSS: { + Visible: true + Flags: { + Buff: true + NoMadoReset: true + NoMagicBlocked: true + } Skill: "BD_INTOABYSS" + Icon: "SI_INTOABYSS" } SC_SIEGFRIED: { Visible: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index ee748d8268f..c5180e668ca 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9640,27 +9640,21 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: -1 + SkillData1: 60_000 // SC_INTOABYSS duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 300 + CoolDown: 20_000 Requirements: { - SPCost: 10 + SPCost: 70 WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa4 - Layout: 4 - Interval: -1 - Target: "Party" - Flag: { - UF_NOMOB: true - UF_ENSEMBLE: true - } - } }, { Id: 313 diff --git a/src/map/skill.c b/src/map/skill.c index 4143508f9fc..b8763c25df6 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7986,6 +7986,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * #ifdef RENEWAL case BD_RICHMANKIM: case BD_RINGNIBELUNGEN: + case BD_INTOABYSS: case BD_SIEGFRIED: case BA_WHISTLE: case BA_ASSASSINCROSS: @@ -12491,11 +12492,11 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case BD_ETERNALCHAOS: case BD_DRUMBATTLEFIELD: case BD_ROKISWEIL: - case BD_INTOABYSS: case BA_DISSONANCE: #ifndef RENEWAL case BD_RICHMANKIM: case BD_RINGNIBELUNGEN: + case BD_INTOABYSS: case BD_SIEGFRIED: case BA_WHISTLE: case BA_ASSASSINCROSS: diff --git a/src/map/status.c b/src/map/status.c index a7a1fffc00e..0b7a950d131 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -12530,8 +12530,8 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) s = 4; break; case CG_HERMODE: - case BD_INTOABYSS: #ifndef RENEWAL + case BD_INTOABYSS: case DC_HUMMING: case BA_WHISTLE: case BA_POEMBRAGI: From d883aa59e2ab4a20fa581804c6ebd4b7bdcbe376 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 16:23:45 -0300 Subject: [PATCH 23/30] Rebalance of BD_ETERNALCHAOS (Down Tempo) Skill reworked: - It now casts a single AoE effect in a 9x9 area - It no longer uses ground units nor keeps the "performance running" - SP Cost increased: 30 -> 120 - 1s casting time added - 0.3s global delay added - 60s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/map_zone_db.conf | 2 ++ db/re/sc_config.conf | 8 ++++++++ db/re/skill_db.conf | 19 +++++++------------ src/map/skill.c | 3 ++- src/map/status.c | 7 ++++++- 6 files changed, 26 insertions(+), 14 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 270b58433a6..f9d1ab9fdb8 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4318,6 +4318,7 @@ constants_db: { SI_FORTUNEKISS: 76 SI_SERVICEFORYOU: 77 SI_RICHMANKIM: 78 + SI_ETERNALCHAOS: 79 SI_RINGNIBELUNGEN: 81 SI_INTOABYSS: 83 SI_SIEGFRIED: 84 diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index a91b4590def..3b3c8bfe15b 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -119,6 +119,7 @@ zones: ( BA_DISSONANCE: "PLAYER" DC_UGLYDANCE: "PLAYER" DC_DONTFORGETME: "PLAYER" + BD_ETERNALCHAOS: "PLAYER" } disabled_items: { @@ -520,6 +521,7 @@ zones: ( BA_DISSONANCE: "PLAYER" DC_UGLYDANCE: "PLAYER" DC_DONTFORGETME: "PLAYER" + BD_ETERNALCHAOS: "PLAYER" } disabled_items: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 8736bb4caf8..78f7d5fc5fa 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5656,10 +5656,18 @@ SC_HERMODE: { Skill: "CG_HERMODE" } SC_ETERNALCHAOS: { + Visible: true + Flags: { + Debuff: true + NoMadoReset: true + NoMagicBlocked: true + } CalcFlags: { + Def: true Def2: true } Skill: "BD_ETERNALCHAOS" + Icon: "SI_ETERNALCHAOS" } SC_DRUMBATTLE: { CalcFlags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index c5180e668ca..4064b3096d9 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9475,26 +9475,21 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: 4 + SkillData1: 60_000 // SC_ETERNALCHAOS duration (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 300 + CoolDown: 60_000 Requirements: { - SPCost: 30 + SPCost: 120 WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa0 - Layout: 4 - Interval: -1 - Target: "Enemy" - Flag: { - UF_ENSEMBLE: true - } - } }, { Id: 309 diff --git a/src/map/skill.c b/src/map/skill.c index b8763c25df6..ba4dd19c035 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7998,6 +7998,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; + case BD_ETERNALCHAOS: case DC_DONTFORGETME: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_ENEMY); break; @@ -12489,12 +12490,12 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case MA_SHOWER: case SA_LANDPROTECTOR: case BD_LULLABY: - case BD_ETERNALCHAOS: case BD_DRUMBATTLEFIELD: case BD_ROKISWEIL: case BA_DISSONANCE: #ifndef RENEWAL case BD_RICHMANKIM: + case BD_ETERNALCHAOS: case BD_RINGNIBELUNGEN: case BD_INTOABYSS: case BD_SIEGFRIED: diff --git a/src/map/status.c b/src/map/status.c index 0b7a950d131..37633431431 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5129,6 +5129,11 @@ static defType status_calc_def(struct block_list *bl, struct status_change *sc, return (defType)cap_value(def,DEFTYPE_MIN,DEFTYPE_MAX); } +#ifdef RENEWAL + if (sc->data[SC_ETERNALCHAOS] != NULL) + return 0; +#endif + if (sc->data[SC_BERSERK]) return 0; if (sc->data[SC_SKA]) @@ -12522,9 +12527,9 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) s = 3; break; case BD_LULLABY: - case BD_ETERNALCHAOS: case BD_ROKISWEIL: #ifndef RENEWAL + case BD_ETERNALCHAOS: case DC_FORTUNEKISS: #endif s = 4; From 49968fe3e03e7b7e1ce6994e3edc57e9bb06951d Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 14 Jan 2024 15:37:39 -0300 Subject: [PATCH 24/30] Rebalance of BD_ROKISWEIL (Classical Pluck) Skill reworked: - It is now a single AoE effect - It no longer keeps the "performance running" - Effect changed: Inflicts confusion and blocks use of skill in all entities (Except performers) - Can only be used in PvP areas - 0.3s of global delay added - 1s casting time added - 20s of cooldown added - SP cost increased: 15 -> 180 - Area of Effect increased: 7x7 -> 9x9 From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/map_zone_db.conf | 2 ++ db/re/sc_config.conf | 5 +++++ db/re/skill_db.conf | 19 +++++++------------ src/map/skill.c | 3 ++- src/map/status.c | 15 +++++++++++++-- 6 files changed, 30 insertions(+), 15 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index f9d1ab9fdb8..2f0af8f471a 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4320,6 +4320,7 @@ constants_db: { SI_RICHMANKIM: 78 SI_ETERNALCHAOS: 79 SI_RINGNIBELUNGEN: 81 + SI_ROKISWEIL: 82 SI_INTOABYSS: 83 SI_SIEGFRIED: 84 SI_EXPLOSIONSPIRITS: 86 diff --git a/db/re/map_zone_db.conf b/db/re/map_zone_db.conf index 3b3c8bfe15b..ea3723ef8e2 100644 --- a/db/re/map_zone_db.conf +++ b/db/re/map_zone_db.conf @@ -120,6 +120,7 @@ zones: ( DC_UGLYDANCE: "PLAYER" DC_DONTFORGETME: "PLAYER" BD_ETERNALCHAOS: "PLAYER" + BD_ROKISWEIL: "PLAYER" } disabled_items: { @@ -522,6 +523,7 @@ zones: ( DC_UGLYDANCE: "PLAYER" DC_DONTFORGETME: "PLAYER" BD_ETERNALCHAOS: "PLAYER" + BD_ROKISWEIL: "PLAYER" } disabled_items: { diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 78f7d5fc5fa..751117900ba 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5436,10 +5436,15 @@ SC_RICHMANKIM: { Icon: "SI_RICHMANKIM" } SC_ROKISWEIL: { + Visible: true Flags: { + Debuff: true + NoMadoReset: true NoBoss: true + NoMagicBlocked: true } Skill: "BD_ROKISWEIL" + Icon: "SI_ROKISWEIL" } SC_BURNING: { Flags: { diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 4064b3096d9..aefd9d37d9d 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9598,26 +9598,21 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: 4 + SkillData1: 30_000 // Duration of SC_ROKISWEIL (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 300 + CoolDown: 20_000 Requirements: { - SPCost: 15 + SPCost: 180 WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa3 - Layout: 4 - Interval: -1 - Target: "All" - Flag: { - UF_ENSEMBLE: true - } - } }, { Id: 312 diff --git a/src/map/skill.c b/src/map/skill.c index ba4dd19c035..744a2727842 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7999,6 +7999,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * break; case BD_ETERNALCHAOS: + case BD_ROKISWEIL: case DC_DONTFORGETME: skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_ENEMY); break; @@ -12491,12 +12492,12 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case SA_LANDPROTECTOR: case BD_LULLABY: case BD_DRUMBATTLEFIELD: - case BD_ROKISWEIL: case BA_DISSONANCE: #ifndef RENEWAL case BD_RICHMANKIM: case BD_ETERNALCHAOS: case BD_RINGNIBELUNGEN: + case BD_ROKISWEIL: case BD_INTOABYSS: case BD_SIEGFRIED: case BA_WHISTLE: diff --git a/src/map/status.c b/src/map/status.c index 37633431431..17995fe86ae 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -953,7 +953,11 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ //Skill blocking. if ( (sc->data[SC_VOLCANO] && skill_id == WZ_ICEWALL) || - (sc->data[SC_ROKISWEIL] && skill_id != BD_ADAPTATION) || +#ifndef RENEWAL + (sc->data[SC_ROKISWEIL] != NULL && skill_id != BD_ADAPTATION) || +#else + sc->data[SC_ROKISWEIL] != NULL || +#endif (sc->data[SC_HERMODE] && skill->get_inf(skill_id) & INF_SUPPORT_SKILL) || pc_ismuted(sc, MANNER_NOSKILL) ) @@ -8050,6 +8054,13 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val2 = rnd() % RINGNBL_EFF_MAX; break; + case SC_ROKISWEIL: + // val1 = skill lv + // TODO: needs more info. It is correct to cause confusion Health State, + // but I am not 100% sure about rate and time + sc_start(src, bl, SC_CONFUSION, 100, 1, 20000, skill_id); + break; + case SC_SIEGFRIED: // - val1: Skill Lv val2 = val1 * 3; // Elemental Resistance @@ -12527,8 +12538,8 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) s = 3; break; case BD_LULLABY: - case BD_ROKISWEIL: #ifndef RENEWAL + case BD_ROKISWEIL: case BD_ETERNALCHAOS: case DC_FORTUNEKISS: #endif From 0e77504c96956567a7bac3f1f04ca4b9a46f7f8e Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 16:35:38 -0300 Subject: [PATCH 25/30] Rebalance of BD_LULLABY (Lullaby) Skill reworked: - It is now a single AoE effect - It no longer keeps the "performance running" - Effect changed: - Inflicts sleep in enemies around user - INT no longer affects the chance - 0.3s of global delay added - 1s casting time added - 20s of cooldown added - SP cost increased: 20 -> 40 - Area of Effect increased: 7x7 -> 9x9 From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/re/skill_db.conf | 20 ++++++++------------ src/map/skill.c | 11 ++++++++--- src/map/status.c | 4 ++-- 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index aefd9d37d9d..2999c17a6b8 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9395,6 +9395,7 @@ skill_db: ( Id: 306 Name: "BD_LULLABY" Description: "Lullaby" + StatusChange: "SC_SLEEP" MaxLevel: 1 Hit: "BDT_SKILL" SkillType: { @@ -9406,26 +9407,21 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 15000 + SplashRange: 4 + SkillData1: 15_000 // SC_SLEEP duration (in miliseconds) + CastTime: 1_000 FixedCastTime: 0 + CoolDown: 20_000 + AfterCastActDelay: 300 Requirements: { - SPCost: 20 + SPCost: 40 WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0x9e - Layout: 4 - Interval: 6000 - Target: "Enemy" - Flag: { - UF_ENSEMBLE: true - } - } }, { Id: 307 diff --git a/src/map/skill.c b/src/map/skill.c index 744a2727842..8a8d6f89dba 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -1864,11 +1864,11 @@ static int skill_additional_effect(struct block_list *src, struct block_list *bl sc_start(src, bl, SC_STUN, (25 + 5 * skill_lv), skill_lv, skill->get_time2(skill_id, skill_lv), skill_id); break; +#ifndef RENEWAL case BD_LULLABY: sc_start(src, bl, SC_SLEEP, 15, skill_lv, skill->get_time2(skill_id, skill_lv), skill_id); break; -#ifndef RENEWAL case DC_UGLYDANCE: rate = 5+5*skill_lv; @@ -7998,6 +7998,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * skill->castend_nodamage_id_sc_song(src, bl, skill_id, skill_lv, tick, flag | BCT_PARTY); break; + case BD_LULLABY: case BD_ETERNALCHAOS: case BD_ROKISWEIL: case DC_DONTFORGETME: @@ -11918,8 +11919,12 @@ static void skill_castend_nodamage_id_sc_song(struct block_list *src, struct blo else map->foreachinrange(skill->area_sub, src, splash_range, BL_CHAR, src, skill_id, skill_lv, tick, flags, skill->castend_nodamage_id); } else { + int chance = 100; + if (skill_id == BD_LULLABY) + chance = 15; // @TODO: Did chance of sleep changed in RE rebalance? + enum sc_type sc = skill->get_sc_type(skill_id); - sc_start(src, bl, sc, 100, skill_lv, skill->get_time(skill_id, skill_lv), skill_id); + sc_start(src, bl, sc, chance, skill_lv, skill->get_time(skill_id, skill_lv), skill_id); } #endif } @@ -12490,10 +12495,10 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case AC_SHOWER: //Ground-placed skill implementation. case MA_SHOWER: case SA_LANDPROTECTOR: - case BD_LULLABY: case BD_DRUMBATTLEFIELD: case BA_DISSONANCE: #ifndef RENEWAL + case BD_LULLABY: case BD_RICHMANKIM: case BD_ETERNALCHAOS: case BD_RINGNIBELUNGEN: diff --git a/src/map/status.c b/src/map/status.c index 17995fe86ae..797a321157b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -12537,14 +12537,14 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) #endif s = 3; break; - case BD_LULLABY: #ifndef RENEWAL + case BD_LULLABY: case BD_ROKISWEIL: case BD_ETERNALCHAOS: case DC_FORTUNEKISS: -#endif s = 4; break; +#endif case CG_HERMODE: #ifndef RENEWAL case BD_INTOABYSS: From ccc9a0f3cbedf78a40b112341000d600da166644 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 16:45:29 -0300 Subject: [PATCH 26/30] Rebalance of BD_DRUMBATTLEFIELD (Battle Theme) Skill reworked: - It is now a screen-wide skill (31x31) that gives the SC to all party members - It no longer uses ground units nor keeps the "performance running" - Effect formula changed: - Old: - Damage Boost: 125 + (SkillLv x 25) (depending on size) - DEF Boost: SkillLv x 10 - New: - ATK Boost: 15 + (SkillLv x 5) (ATK2 / I am making it as BATK / equip atk) - DEF Boost: SkillLv x 15 - SP Cost increased: - Old: 35 + (SkillLv x 3) - New: 46 + (SkillLv x 4) - 1s casting time added - 0.3s global delay added - 20s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 1 + db/re/sc_config.conf | 9 ++++++++- db/re/skill_db.conf | 37 ++++++++++++++++--------------------- src/map/battle.c | 7 ------- src/map/skill.c | 16 ++++++---------- src/map/status.c | 12 +++++++++--- 6 files changed, 40 insertions(+), 42 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 2f0af8f471a..83882282687 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -4319,6 +4319,7 @@ constants_db: { SI_SERVICEFORYOU: 77 SI_RICHMANKIM: 78 SI_ETERNALCHAOS: 79 + SI_DRUMBATTLEFIELD: 80 SI_RINGNIBELUNGEN: 81 SI_ROKISWEIL: 82 SI_INTOABYSS: 83 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 751117900ba..59583368c9b 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -5675,11 +5675,18 @@ SC_ETERNALCHAOS: { Icon: "SI_ETERNALCHAOS" } SC_DRUMBATTLE: { + Visible: true + Flags: { + Buff: true + NoMadoReset: true + NoMagicBlocked: true + } CalcFlags: { - Watk: true + Batk: true Def: true } Skill: "BD_DRUMBATTLEFIELD" + Icon: "SI_DRUMBATTLEFIELD" } SC_NIBELUNGEN: { Visible: true diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 2999c17a6b8..7a8cb227c08 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9503,37 +9503,32 @@ skill_db: ( AttackType: "Misc" DamageType: { NoDamage: true + SplashArea: true } - SkillData1: 60000 - SkillData2: 60000 + SplashRange: -1 + SkillData1: 60_000 // Duration of SC_DRUMBATTLE (in miliseconds) FixedCastTime: 0 + CastTime: 1_000 + AfterCastActDelay: 300 + CoolDown: 20_000 Requirements: { SPCost: { - Lv1: 38 - Lv2: 41 - Lv3: 44 - Lv4: 47 - Lv5: 50 - Lv6: 53 - Lv7: 56 - Lv8: 59 - Lv9: 62 - Lv10: 65 + Lv1: 50 + Lv2: 54 + Lv3: 58 + Lv4: 62 + Lv5: 66 + Lv6: 70 + Lv7: 74 + Lv8: 78 + Lv9: 82 + Lv10: 86 } WeaponTypes: { Instruments: true Whips: true } } - Unit: { - Id: 0xa1 - Layout: 4 - Interval: -1 - Target: "Party" - Flag: { - UF_ENSEMBLE: true - } - } }, { Id: 310 diff --git a/src/map/battle.c b/src/map/battle.c index a0e7198b17d..31844ee5779 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -885,13 +885,6 @@ static int64 battle_calc_masteryfix(struct block_list *src, struct block_list *t if(sc->data[SC_CAMOUFLAGE]) damage += 30 * ( 10 - sc->data[SC_CAMOUFLAGE]->val4 ); #ifdef RENEWAL - if(sc->data[SC_DRUMBATTLE]){ - if(tstatus->size == SZ_SMALL) - damage += sc->data[SC_DRUMBATTLE]->val2; - else if(tstatus->size == SZ_MEDIUM) - damage += 10 * sc->data[SC_DRUMBATTLE]->val1; - //else no bonus for large target - } if(sc->data[SC_GS_MADNESSCANCEL]) damage += 100; if(sc->data[SC_GS_GATLINGFEVER]){ diff --git a/src/map/skill.c b/src/map/skill.c index 8a8d6f89dba..4fc7950567f 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7985,6 +7985,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * #ifdef RENEWAL case BD_RICHMANKIM: + case BD_DRUMBATTLEFIELD: case BD_RINGNIBELUNGEN: case BD_INTOABYSS: case BD_SIEGFRIED: @@ -12495,12 +12496,12 @@ static int skill_castend_pos2(struct block_list *src, int x, int y, uint16 skill case AC_SHOWER: //Ground-placed skill implementation. case MA_SHOWER: case SA_LANDPROTECTOR: - case BD_DRUMBATTLEFIELD: case BA_DISSONANCE: #ifndef RENEWAL case BD_LULLABY: case BD_RICHMANKIM: case BD_ETERNALCHAOS: + case BD_DRUMBATTLEFIELD: case BD_RINGNIBELUNGEN: case BD_ROKISWEIL: case BD_INTOABYSS: @@ -13553,17 +13554,12 @@ static struct skill_unit_group *skill_unitsetting(struct block_list *src, uint16 val1 *= 10; //Because every 10 crit is an actual cri point. break; -#endif + case BD_DRUMBATTLEFIELD: - #ifdef RENEWAL - val1 = (skill_lv+5)*25; //Watk increase - val2 = skill_lv*10; //Def increase - #else - val1 = (skill_lv+1)*25; //Watk increase - val2 = (skill_lv+1)*2; //Def increase - #endif + val1 = (skill_lv + 1) * 25; // Watk increase + val2 = (skill_lv + 1) * 2; // Def increase break; -#ifndef RENEWAL + case BD_RINGNIBELUNGEN: val1 = (skill_lv + 2) * 25; // Watk increase break; diff --git a/src/map/status.c b/src/map/status.c index 797a321157b..da0acd31a1b 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -4664,6 +4664,8 @@ static int status_calc_buff_extra_batk(struct block_list *bl, struct status_chan batk += sc->data[SC_SHOUT]->val2; if (sc->data[SC_IMPOSITIO] != NULL) batk += sc->data[SC_IMPOSITIO]->val2; + if (sc->data[SC_DRUMBATTLE] != NULL) + batk += sc->data[SC_DRUMBATTLE]->val2; #endif return cap_value(batk, 0, battle_config.batk_max); @@ -8049,6 +8051,12 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val1 = 10 + 10 * val1; // EXP increase (%) break; + case SC_DRUMBATTLE: + // - val1: Skill Lv + val2 = 15 + val1 * 5; // ATK increase + val3 = val1 * 15; // Def increase + break; + case SC_NIBELUNGEN: // val1 = skill lv val2 = rnd() % RINGNBL_EFF_MAX; @@ -12526,18 +12534,16 @@ static int status_change_timer(int tid, int64 tick, int id, intptr_t data) if (--sce->val3 <= 0) break; switch(sce->val1&0xFFFF){ - case BD_DRUMBATTLEFIELD: #ifndef RENEWAL + case BD_DRUMBATTLEFIELD: case BD_SIEGFRIED: case BD_RICHMANKIM: case BD_RINGNIBELUNGEN: case BA_DISSONANCE: case BA_ASSASSINCROSS: case DC_UGLYDANCE: -#endif s = 3; break; -#ifndef RENEWAL case BD_LULLABY: case BD_ROKISWEIL: case BD_ETERNALCHAOS: From 1853c68f27ab66240b6b083707cb4b4718b3c376 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 01:15:47 -0300 Subject: [PATCH 27/30] Reformat BD_ADAPTION interrupt checks --- src/map/skill.c | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/map/skill.c b/src/map/skill.c index 4fc7950567f..37434785c57 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -15915,25 +15915,27 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s return 0; } break; //Combo ready. - case BD_ADAPTATION: - { - int time; - if(!(sc && sc->data[SC_DANCING])) - { - clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); - return 0; - } - time = 1000*(sc->data[SC_DANCING]->val3>>16); - if (skill->get_time( - (sc->data[SC_DANCING]->val1&0xFFFF), //Dance Skill ID - (sc->data[SC_DANCING]->val1>>16)) //Dance Skill LV - - time < skill->get_time2(skill_id,skill_lv)) - { - clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); - return 0; - } + + case BD_ADAPTATION: { + if (sc == NULL || sc->data[SC_DANCING] == NULL) { + clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); + return 0; + } + + int time = 1000 * (sc->data[SC_DANCING]->val3 >> 16); + + int dance_skill_id = (sc->data[SC_DANCING]->val1 & 0xFFFF); + int dance_skill_lv = (sc->data[SC_DANCING]->val1 >> 16); + int dance_duration = skill->get_time(dance_skill_id, dance_skill_lv); + + int interrupt_ticks = skill->get_time2(skill_id, skill_lv); + + if (dance_duration - time < interrupt_ticks) { + clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); + return 0; } break; + } case PR_BENEDICTIO: if (skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 2) From 6c751aac7c913a20a54727951657e2e118102ee0 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 19 Nov 2023 01:28:15 -0300 Subject: [PATCH 28/30] Rebalance of BD_ADAPTATION (Amp) Skill reworked. It now concedes a SC (SC_ADAPTATION) which reduces the SP consumption of performance skills by 20%. - 300s cooldown added - 0.3s of global skill delay added - SP cost increased: 1 -> 10 From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- db/constants.conf | 2 ++ db/pre-re/sc_config.conf | 10 ++++++++++ db/pre-re/skill_db.conf | 2 +- db/re/sc_config.conf | 11 +++++++++++ db/re/skill_db.conf | 7 +++++-- src/map/skill.c | 17 +++++++++++++++-- src/map/status.c | 10 +++++++++- src/map/status.h | 1 + 8 files changed, 54 insertions(+), 6 deletions(-) diff --git a/db/constants.conf b/db/constants.conf index 83882282687..3170f1b65dd 100644 --- a/db/constants.conf +++ b/db/constants.conf @@ -1318,6 +1318,7 @@ constants_db: { SC_NO_SWITCH_WEAPON: 723 SC_ENSEMBLEFATIGUE: 724 + SC_ADAPTATION: 725 comment__: "Emotes" e_gasp: 0 @@ -4944,6 +4945,7 @@ constants_db: { SI_USE_SKILL_SP_SHA: 1063 SI_SP_SHA: 1064 SI_ENSEMBLEFATIGUE: 1088 + SI_ADAPTATION: 1089 SI_SOULCURSE: 1125 SI_MADOGEAR: 1149 } diff --git a/db/pre-re/sc_config.conf b/db/pre-re/sc_config.conf index 16958045d4d..6680fa70733 100644 --- a/db/pre-re/sc_config.conf +++ b/db/pre-re/sc_config.conf @@ -6466,3 +6466,13 @@ SC_ENSEMBLEFATIGUE: { } Icon: "SI_ENSEMBLEFATIGUE" } + +SC_ADAPTATION: { + Visible: true + Flags: { + Buff: true + NoMadoReset: true + NoMagicBlocked: true + } + Icon: "SI_ADAPTATION" +} diff --git a/db/pre-re/skill_db.conf b/db/pre-re/skill_db.conf index cdda43d5a83..e11f8900dad 100644 --- a/db/pre-re/skill_db.conf +++ b/db/pre-re/skill_db.conf @@ -9150,7 +9150,7 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData2: 5000 + SkillData2: 5_000 // Time near start/end of performance where it is not possible to cancel (in miliseconds) CoolDown: 0 Requirements: { SPCost: 1 diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index 59583368c9b..1a9d301457a 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -6521,3 +6521,14 @@ SC_ENSEMBLEFATIGUE: { } Icon: "SI_ENSEMBLEFATIGUE" } + +SC_ADAPTATION: { + Visible: true + Flags: { + Buff: true + NoMadoReset: true + NoMagicBlocked: true + } + Icon: "SI_ADAPTATION" + Skills: ["BD_ADAPTATION"] +} diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index 7a8cb227c08..7fdd395fdef 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -9353,6 +9353,7 @@ skill_db: ( { Id: 304 Name: "BD_ADAPTATION" + StatusChange: "SC_ADAPTATION" Description: "Amp" MaxLevel: 1 Hit: "BDT_SKILL" @@ -9362,10 +9363,12 @@ skill_db: ( DamageType: { NoDamage: true } - SkillData2: 5000 + SkillData1: 180_000 // Buff duration (in miliseconds) FixedCastTime: 0 + AfterCastActDelay: 300 + CoolDown: 300_000 Requirements: { - SPCost: 1 + SPCost: 10 } }, { diff --git a/src/map/skill.c b/src/map/skill.c index 37434785c57..4beed9c51f2 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6645,8 +6645,10 @@ static int skill_castend_id(int tid, int64 tick, int id, intptr_t data) ) sc->data[SC_SOULLINK]->val3 = 0; //Clear bounced spell check. - if( sc->data[SC_DANCING] && skill->get_inf2(ud->skill_id)&INF2_SONG_DANCE && sd ) +#ifndef RENEWAL + if (sc->data[SC_DANCING] != NULL && (skill->get_inf2(ud->skill_id) & INF2_SONG_DANCE) != 0 && sd != NULL) skill->blockpc_start(sd,BD_ADAPTATION,3000); +#endif } if (sd != NULL && ud->skill_id != SA_ABRACADABRA && ud->skill_id != WM_RANDOMIZESPELL @@ -7501,6 +7503,9 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case SJ_LIGHTOFSUN: case SJ_BOOKOFDIMENSION: case SP_SOULREAPER: +#ifdef RENEWAL + case BD_ADAPTATION: +#endif clif->skill_nodamage(src,bl,skill_id,skill_lv, sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv), skill_id)); break; @@ -8209,12 +8214,14 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * } break; +#ifndef RENEWAL case BD_ADAPTATION: - if(tsc && tsc->data[SC_DANCING]){ + if (tsc != NULL && tsc->data[SC_DANCING] != NULL) { clif->skill_nodamage(src,bl,skill_id,skill_lv,1); status_change_end(bl, SC_DANCING, INVALID_TIMER); } break; +#endif case BA_FROSTJOKE: case DC_SCREAM: @@ -15916,6 +15923,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s } break; //Combo ready. +#ifndef RENEWAL case BD_ADAPTATION: { if (sc == NULL || sc->data[SC_DANCING] == NULL) { clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); @@ -15936,6 +15944,7 @@ static int skill_check_condition_castbegin(struct map_session_data *sd, uint16 s } break; } +#endif case PR_BENEDICTIO: if (skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 2) @@ -17242,6 +17251,10 @@ static struct skill_condition skill_get_requirement(struct map_session_data *sd, req.sp -= req.sp * sc->data[SC_TARGET_ASPD]->val1 / 100; if (sc->data[SC_MVPCARD_MISTRESS]) req.sp -= req.sp * sc->data[SC_MVPCARD_MISTRESS]->val1 / 100; +#ifdef RENEWAL + if (sc->data[SC_ADAPTATION] && (skill->get_inf2(skill_id) & (INF2_SONG_DANCE | INF2_ENSEMBLE_SKILL)) != 0) + req.sp -= req.sp * sc->data[SC_ADAPTATION]->val2 / 100; +#endif } req.zeny = skill->dbs->db[idx].zeny[skill_lv-1]; diff --git a/src/map/status.c b/src/map/status.c index da0acd31a1b..706b3e245bc 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -912,7 +912,9 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ return 0; } else { switch (skill_id) { +#ifndef RENEWAL case BD_ADAPTATION: +#endif case CG_LONGINGFREEDOM: case BA_MUSICALSTRIKE: case DC_THROWARROW: @@ -921,8 +923,10 @@ static int status_check_skilluse(struct block_list *src, struct block_list *targ return 0; } } - if ((sc->data[SC_DANCING]->val1&0xFFFF) == CG_HERMODE && skill_id == BD_ADAPTATION) +#ifndef RENEWAL + if ((sc->data[SC_DANCING]->val1 & 0xFFFF) == CG_HERMODE && skill_id == BD_ADAPTATION) return 0; //Can't amp out of Wand of Hermode :/ [Skotlex] +#endif } if (skill_id != 0 /* Do not block item-casted skills.*/ && (src->type != BL_PC || sd->auto_cast_current.type != AUTOCAST_ITEM)) { @@ -8131,6 +8135,10 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val2 = (val1 < 10 ? (9 + val1) : 20); // MaxSP percent increase val3 = val1 + 5; // SP cost reduction break; + + case SC_ADAPTATION: + val2 = 20; // 20% SP cost reduction + break; #endif case SC_LONGING: diff --git a/src/map/status.h b/src/map/status.h index a946568d03a..9d1f1687255 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -923,6 +923,7 @@ typedef enum sc_type { // More SCs for bard/dancer SC_ENSEMBLEFATIGUE, + SC_ADAPTATION, #ifndef SC_MAX SC_MAX, //Automatically updated max, used in for's to check we are within bounds. From 1560da70a25b40f4a64e66923f05df71c3ad9c5f Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sat, 20 Jan 2024 15:56:00 -0300 Subject: [PATCH 29/30] Expand ensemble skills range to 4 cells (RE) From massive skills rebalance (1st/2nd/transclass) (2018.11.28) --- src/map/unit.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/map/unit.c b/src/map/unit.c index 110fe50fa67..95045794d5a 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -1558,8 +1558,12 @@ static int unit_skilluse_id2(struct block_list *src, int target_id, uint16 skill tstatus = status->get_status_data(target); // Record the status of the previous skill) if (sd) { - - if ((skill->get_inf2(skill_id)&INF2_ENSEMBLE_SKILL) && skill->check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1) { +#ifdef RENEWAL + static const int ensemble_range = 4; +#else + static const int ensemble_range = 1; +#endif + if ((skill->get_inf2(skill_id)&INF2_ENSEMBLE_SKILL) && skill->check_pc_partner(sd, skill_id, &skill_lv, ensemble_range, 0) < 1) { clif->skill_fail(sd, skill_id, USESKILL_FAIL_LEVEL, 0, 0); return 0; } From 95942f082687b83e2aa77de76d86fc0f1216a4cd Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Thu, 8 Feb 2024 23:30:48 -0300 Subject: [PATCH 30/30] Remove special dispell logic for songs in RE Since RE no longer has "song areas", this check does not make sense for RE --- src/map/skill.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/map/skill.c b/src/map/skill.c index 4beed9c51f2..85c92fe1bbf 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -8822,6 +8822,7 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * continue; } switch (i) { +#ifndef RENEWAL /** * bugreport:4888 these songs may only be dispelled if you're not in their song area anymore **/ @@ -8833,9 +8834,11 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case SC_DONTFORGETME: case SC_FORTUNE: case SC_SERVICEFORYOU: - if( tsc->data[i]->val4 ) //val4 = out-of-song-area + if (tsc->data[i]->val4 != 0) // val4 = out-of-song-area continue; break; +#endif + case SC_ASSUMPTIO: if( bl->type == BL_MOB ) continue;