From 10aca69c2452c4caca77c53b607e569549adfb86 Mon Sep 17 00:00:00 2001 From: "Guilherme G. Menaldo" Date: Sun, 2 Jul 2023 15:37:49 -0300 Subject: [PATCH] Rebalance of AL_ANGELUS (Angelus) - Now increases +50 MaxHP per SkillLevel - The increased HP also gets healed - 30s cooldown added From massive skills rebalance (1st/2nd/transclass) (2018.10.31) --- db/re/sc_config.conf | 1 + db/re/skill_db.conf | 1 + src/map/skill.c | 19 +++++++++++++++++-- src/map/status.c | 9 ++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/db/re/sc_config.conf b/db/re/sc_config.conf index f8828a96cc2..1efbeb8e023 100644 --- a/db/re/sc_config.conf +++ b/db/re/sc_config.conf @@ -199,6 +199,7 @@ SC_ANGELUS: { NoMagicBlocked: true } CalcFlags: { + Maxhp: true Def2: true } Icon: "SI_ANGELUS" diff --git a/db/re/skill_db.conf b/db/re/skill_db.conf index b0940d8f1bf..ed565741ea3 100644 --- a/db/re/skill_db.conf +++ b/db/re/skill_db.conf @@ -1557,6 +1557,7 @@ skill_db: ( InterruptCast: true CastTime: 350 AfterCastActDelay: 3500 + CoolDown: 30_000 SkillData1: { Lv1: 30000 Lv2: 60000 diff --git a/src/map/skill.c b/src/map/skill.c index 8df203feb12..a6102d2a7ad 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -7897,8 +7897,23 @@ static int skill_castend_nodamage_id(struct block_list *src, struct block_list * case WM_FRIGG_SONG: if (sd == NULL || sd->status.party_id == 0 || (flag & 1) != 0) { // Aegis: special handling, even though they aren't of magic skilltype. - if (status->isimmune(bl) == 0 || src == bl || (skill_id != AL_ANGELUS && skill_id != PR_MAGNIFICAT && skill_id != PR_GLORIA)) - clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv), skill_id)); + if (status->isimmune(bl) == 0 || src == bl || (skill_id != AL_ANGELUS && skill_id != PR_MAGNIFICAT && skill_id != PR_GLORIA)) { + int sc_result = sc_start(src, bl, type, 100, skill_lv, skill->get_time(skill_id, skill_lv), skill_id); + clif->skill_nodamage(bl, bl, skill_id, skill_lv, sc_result); + +#ifdef RENEWAL + if (skill_id == AL_ANGELUS && sc_result == 1) { + struct status_change *sc = status->get_sc(bl); + + // Angelus should only heal when the SC is actually set in the player (starts now or was reapplied). + // Angelus may "succeed" (sc_result = 1) and not start the SC when you have the effect of a greater level. + // When this happen, we should not heal. + // Comparing val1 to skill_lv will ensure us that it has succeeded and uses the current skill_lv + if (sc->data[SC_ANGELUS] != NULL && sc->data[SC_ANGELUS]->val1 == skill_lv) + status->heal(bl, sc->data[SC_ANGELUS]->val3, 0, STATUS_HEAL_DEFAULT); + } +#endif + } } else if (sd != NULL) { party->foreachsamemap(skill->area_sub, sd, skill->get_splash(skill_id, skill_lv), src, skill_id, skill_lv, tick, flag|BCT_PARTY|1, skill->castend_nodamage_id); } diff --git a/src/map/status.c b/src/map/status.c index f65b5ed70ad..b23d001510e 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -5766,6 +5766,10 @@ static unsigned int status_calc_maxhp(struct block_list *bl, struct status_chang maxhp -= maxhp * sc->data[SC_GM_BATTLE2]->val1 / 100; if (sc->data[SC_LUNARSTANCE] != NULL) maxhp += maxhp * sc->data[SC_LUNARSTANCE]->val2 / 100; +#ifdef RENEWAL + if (sc->data[SC_ANGELUS] != NULL) + maxhp += sc->data[SC_ANGELUS]->val3; +#endif return (unsigned int)cap_value(maxhp, 1, UINT_MAX); } @@ -8238,7 +8242,10 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl sc_start(src, bl, SC_ENDURE, 100, 1, total_tick, skill_id); // Endure effect break; case SC_ANGELUS: - val2 = 5*val1; //def increase + val2 = 5 * val1; // def increase +#ifdef RENEWAL + val3 = 50 * val1; // MaxHP increase +#endif break; case SC_IMPOSITIO: val2 = 5*val1; //watk increase