Guest User

Immortal Revival Effect

a guest
Nov 2nd, 2016
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.61 KB | None | 0 0
  1. Exact Code:
  2. <Custom Apply Effect>
  3. user.Phoenix = 0;
  4. </Custom Apply Effect>
  5.  
  6. <Custom Regenerate Effect>
  7. // Increase the number of turns passed for phoenix effect.
  8. user.Phoenix += 1;
  9. var phoenixion = $dataWeapons[3];
  10. // Check if the number of turns is at least 3.
  11. if (user.Phoenix >= 3 && target.hasWeapon(phoenixion) && user.PhRevive <= 3) {
  12. // The HP regeneration rate.
  13. var rate = 0.30;
  14. var mprate = 0.25;
  15. var tprate = 0.35;
  16. // Create the value for HP regenerated.
  17. var value = Math.ceil(rate * user.mhp);
  18. var val = Math.ceil(mprate * user.mmp);
  19. var Tval = Math.ceil(tprate * 125);
  20. // User gains HP amount.
  21. target.startAnimation(49);
  22. user.gainHp(value);
  23. user.gainMp(-val);
  24. user.gainTp(-Tval);
  25. target.startDamagePopup();
  26. user.PhRevive += 1;
  27. }
  28. </Custom Regenerate Effect>
  29.  
  30. Unrestricted (Applies to all party members and no weapon restrictions)
  31. <Custom Apply Effect>
  32. user.Phoenix = 0;
  33. </Custom Apply Effect>
  34.  
  35. <Custom Regenerate Effect>
  36. // Increase the number of turns passed for phoenix effect.
  37. user.Phoenix += 1;
  38. // Check if the number of turns is at least 3.
  39. if (user.Phoenix >= 3 && user.PhRevive <= 3) {
  40. // The HP regeneration rate.
  41. var rate = 0.30;
  42. var mprate = 0.25;
  43. var tprate = 0.35;
  44. // Create the value for HP regenerated.
  45. var value = Math.ceil(rate * user.mhp);
  46. var val = Math.ceil(mprate * user.mmp);
  47. var Tval = Math.ceil(tprate * 125);
  48. // User gains HP amount.
  49. target.startAnimation(49);
  50. user.gainHp(value);
  51. user.gainMp(-val);
  52. user.gainTp(-Tval);
  53. target.startDamagePopup();
  54. user.PhRevive += 1;
  55. }
  56. </Custom Regenerate Effect>
Advertisement
Add Comment
Please, Sign In to add comment