Skip to content

Commit

Permalink
Fixed vit def calculation in pre-re
Browse files Browse the repository at this point in the history
  • Loading branch information
csnv committed May 1, 2024
1 parent f4eacee commit a49cecc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/battle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1527,8 +1527,8 @@ static int64 battle_calc_defense(int attack_type, struct block_list *src, struct
//Sd vit-eq
#ifndef RENEWAL
//[VIT*0.5] + rnd([VIT*0.3], max([VIT*0.3],[VIT^2/150]-1))
vit_def = def2*(def2-15)/150;
vit_def = def2/2 + (vit_def>0?rnd()%vit_def:0);
vit_def = def2 * 3 / 10;
vit_def = def2 / 2 + rnd->value(vit_def, max(vit_def, def2 * def2 / 150 - 1));
#else
vit_def = def2;
#endif
Expand Down

0 comments on commit a49cecc

Please sign in to comment.