Skip to content

Commit

Permalink
Merge pull request #3252 from skyleo/crit-per-luk-fix
Browse files Browse the repository at this point in the history
Fix crit not always being 0.33 crit per luk but 0.3 in some cases
  • Loading branch information
MishimaHaruna authored Nov 23, 2023
2 parents 08790bc + 4c8a5ef commit 5fc5e14
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -3201,7 +3201,9 @@ static void status_calc_bl_main(struct block_list *bl, /*enum scb_flag*/int flag
if (st->luk == bst->luk) {
st->cri = status->calc_critical(bl, sc, bst->cri, true);
} else {
st->cri = status->calc_critical(bl, sc, bst->cri + 3*(st->luk - bst->luk), true);
// supposedly for Renewal some say it might be 0.3 crit per luk instead of 0.33 crit per luk as here.
// The behavior here is also identical to episode 14.0, can't verify this for later versions of Aegis.
st->cri = status->calc_critical(bl, sc, bst->cri - (bst->luk * 10 / 3) + (st->luk * 10 / 3), true);
}
if (battle_config.show_katar_crit_bonus && bl->type == BL_PC && BL_UCAST(BL_PC, bl)->weapontype == W_KATAR) {
st->cri *= 2;
Expand Down Expand Up @@ -3860,7 +3862,7 @@ static void status_calc_misc(struct block_list *bl, struct status_data *st, int
#endif // RENEWAL

if ( bl->type&battle_config.enable_critical )
st->cri += 10 + (st->luk * 10 / 3); //(every 1 luk = +0.3 critical)
st->cri += 10 + (st->luk * 10 / 3); // (every 1 luk = +0.33 critical -> 3 luk = +1 critical)
else
st->cri = 0;

Expand Down

0 comments on commit 5fc5e14

Please sign in to comment.