Skip to content

Commit

Permalink
Merge pull request #2927 from MrKeiKun/fix-cart_tornado_damage
Browse files Browse the repository at this point in the history
Fixed damage overflow on GN_CART_TORNADO.
  • Loading branch information
MishimaHaruna authored Aug 4, 2021
2 parents 68634e4 + 6b1f934 commit 5babcb7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -2677,7 +2677,9 @@ static int battle_calc_skillratio(int attack_type, struct block_list *src, struc
case GN_CART_TORNADO:
{
int strbonus = bst->str;
skillratio = 50 * skill_lv + (sd ? sd->cart_weight : battle_config.max_cart_weight) / 10 / max(150 - strbonus, 1) + 50 * (sd ? pc->checkskill(sd, GN_REMODELING_CART) : 5);
if (strbonus > 130) //Max base stat limit on official is 130. So well allow no higher then 130 STR here. This limit prevents
strbonus = 130; //the division from going any lower then 20 so the server wont divide by 0 if someone has 150 STR. [Rytech]
skillratio = 50 * skill_lv + (sd ? sd->cart_weight : battle_config.max_cart_weight) / 10 / (150 - strbonus) + 50 * (sd ? pc->checkskill(sd, GN_REMODELING_CART) : 5);
}
break;
case GN_CARTCANNON:
Expand Down

0 comments on commit 5babcb7

Please sign in to comment.