Dancer_A

Physical hit Res

Dec 14th, 2022 (edited)
869
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. // Physical weapons scaling from POW and hitting RES
  2. // Specific edge case
  3. if (target != null && weapon != null)
  4.     if (!magic() && weapon.ismagic()) // if not a magical weapon but a physical weapon with magic properties
  5.         {
  6.         int value = 0;
  7.         value = (target.actor.stat(Stat_Labels.Def) + target.actor.terraindef); // add back the total def
  8.         value -= (target.actor.stat(Stat_Labels.Res) + target.actor.terrainres); // subtract res
  9.         skill_dmg += math.Max(value, 0); // add diff to skill damage value
  10. }
  11. // Modify routine
Advertisement
Add Comment
Please, Sign In to add comment