XConquer

Calculate Potency Likely TQ

Jan 9th, 2020
117
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static uint CalculatePotencyDamage(Entity AttackerClient, Entity AttackedClient, uint damage)
  2. {
  3. if (AttackerClient.BattlePower == AttackedClient.BattlePower)
  4. return damage;
  5. if (AttackerClient.BattlePower > AttackedClient.BattlePower)
  6. {
  7. uint power = (uint)(AttackerClient.BattlePower - AttackedClient.BattlePower);
  8.  
  9. if (power > 12)
  10. power = 12;
  11. if (!AttackerClient.Assassin())
  12. power += power * 2;
  13. damage += (damage * power) / 15;
  14. }
  15. else
  16. {
  17. uint power = (uint)(AttackedClient.BattlePower - AttackerClient.BattlePower);
  18. if (power > 12)
  19. power = 12;
  20. power += power * 50 / 100;
  21. damage -= (damage * power) / 20;//20
  22. }
  23. return damage;
  24. }
  25.  
  26.  
  27. Use:
  28. Calculate: CalculatePotencyDamage(attacker,attacked,damage);
RAW Paste Data