Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.98 KB | None | 0 0
  1. <Custom Battle Effect>
  2. //Initialize all the variables
  3. user._graspOfTheUndying = user._graspOfTheUndying || 0;
  4. user._graspStartTimer = user._graspStartTimer || 0;
  5. user._graspCounter = user._graspCounter || 0;
  6. var myBaseMaxHealth = user.mhp;
  7.  
  8. user._graspOfTheUndying = 0;
  9. user._graspStartTimer = 0;
  10. user._graspCounter = 0;
  11. </Custom Battle Effect>
  12.  
  13. <Custom Regenerate Effect>
  14. if(user._graspStartTimer === 1)
  15. {
  16. user._graspOfTheUndying += 1;
  17. user._graspOfTheUndying = user._graspOfTheUndying.clamp(0, 3);
  18. user.setStateCounter(stateId, user._graspOfTheUndying);
  19. }
  20. </Custom Regenerate Effect>
  21.  
  22. <Custom React Effect>
  23. if(value > 0 && (this.isAttack() || this.isMagical() || this.isPhysical() || this.isCertain()))
  24. {
  25. user._graspStartTimer = 1;
  26. }
  27. </Custom React Effect>
  28.  
  29. <Custom Confirm Effect>
  30. if(value > 0 && (this.isAttack() || this.isMagical() || this.isPhysical() || this.isCertain()))
  31. {
  32. user._graspStartTimer = 1;
  33. }
  34.  
  35. if(value > 0 && user._graspOfTheUndying === 3 && (this.isAttack() || this.isMagical() || this.isPhysical() || this.isCertain()))
  36. {
  37. user._graspStartTimer = 0;
  38. user._graspOfTheUndying = 0;
  39. user.setStateCounter(stateId, user._graspOfTheUndying);
  40.  
  41. //Error here Suppose to Increase MaxHP base on 3% of the original MaxHP
  42. var bonusHp = Math.floor(myBaseMaxHealth * .03);
  43. user.addMaxHp(bonusHp);
  44.  
  45. var members = user.friendsUnit().aliveMembers();
  46. var dmg = Math.floor(user.mhp * .1);
  47. for(var i = 0; i < members.length; ++i)
  48. {
  49. var member = members[i];
  50. if(member)
  51. {
  52. member.startAnimation(45);
  53. //Take Party Member Recovery Amplifier into consideration
  54. var dmg2 = Math.floor(member.rec * dmg);
  55. member.gainHp(dmg2);
  56. member.startDamagePopup();
  57. member.clearResult();
  58. }
  59. }
  60. }
  61. </Custom Confirm Effect>
  62.  
  63. <Custom Victory Effect>
  64. user.clearParamPlus();
  65. </Custom Victory Effect>
  66.  
  67. <Custom Defeat Effect>
  68. user.clearParamPlus()
  69. </Custom Defeat Effect>
  70.  
  71. <Custom Escape Effect>
  72. user.clearParamPlus()
  73. </Custom Escape Effect>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement