Skip to content

Commit

Permalink
Merge pull request #3293 from skyleo/missing-atkdefpercent-commits
Browse files Browse the repository at this point in the history
Add missing commit for (m)atk/(m)def percent implementation and one official behavior fix for BS_OVERTHRUST
  • Loading branch information
MishimaHaruna committed May 2, 2024
2 parents a2d8e27 + 53e0ee4 commit 599cec3
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/map/status.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -8303,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;
Expand Down

0 comments on commit 599cec3

Please sign in to comment.