From 5842dd26915b6e7b91007c97b9aac47f8b25de86 Mon Sep 17 00:00:00 2001 From: skyleo Date: Mon, 12 Jul 2021 03:51:05 +0200 Subject: [PATCH 1/2] Initialze atk%, def% etc to 100 for all bl types --- src/map/status.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/map/status.c b/src/map/status.c index 1a9e79e97b1..00f9ae0d9e2 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -3884,6 +3884,11 @@ static void status_calc_misc(struct block_list *bl, struct status_data *st, int st->mdef2 += st->int_ + (st->vit >> 1); #endif // RENEWAL + st->atk_percent = 100; + st->matk_percent = 100; + st->def_percent = 100; + st->mdef_percent = 100; + if ( bl->type&battle_config.enable_critical ) st->cri += 10 + (st->luk * 10 / 3); // (every 1 luk = +0.33 critical -> 3 luk = +1 critical) else From 53e0ee455a54d4a009ece6d186244c402f398678 Mon Sep 17 00:00:00 2001 From: skyleo Date: Thu, 17 Mar 2022 01:52:53 +0100 Subject: [PATCH 2/2] Implement official ATK % calculation for BS_OVERTHRUST in pre-renewal Party members only receive 5% ATK bonus. --- src/map/status.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/map/status.c b/src/map/status.c index 00f9ae0d9e2..1cf1419b328 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -8308,8 +8308,15 @@ static int status_change_start_sub(struct block_list *src, struct block_list *bl val2 = 20*val1; //Power increase break; case SC_OVERTHRUST: - //val2 holds if it was casted on self, or is bonus received from others - val3 = 5*val1; //Power increase +#ifndef RENEWAL + if (val2 == 1) // cast on self + val3 = 5 * val1; //Power increase + else // received cast + val3 = 5; +#else + // for renewal this is actually wrong for party members since 2020 and will need to be changed. + val3 = 5 * val1; // Power increase +#endif if(sd && pc->checkskill(sd,BS_HILTBINDING)>0) total_tick += total_tick / 10; break;