fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class StrengthModifier
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. //A is attacker, B is victim, 1 is level
  10. //IMPORTANT: The character's strength value is only for those at level 1!
  11. //This will determine the proper value for higher levels.
  12. int strA = 500;
  13. int strB = 600;
  14. int strA1 = 10;
  15. int strB1 = 16;
  16. int damage = 0;
  17.  
  18. //Your strength is effStr while your opponent's is thisstr.
  19. double effStr = Math.floor(strA * Math.pow(1.1775,(strA1 -1)) / 10) * 10;
  20. double thisstr = Math.floor(strB * Math.pow(1.1775,(strB1 -1)) / 10) * 10;
  21.  
  22. System.out.println("Real Strength: " + effStr);
  23. System.out.println("Opponent's Strength: " + thisstr);
  24. //These statements are NOT to be modified. This is straight from the game's code slightly modified for the program.
  25. if(effStr > thisstr * 2)
  26. {
  27. effStr = thisstr * 2 + (effStr - thisstr * 2) / 8;
  28. if(effStr > thisstr * 3)
  29. {
  30. effStr = thisstr * 3 + (effStr - thisstr * 3) / 100;
  31. }
  32. }
  33. else if(effStr < thisstr / 2)
  34. {
  35. effStr = thisstr / 2 - (thisstr / 2 - effStr) / 10;
  36. }
  37. //The results of these calculations. You can modify the 30 for any damage you want.
  38. System.out.println("Modified Strength: " + (effStr));
  39. System.out.println("Damage: " + Math.floor(30 * (effStr/500)));
  40. }
  41. }
  42. /* Lv1 strengths
  43. Lucas: 500
  44.   Drew: 510
  45.   Shawn: 590
  46.   Jenny: 470
  47.   Taylor: 490
  48.   Leo: 600
  49.   Legge: 500
  50.   Eason: 580
  51.   Jason: 470
  52.   Gordon: 480
  53.   Giggs: 460
  54.   Titto: 470
  55.   Sinan: 480
  56.   Iczzy: 540
  57.   Heater: 550
  58.   Raye: 560
  59.   Vivian: 450
  60.   Livermore: 600
  61.   S. Eason: 500
  62. */
Success #stdin #stdout 0.12s 320576KB
stdin
Standard input is empty
stdout
Real Strength: 2170.0
Opponent's Strength: 6950.0
Modified Strength: 3344.5
Damage: 200.0